9router 0.5.112 → 0.5.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +12 -11
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +4 -4
- package/app/.next-cli-build/required-server-files.json +7 -1
- package/app/.next-cli-build/routes-manifest.json +6 -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 +16 -16
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
- 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 +2 -2
- 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 +5 -5
- 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 -2
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +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 +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +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 +2 -2
- 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 -2
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js +4 -0
- package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-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.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 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +4 -4
- 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 +6 -3
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +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 +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +4 -4
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +4 -4
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- 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 +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +12 -11
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/1133.js +1 -1
- package/app/.next-cli-build/server/chunks/1297.js +29 -0
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1356.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +1 -1
- package/app/.next-cli-build/server/chunks/{2365.js → 1866.js} +1 -1
- package/app/.next-cli-build/server/chunks/238.js +1 -1
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2598.js +1 -1
- package/app/.next-cli-build/server/chunks/2822.js +1 -1
- package/app/.next-cli-build/server/chunks/2840.js +1 -0
- package/app/.next-cli-build/server/chunks/3225.js +1 -1
- package/app/.next-cli-build/server/chunks/3697.js +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +5 -5
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4279.js +1 -1
- package/app/.next-cli-build/server/chunks/4882.js +1 -1
- package/app/.next-cli-build/server/chunks/5299.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +40 -40
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- 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/6297.js +1 -0
- package/app/.next-cli-build/server/chunks/6576.js +1 -0
- package/app/.next-cli-build/server/chunks/6690.js +1 -1
- package/app/.next-cli-build/server/chunks/6724.js +1 -1
- 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/7187.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7373.js +1 -1
- package/app/.next-cli-build/server/chunks/7525.js +1 -1
- package/app/.next-cli-build/server/chunks/7552.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7843.js +51 -0
- package/app/.next-cli-build/server/chunks/8251.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/8416.js +1 -1
- package/app/.next-cli-build/server/chunks/8623.js +1 -1
- package/app/.next-cli-build/server/chunks/866.js +1 -0
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +4 -4
- package/app/.next-cli-build/server/chunks/8896.js +1 -0
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9128.js +1 -1
- package/app/.next-cli-build/server/chunks/9198.js +1 -0
- package/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/app/.next-cli-build/server/chunks/9604.js +1 -1
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9696.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.js +14 -14
- 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/preview-props.json +3 -3
- 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/server/webpack-runtime.js +1 -1
- package/app/.next-cli-build/static/5PG9DiG39fbvOpgKSnR7p/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-2fde166305caeddb.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-2d39b4ce6857f490.js +7 -0
- package/app/.next-cli-build/static/chunks/{761-f671b0371daf6356.js → 761-4ab39a76a6565658.js} +8 -8
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0f55372821920062.js → page-899c85a4a09b87cc.js} +15 -15
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c13b42f0dbad8fcd.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-8f7c68a9ddffe74b.js +4 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6923bda560bbc869.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-3b1b5d8e342d932f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/{page-a70f643786fb402f.js → page-4e22949b210a2492.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-a70f643786fb402f.js → route-4e22949b210a2492.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-a70f643786fb402f.js → route-4e22949b210a2492.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-a70f643786fb402f.js → route-4e22949b210a2492.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/commandcode/auto-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/web-login/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4e22949b210a2492.js +1 -0
- package/app/.next-cli-build/static/css/836344dc90be2bb4.css +1 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/node_modules/undici/LICENSE +21 -0
- package/app/node_modules/undici/README.md +741 -0
- package/app/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/app/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/app/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/app/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/app/node_modules/undici/docs/docs/api/Client.md +290 -0
- package/app/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/app/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/app/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/app/node_modules/undici/docs/docs/api/Cookies.md +128 -0
- package/app/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/app/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +317 -0
- package/app/node_modules/undici/docs/docs/api/Dispatcher.md +1393 -0
- package/app/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/app/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/app/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/app/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/app/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
- package/app/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/app/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/app/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/app/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/app/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/app/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/app/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/app/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/app/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/app/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/app/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
- package/app/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
- package/app/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
- package/app/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/app/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
- package/app/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
- package/app/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/app/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/app/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/app/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/app/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/app/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/app/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/app/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/app/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/app/node_modules/undici/index-fetch.js +65 -0
- package/app/node_modules/undici/index.d.ts +3 -0
- package/app/node_modules/undici/index.js +234 -0
- package/app/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/app/node_modules/undici/lib/api/api-connect.js +110 -0
- package/app/node_modules/undici/lib/api/api-pipeline.js +252 -0
- package/app/node_modules/undici/lib/api/api-request.js +214 -0
- package/app/node_modules/undici/lib/api/api-stream.js +209 -0
- package/app/node_modules/undici/lib/api/api-upgrade.js +111 -0
- package/app/node_modules/undici/lib/api/index.js +7 -0
- package/app/node_modules/undici/lib/api/readable.js +580 -0
- package/app/node_modules/undici/lib/cache/memory-cache-store.js +279 -0
- package/app/node_modules/undici/lib/cache/sqlite-cache-store.js +469 -0
- package/app/node_modules/undici/lib/core/connect.js +159 -0
- package/app/node_modules/undici/lib/core/constants.js +143 -0
- package/app/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/app/node_modules/undici/lib/core/errors.js +477 -0
- package/app/node_modules/undici/lib/core/request.js +485 -0
- package/app/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/app/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/app/node_modules/undici/lib/core/symbols.js +76 -0
- package/app/node_modules/undici/lib/core/tree.js +160 -0
- package/app/node_modules/undici/lib/core/util.js +1013 -0
- package/app/node_modules/undici/lib/dispatcher/agent.js +162 -0
- package/app/node_modules/undici/lib/dispatcher/balanced-pool.js +221 -0
- package/app/node_modules/undici/lib/dispatcher/client-h1.js +1769 -0
- package/app/node_modules/undici/lib/dispatcher/client-h2.js +1056 -0
- package/app/node_modules/undici/lib/dispatcher/client.js +669 -0
- package/app/node_modules/undici/lib/dispatcher/dispatcher-base.js +196 -0
- package/app/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
- package/app/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/app/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/app/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/app/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
- package/app/node_modules/undici/lib/dispatcher/pool.js +118 -0
- package/app/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
- package/app/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/app/node_modules/undici/lib/dispatcher/round-robin-pool.js +137 -0
- package/app/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +260 -0
- package/app/node_modules/undici/lib/encoding/index.js +33 -0
- package/app/node_modules/undici/lib/global.js +59 -0
- package/app/node_modules/undici/lib/handler/cache-handler.js +1181 -0
- package/app/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/app/node_modules/undici/lib/handler/decorator-handler.js +67 -0
- package/app/node_modules/undici/lib/handler/deduplication-handler.js +504 -0
- package/app/node_modules/undici/lib/handler/redirect-handler.js +273 -0
- package/app/node_modules/undici/lib/handler/retry-handler.js +504 -0
- package/app/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/app/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/app/node_modules/undici/lib/interceptor/cache.js +746 -0
- package/app/node_modules/undici/lib/interceptor/decompress.js +567 -0
- package/app/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/app/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/app/node_modules/undici/lib/interceptor/dump.js +99 -0
- package/app/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/app/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/app/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/app/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/app/node_modules/undici/lib/llhttp/constants.d.ts +195 -0
- package/app/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/app/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/app/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/app/node_modules/undici/lib/llhttp/utils.d.ts +2 -0
- package/app/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/app/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/app/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/app/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/app/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/app/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/app/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/app/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/app/node_modules/undici/lib/mock/mock-utils.js +486 -0
- package/app/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/app/node_modules/undici/lib/mock/snapshot-agent.js +353 -0
- package/app/node_modules/undici/lib/mock/snapshot-recorder.js +588 -0
- package/app/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/app/node_modules/undici/lib/util/cache.js +709 -0
- package/app/node_modules/undici/lib/util/date.js +670 -0
- package/app/node_modules/undici/lib/util/promise.js +28 -0
- package/app/node_modules/undici/lib/util/runtime-features.js +124 -0
- package/app/node_modules/undici/lib/util/stats.js +32 -0
- package/app/node_modules/undici/lib/util/timers.js +425 -0
- package/app/node_modules/undici/lib/web/cache/cache.js +864 -0
- package/app/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/app/node_modules/undici/lib/web/cache/util.js +45 -0
- package/app/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/app/node_modules/undici/lib/web/cookies/index.js +201 -0
- package/app/node_modules/undici/lib/web/cookies/parse.js +315 -0
- package/app/node_modules/undici/lib/web/cookies/util.js +371 -0
- package/app/node_modules/undici/lib/web/eventsource/eventsource-stream.js +575 -0
- package/app/node_modules/undici/lib/web/eventsource/eventsource.js +504 -0
- package/app/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/app/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/app/node_modules/undici/lib/web/fetch/body.js +518 -0
- package/app/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/app/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/app/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/app/node_modules/undici/lib/web/fetch/formdata.js +259 -0
- package/app/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/app/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/app/node_modules/undici/lib/web/fetch/index.js +2413 -0
- package/app/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/app/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/app/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/app/node_modules/undici/lib/web/infra/index.js +243 -0
- package/app/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/app/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/app/node_modules/undici/lib/web/webidl/index.js +1006 -0
- package/app/node_modules/undici/lib/web/websocket/connection.js +339 -0
- package/app/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/app/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/app/node_modules/undici/lib/web/websocket/frame.js +133 -0
- package/app/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
- package/app/node_modules/undici/lib/web/websocket/receiver.js +520 -0
- package/app/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/app/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/app/node_modules/undici/lib/web/websocket/stream/websocketstream.js +496 -0
- package/app/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/app/node_modules/undici/lib/web/websocket/websocket.js +758 -0
- package/app/node_modules/undici/package.json +152 -0
- package/app/node_modules/undici/scripts/strip-comments.js +10 -0
- package/app/node_modules/undici/types/README.md +6 -0
- package/app/node_modules/undici/types/agent.d.ts +32 -0
- package/app/node_modules/undici/types/api.d.ts +43 -0
- package/app/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/app/node_modules/undici/types/cache-interceptor.d.ts +179 -0
- package/app/node_modules/undici/types/cache.d.ts +36 -0
- package/app/node_modules/undici/types/client-stats.d.ts +15 -0
- package/app/node_modules/undici/types/client.d.ts +153 -0
- package/app/node_modules/undici/types/connector.d.ts +36 -0
- package/app/node_modules/undici/types/content-type.d.ts +21 -0
- package/app/node_modules/undici/types/cookies.d.ts +30 -0
- package/app/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/app/node_modules/undici/types/dispatcher.d.ts +275 -0
- package/app/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/app/node_modules/undici/types/errors.d.ts +177 -0
- package/app/node_modules/undici/types/eventsource.d.ts +66 -0
- package/app/node_modules/undici/types/fetch.d.ts +231 -0
- package/app/node_modules/undici/types/formdata.d.ts +114 -0
- package/app/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/app/node_modules/undici/types/global-origin.d.ts +7 -0
- package/app/node_modules/undici/types/h2c-client.d.ts +73 -0
- package/app/node_modules/undici/types/handlers.d.ts +14 -0
- package/app/node_modules/undici/types/header.d.ts +160 -0
- package/app/node_modules/undici/types/index.d.ts +91 -0
- package/app/node_modules/undici/types/interceptors.d.ts +82 -0
- package/app/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/app/node_modules/undici/types/mock-call-history.d.ts +111 -0
- package/app/node_modules/undici/types/mock-client.d.ts +27 -0
- package/app/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/app/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/app/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/app/node_modules/undici/types/patch.d.ts +29 -0
- package/app/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/app/node_modules/undici/types/pool.d.ts +41 -0
- package/app/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/app/node_modules/undici/types/readable.d.ts +68 -0
- package/app/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/app/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/app/node_modules/undici/types/round-robin-pool.d.ts +41 -0
- package/app/node_modules/undici/types/snapshot-agent.d.ts +109 -0
- package/app/node_modules/undici/types/socks5-proxy-agent.d.ts +25 -0
- package/app/node_modules/undici/types/util.d.ts +18 -0
- package/app/node_modules/undici/types/utility.d.ts +7 -0
- package/app/node_modules/undici/types/webidl.d.ts +347 -0
- package/app/node_modules/undici/types/websocket.d.ts +188 -0
- package/app/open-sse/lib/deepseek-pow-hash.js +136 -0
- package/app/package.json +5 -2
- package/app/public/providers/sensenova-intl.png +0 -0
- package/app/server.js +1 -1
- package/app/src/shared/services/quotaAutoPing.js +17 -2
- package/cli.js +112 -55
- package/hooks/sqliteRuntime.js +2 -1
- package/package.json +2 -2
- package/src/cli/tray/tray.js +88 -9
- package/src/cli/utils/launcherProcess.js +186 -0
- package/app/.next-cli-build/server/chunks/2132.js +0 -1
- package/app/.next-cli-build/server/chunks/2380.js +0 -79
- package/app/.next-cli-build/server/chunks/436.js +0 -1
- package/app/.next-cli-build/server/chunks/4480.js +0 -1
- package/app/.next-cli-build/server/chunks/7557.js +0 -1
- package/app/.next-cli-build/server/chunks/7774.js +0 -120
- package/app/.next-cli-build/server/chunks/7995.js +0 -120
- package/app/.next-cli-build/server/chunks/8128.js +0 -1
- package/app/.next-cli-build/server/chunks/8499.js +0 -1
- package/app/.next-cli-build/static/Mwpv7kpqnhzp2SJMtsIA1/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-02944667ec55f586.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-870732fd9d818574.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9897bc47dce7e8f.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-e5d73ba422004783.js +0 -4
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-2b2fe8a972d455af.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-888c58ee93724e20.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/web-login/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-a70f643786fb402f.js +0 -1
- package/app/.next-cli-build/static/css/eca85123800ee802.css +0 -1
- /package/app/.next-cli-build/static/{Mwpv7kpqnhzp2SJMtsIA1 → 5PG9DiG39fbvOpgKSnR7p}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";exports.id=1297,exports.ids=[1297],exports.modules={4845:(a,b,c)=>{c.d(b,{v:()=>v});var d=c(82380),e=c(14170),f=c(32271),g=c(34097),h=c(17242),i=c(44090),j=c(43698);function k(a,b,c){a.reasoningId||(a.reasoningId=`rs_${a.responseId}_${c}`,a.reasoningIndex=c,b("response.output_item.added",{type:"response.output_item.added",output_index:c,item:{id:a.reasoningId,type:j.Du.REASONING,summary:[]}}),b("response.reasoning_summary_part.added",{type:"response.reasoning_summary_part.added",item_id:a.reasoningId,output_index:c,summary_index:0,part:{type:j.Du.SUMMARY_TEXT,text:""}}),a.reasoningPartAdded=!0)}function l(a,b,c){c&&(a.reasoningBuf+=c,b("response.reasoning_summary_text.delta",{type:"response.reasoning_summary_text.delta",item_id:a.reasoningId,output_index:a.reasoningIndex,summary_index:0,delta:c}))}function m(a,b){if(a.reasoningId&&!a.reasoningDone){a.reasoningDone=!0,b("response.reasoning_summary_text.done",{type:"response.reasoning_summary_text.done",item_id:a.reasoningId,output_index:a.reasoningIndex,summary_index:0,text:a.reasoningBuf}),b("response.reasoning_summary_part.done",{type:"response.reasoning_summary_part.done",item_id:a.reasoningId,output_index:a.reasoningIndex,summary_index:0,part:{type:j.Du.SUMMARY_TEXT,text:a.reasoningBuf}});let c={id:a.reasoningId,type:j.Du.REASONING,summary:[{type:j.Du.SUMMARY_TEXT,text:a.reasoningBuf}]};b("response.output_item.done",{type:"response.output_item.done",output_index:a.reasoningIndex,item:c}),r(a,a.reasoningIndex,c)}}function n(a,b,c){if(a.msgItemAdded[c]&&!a.msgItemDone[c]){a.msgItemDone[c]=!0;let d=a.msgTextBuf[c]||"",e=`msg_${a.responseId}_${c}`;b("response.output_text.done",{type:"response.output_text.done",item_id:e,output_index:parseInt(c),content_index:0,text:d,logprobs:[]}),b("response.content_part.done",{type:"response.content_part.done",item_id:e,output_index:parseInt(c),content_index:0,part:{type:j.Du.OUTPUT_TEXT,annotations:[],logprobs:[],text:d}});let f={id:e,type:j.Du.MESSAGE,content:[{type:j.Du.OUTPUT_TEXT,annotations:[],logprobs:[],text:d}],role:j.z7.ASSISTANT};b("response.output_item.done",{type:"response.output_item.done",output_index:parseInt(c),item:f}),r(a,parseInt(c),f)}}function o(a,b){return!!b&&a.customToolNames?.has(b)}function p(a){if("string"!=typeof a)return"";try{let b=JSON.parse(a);if(b&&"object"==typeof b&&"string"==typeof b.input)return b.input}catch{}return a}function q(a,b,c){let d=a.funcCallIds[c];if(d&&!a.funcItemDone[c]){let e=a.funcArgsBuf[c]||"{}",f=o(a,a.funcNames[c]);if(f){let a=p(e);b("response.custom_tool_call_input.delta",{type:"response.custom_tool_call_input.delta",item_id:`ctc_${d}`,output_index:parseInt(c),delta:a}),b("response.custom_tool_call_input.done",{type:"response.custom_tool_call_input.done",item_id:`ctc_${d}`,output_index:parseInt(c),input:a})}else b("response.function_call_arguments.done",{type:"response.function_call_arguments.done",item_id:`fc_${d}`,output_index:parseInt(c),arguments:e});let g={id:`${f?"ctc":"fc"}_${d}`,type:f?j.Du.CUSTOM_TOOL_CALL:j.Du.FUNCTION_CALL,...f?{input:p(e)}:{arguments:e},call_id:d,name:a.funcNames[c]||""};b("response.output_item.done",{type:"response.output_item.done",output_index:parseInt(c),item:g}),r(a,parseInt(c),g),a.funcItemDone[c]=!0,a.funcArgsDone[c]=!0}}function r(a,b,c){a.completedOutputItems??=new Map;let d=Number.isInteger(b)?b:Number.parseInt(b,10)||0;a.completedOutputItems.set(d,c)}function s(a,b){if(!a.completedSent){let c;a.completedSent=!0,b("response.completed",{type:"response.completed",response:{id:a.responseId,object:"response",created_at:a.created,status:"completed",background:!1,error:null,output:(c=a.completedOutputItems)instanceof Map&&0!==c.size?[...c.entries()].sort((a,b)=>a[0]-b[0]).map(([,a])=>a):[],...a.responsesUsage?{usage:a.responsesUsage}:{}}})}}function t(a){if(a.completedSent)return[];let b=[],c=(c,d)=>{d.sequence_number=++a.seq,b.push({event:c,data:d})};for(let b in a.msgItemAdded)n(a,c,b);for(let b in m(a,c),a.funcCallIds)q(a,c,b);return s(a,c),b}function u(a){return a.toolCallIndex>0||a.currentToolCallId?j.bC.TOOL_CALLS:j.bC.STOP}function v(a,b){if(!a){if(b.finishReasonSent||!b.started)return null;let a=u(b);b.finishReasonSent=!0,b.finishReason=a;let c=(0,f.k)({id:b.chatId||`chatcmpl-${Date.now()}`,created:b.created||Math.floor(Date.now()/1e3),model:b.model||j.rP},{},a);return b.usage&&"object"==typeof b.usage&&(c.usage=b.usage),c}let c=a.type||a.event,d=a.data||a;if(b.started||(b.started=!0,b.chatId=`chatcmpl-${Date.now()}`,b.created=Math.floor(Date.now()/1e3),b.toolCallIndex=0,b.currentToolCallId=null,b.respToolChatIndex??=new Map,b.respToolArgsEmitted??=new Set),"response.output_text.delta"===c){let a=d.delta||"";return a?(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},{content:a}):null}if("response.output_text.done"===c)return null;if("response.output_item.added"===c&&(d.item?.type===j.Du.FUNCTION_CALL||d.item?.type==="custom_tool_call")){let a,c=d.item;b.currentToolCallId=c.call_id||(0,h.eG)(),b.respToolChatIndex??=new Map;let e=c.id||d.item_id||b.currentToolCallId;return e&&b.respToolChatIndex.has(e)?a=b.respToolChatIndex.get(e):(a=b.toolCallIndex++,e&&b.respToolChatIndex.set(e,a)),(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},{tool_calls:[{index:a,id:b.currentToolCallId,type:j.x4.FUNCTION,function:{name:c.name||"",arguments:""}}]})}if("response.function_call_arguments.delta"===c||"response.custom_tool_call_input.delta"===c){let a=d.delta||"";if(!a)return null;let c=(d.item_id?b.respToolChatIndex?.get(d.item_id):void 0)??Math.max(0,(b.toolCallIndex||1)-1);return b.respToolArgsEmitted??=new Set,b.respToolArgsEmitted.add(c),(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},{tool_calls:[{index:c,function:{arguments:a}}]})}if("response.output_item.done"===c&&(d.item?.type===j.Du.FUNCTION_CALL||d.item?.type==="custom_tool_call")){let a=d.item?.id||d.item_id,c=(a&&b.respToolChatIndex?.get(a))??Math.max(0,(b.toolCallIndex||1)-1),e=d.item?.arguments;return"string"==typeof e&&e&&(b.respToolArgsEmitted??=new Set,!b.respToolArgsEmitted.has(c))?(b.respToolArgsEmitted.add(c),(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},{tool_calls:[{index:c,function:{arguments:e}}]})):null}if("response.completed"===c||"response.done"===c){let a=d.response?.usage;if(a&&"object"==typeof a){let c=a.input_tokens||a.prompt_tokens||0,d=a.output_tokens||a.completion_tokens||0,e=a.input_tokens_details?.cached_tokens||a.cache_read_input_tokens||0;b.usage=(0,g.c)({promptTokens:c,completionTokens:d,totalTokens:c+d,cachedTokens:e})}if(!b.finishReasonSent){let a=u(b);b.finishReasonSent=!0,b.finishReason=a;let c=(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},{},a);return b.usage&&"object"==typeof b.usage&&(c.usage=b.usage),c}return null}if("error"===c||"response.failed"===c){if(b.finishReasonSent)return null;let a=d.error||d.response?.error;return a?(b.error=a,b.finishReasonSent=!0,(0,f.k)({id:b.chatId||`chatcmpl-${Date.now()}`,created:b.created||Math.floor(Date.now()/1e3),model:b.model||j.rP},{content:`[Error] ${a.message||JSON.stringify(a)}`},j.bC.STOP)):null}if("response.reasoning_summary_text.delta"===c){let a=d.delta||"";return a?(0,f.k)({id:b.chatId,created:b.created,model:b.model||j.rP},(0,i.B7)(a)):null}return null}(0,d.kz)(e.h.OPENAI,e.h.OPENAI_RESPONSES,null,function(a,b){if(!a)return t(b);let c=function(a){if(!a||"object"!=typeof a)return null;let b=[a.input_tokens,a.prompt_tokens].find(Number.isInteger),c=[a.output_tokens,a.completion_tokens].find(Number.isInteger);if(void 0===b||void 0===c||b+c<=0)return null;let d={input_tokens:b,output_tokens:c,total_tokens:b+c},e=[a.input_tokens_details?.cached_tokens,a.prompt_tokens_details?.cached_tokens].find(Number.isInteger),f=[a.output_tokens_details?.reasoning_tokens,a.completion_tokens_details?.reasoning_tokens].find(Number.isInteger);return Number.isInteger(e)&&(d.input_tokens_details={cached_tokens:e}),Number.isInteger(f)&&(d.output_tokens_details={reasoning_tokens:f}),d}(a.usage);if(c&&(b.responsesUsage=c),!a.choices?.length)return b.completionPending&&b.responsesUsage?t(b):[];let d=[],f=(a,c)=>{c.sequence_number=++b.seq,d.push({event:a,data:c})},g=a.choices[0],h=g.index||0,p=g.delta||{};b.started||(b.started=!0,b.responseId=a.id?`resp_${a.id}`:b.responseId,f("response.created",{type:"response.created",response:{id:b.responseId,object:"response",created_at:b.created,status:"in_progress",background:!1,error:null,output:[]}}),f("response.in_progress",{type:"response.in_progress",response:{id:b.responseId,object:"response",created_at:b.created,status:"in_progress"}}));let r=(0,i.Vi)(p);if(r&&(k(b,f,h),l(b,f,r)),p.content){let a=p.content;if(a.includes("<think>")&&(b.inThinking=!0,a=a.replace("<think>",""),k(b,f,h)),a.includes("</think>")){let c=a.split("</think>"),d=c[0],e=c.slice(1).join("</think>");d&&l(b,f,d),m(b,f),b.inThinking=!1,a=e}if(b.inThinking&&a)return l(b,f,a),d;a&&(m(b,f),function(a,b,c,d){if(!a.msgItemAdded[c]){a.msgItemAdded[c]=!0;let d=`msg_${a.responseId}_${c}`;b("response.output_item.added",{type:"response.output_item.added",output_index:c,item:{id:d,type:j.Du.MESSAGE,content:[],role:j.z7.ASSISTANT}})}a.msgContentAdded[c]||(a.msgContentAdded[c]=!0,b("response.content_part.added",{type:"response.content_part.added",item_id:`msg_${a.responseId}_${c}`,output_index:c,content_index:0,part:{type:j.Du.OUTPUT_TEXT,annotations:[],logprobs:[],text:""}})),b("response.output_text.delta",{type:"response.output_text.delta",item_id:`msg_${a.responseId}_${c}`,output_index:c,content_index:0,delta:d,logprobs:[]}),a.msgTextBuf[c]||(a.msgTextBuf[c]=""),a.msgTextBuf[c]+=d}(b,f,h,a))}if(p.tool_calls&&p.tool_calls.length)for(let a of(m(b,f),n(b,f,h),p.tool_calls))!function(a,b,c){let d=c.index??0,e=c.id,f=c.function?.name;f&&(a.funcNames[d]=f),e&&(a.funcCallIds[d]=e);let g=a.funcCallIds[d];if(!a.funcItemAdded[d]&&g&&a.funcNames[d]){a.funcItemAdded[d]=!0;let c=o(a,a.funcNames[d]);b("response.output_item.added",{type:"response.output_item.added",output_index:d,item:{id:`${c?"ctc":"fc"}_${g}`,type:c?j.Du.CUSTOM_TOOL_CALL:j.Du.FUNCTION_CALL,...c?{input:""}:{arguments:""},call_id:g,name:a.funcNames[d]||""}})}if(a.funcArgsBuf[d]||(a.funcArgsBuf[d]=""),c.function?.arguments){let f=a.funcCallIds[d]||e;a.funcItemAdded[d]&&f&&!o(a,a.funcNames[d])&&b("response.function_call_arguments.delta",{type:"response.function_call_arguments.delta",item_id:`fc_${f}`,output_index:d,delta:c.function.arguments}),a.funcArgsBuf[d]+=c.function.arguments}}(b,f,a);if(g.finish_reason){for(let a in b.msgItemAdded)n(b,f,a);for(let a in m(b,f),b.funcCallIds)q(b,f,a);let a=b.targetFormat===e.h.OPENAI;b.responsesUsage||!a?s(b,f):b.completionPending=!0}return d}),(0,d.kz)(e.h.OPENAI_RESPONSES,e.h.OPENAI,null,v)},10263:(a,b,c)=>{c.d(b,{$j:()=>j,Ie:()=>h,VR:()=>g});var d=c(55511),e=c(35024);let f=new Map([["&"," and "],["\uD83E\uDD84"," unicorn "],["♥"," love "],["\xdf","ss"],["ẞ","Ss"],["\xe4","ae"],["\xc4","Ae"],["\xf6","oe"],["\xd6","Oe"],["\xfc","ue"],["\xdc","Ue"],["\xc6","AE"],["\xe6","ae"],["\xd8","O"],["\xf8","o"],["Œ","OE"],["œ","oe"],["\xd0","D"],["\xf0","d"],["Đ","D"],["đ","d"],["\xde","TH"],["\xfe","th"],["Ł","L"],["ł","l"],["ı","i"]]);function g(a){if(!a)return(0,d.randomUUID)();let b=(0,d.createHash)("sha256").update(String(a)).digest("hex"),c=(3&parseInt(b[16],16)|8).toString(16);return`${b.slice(0,8)}-${b.slice(8,12)}-4${b.slice(13,16)}-${c}${b.slice(17,20)}-${b.slice(20,32)}`}let h=process.cwd(),i=(function(a){let b="";for(let c of a)b+=f.get(c)??c;return b.normalize("NFD").replace(/[̀-ͯ]/g,"")})(String(h??"")).replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2").toLowerCase().replace(/[^a-z\d]+/g,"-").replace(/^-+|-+$/g,"");function j({apiKey:a,sessionId:b,accept:c}={}){let f={"Content-Type":"application/json",...e.xq.commandcode?.headers||{},"x-project-slug":i,"x-session-id":b||(0,d.randomUUID)()};return a&&(f.Authorization=`Bearer ${a}`),c&&(f.Accept=c),f}},19979:(a,b,c)=>{c.d(b,{C:()=>p,p:()=>m});var d=c(82380),e=c(14170),f=c(75924),g=c(74525),h=c(62842),i=c(29463),j=c(26922),k=c(43698),l=c(24);function m(a,b,c){let d=new Map,e=(0,l.getCapabilitiesForModel)(null,a).maxOutput||void 0,m={model:a,max_tokens:(0,g.M)(b,e),stream:c};void 0!==b.temperature&&(m.temperature=b.temperature),m.messages=[];let p=[];if(b.messages&&Array.isArray(b.messages)){let a;for(let a of b.messages)a.role===k.z7.SYSTEM&&p.push("string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n"));let c=b.messages.filter(a=>a.role!==k.z7.SYSTEM),e=[],f=()=>{a&&e.length>0&&(m.messages.push({role:a,content:e}),e=[])};for(let b of c){let c=b.role===k.z7.USER||b.role===k.z7.TOOL?k.z7.USER:k.z7.ASSISTANT,g=function(a,b=new Map){let c=[];if(a.role===k.z7.TOOL)c.push(n(a.tool_call_id,function(a){if(!Array.isArray(a))return a;let b=[];for(let c of a)if(c.type===k.x4.TEXT&&c.text)b.push({type:k.R4.TEXT,text:c.text});else if(c.type===k.x4.IMAGE_URL&&c.image_url&&c.image_url.url){let a=c.image_url.url,d=(0,i.W$)(a);d?b.push({type:k.R4.IMAGE,source:{type:"base64",media_type:d.mimeType,data:d.base64}}):(a.startsWith("http://")||a.startsWith("https://"))&&b.push({type:k.R4.IMAGE,source:{type:"url",url:a}})}else c.type===k.R4.IMAGE&&c.source&&b.push({type:k.R4.IMAGE,source:c.source});return b.length>0?b:a}(a.content),a));else if(a.role===k.z7.USER){if("string"==typeof a.content)a.content&&c.push({type:k.R4.TEXT,text:a.content});else if(Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_RESULT)c.push(n(b.tool_use_id,b.content,b));else if(b.type===k.x4.IMAGE_URL){let a=b.image_url.url,d=(0,i.W$)(a);d?c.push({type:k.R4.IMAGE,source:{type:"base64",media_type:d.mimeType,data:d.base64}}):(a.startsWith("http://")||a.startsWith("https://"))&&c.push({type:k.R4.IMAGE,source:{type:"url",url:a}})}else if(b.type===k.x4.IMAGE&&b.source)c.push({type:k.R4.IMAGE,source:b.source});else if(b.type===k.x4.FILE&&b.file){let a=b.file.file_data,d=(0,i.W$)(a);d&&"application/pdf"===d.mimeType&&c.push({type:k.R4.DOCUMENT,source:{type:"base64",media_type:d.mimeType,data:d.base64}})}}}else if(a.role===k.z7.ASSISTANT){if(Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_USE)c.push({type:k.R4.TOOL_USE,id:b.id,name:b.name,input:b.input});else if(b.type===k.R4.THINKING){let{cache_control:a,...d}=b;c.push(d)}}else if(a.content){let b="string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n");b&&c.push({type:k.R4.TEXT,text:b})}if(a.tool_calls&&Array.isArray(a.tool_calls)){for(let b of a.tool_calls)if(b.type===k.x4.FUNCTION){let a=""+b.function.name;c.push({type:k.R4.TOOL_USE,id:b.id,name:a,input:(0,h.N)(b.function.arguments,b.function.arguments)})}}}return c}(b,d),l=g.some(a=>a.type===k.R4.TOOL_USE);if(g.some(a=>a.type===k.R4.TOOL_RESULT)){let b=g.filter(a=>a.type===k.R4.TOOL_RESULT),d=g.filter(a=>a.type!==k.R4.TOOL_RESULT);f(),b.length>0&&m.messages.push({role:k.z7.USER,content:b}),d.length>0&&(a=c,e.push(...d));continue}a!==c&&(f(),a=c),e.push(...g),l&&f()}f();for(let a=m.messages.length-1;a>=0;a--){let b=m.messages[a];if(b.role===k.z7.ASSISTANT&&Array.isArray(b.content)&&b.content.length>0){let a=[k.R4.TEXT,k.R4.TOOL_USE,k.R4.TOOL_RESULT,k.R4.IMAGE];for(let c=b.content.length-1;c>=0;c--){let d=b.content[c];if(a.includes(d.type)){d.cache_control={type:"ephemeral"};break}}break}}}if(b.response_format){let a=b.response_format;if("json_schema"===a.type&&a.json_schema?.schema){let b=JSON.stringify(a.json_schema.schema,null,2);p.push(`You must respond with valid JSON that strictly follows this JSON schema:
|
|
2
|
+
\`\`\`json
|
|
3
|
+
${b}
|
|
4
|
+
\`\`\`
|
|
5
|
+
Respond ONLY with the JSON object, no other text.`)}else"json_object"===a.type&&p.push("You must respond with valid JSON. Respond ONLY with a JSON object, no other text.")}let q={type:k.R4.TEXT,text:f.Co};if(p.length>0){let a=p.join("\n");m.system=[q,{type:k.R4.TEXT,text:a,cache_control:{type:"ephemeral",ttl:"1h"}}]}else m.system=[q];if(b.tools&&Array.isArray(b.tools)){for(let a of(m.tools=[],b.tools)){let b=a.type;if(b&&b!==k.x4.FUNCTION){m.tools.push(a);continue}let c=a.function??a,e=c.name,f=""+e;d.set(f,e),m.tools.push({name:f,description:c.description||"",input_schema:c.parameters||c.input_schema||{type:"object",properties:{},required:[]}})}m.tools.length>0&&(m.tools[m.tools.length-1].cache_control={type:"ephemeral",ttl:"1h"})}return b.tool_choice&&(m.tool_choice=function(a){if(!a)return{type:"auto"};if("string"==typeof a)return"required"===a?{type:"any"}:{type:"auto"};if("object"==typeof a){if(a.function?.name)return{type:"tool",name:a.function.name};if(o.has(a.type))return a}return{type:"auto"}}(b.tool_choice)),d.size>0&&(m._toolNameMap=d),m}function n(a,b,c){return{type:k.R4.TOOL_RESULT,tool_use_id:a,content:b,is_error:!!c&&"object"==typeof c&&(!0===c.is_error||"error"===c.status)}}let o=new Set(["auto","any","tool","none"]);function p(a,b,c){let d=m(a,b,c);return d.system&&Array.isArray(d.system)&&(d.system=d.system.filter(a=>!a.text||!a.text.includes("You are Claude Code")),0===d.system.length&&delete d.system),d.tools&&Array.isArray(d.tools)&&(d.tools=d.tools.map(a=>a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a)),d.messages&&Array.isArray(d.messages)&&(d.messages=d.messages.map(a=>{if(!a.content||!Array.isArray(a.content))return a;let b=a.content.map(a=>a.type===k.R4.TOOL_USE&&a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a);return{...a,content:b}})),d}(0,d.kz)(e.h.OPENAI,e.h.CLAUDE,m,null)},29463:(a,b,c)=>{c.d(b,{$q:()=>g,W$:()=>i,ni:()=>k});var d=c(71553),e=c(9956),f=c(76924);function g(a,b){return`data:${a};base64,${b}`}let h=/^data:([^;]+);base64,([\s\S]+)$/;function i(a){if("string"!=typeof a)return null;let b=a.match(h);return b?{mimeType:b[1],base64:b[2]}:null}async function j(a){if(!a||f.Xc.has(a.toLowerCase()))return null;try{let b=await (0,d.lookup)(a,{all:!0});if(!b.length||b.some(a=>(function(a){if(!a||"::1"===a||a.startsWith("fc")||a.startsWith("fd")||a.startsWith("fe80"))return!0;let b=(a.includes(".")?a.split(":").pop():a).split(".").map(a=>Number.parseInt(a,10));if(4!==b.length||b.some(a=>Number.isNaN(a)))return!a.includes(":");let[c,d]=b;return 10===c||127===c||0===c||172===c&&d>=16&&d<=31||192===c&&168===d||169===c&&254===d||100===c&&d>=64&&d<=127||!1})(a.address)))return null;return b}catch{return null}}async function k(a,b={}){let c,{signal:d,timeoutMs:g=f.MT,maxBytes:h=f.J5}=b;if(!a||!a.startsWith("http://")&&!a.startsWith("https://"))return null;try{c=new URL(a)}catch{return null}let i=await j(c.hostname);if(!i)return null;let l=new AbortController,m=d?null:setTimeout(()=>l.abort(),g),n=d||l.signal,o=new e.Agent({connect:{lookup:(a,b,c)=>c(null,[{address:i[0].address,family:i[0].family}])}});try{let b=await fetch(a,{signal:n,redirect:"manual",dispatcher:o});if(!b.ok||!b.body)return null;let c=b.body.getReader(),d=[],e=0;for(;;){let{done:a,value:b}=await c.read();if(a)break;if((e+=b.length)>h){try{await c.cancel()}catch{}return null}d.push(b)}let g=Buffer.concat(d.map(a=>Buffer.from(a))),i=function(a){for(let{sig:b,offset:c,mime:d,verifyWebp:e}of f.Yv){if(a.length<c+b.length)continue;let f=!0;for(let d=0;d<b.length;d++)if(a[c+d]!==b[d]){f=!1;break}if(f&&(!e||a.length>=12&&87===a[8]&&69===a[9]&&66===a[10]&&80===a[11]))return d}return null}(g);if(!i)return null;return{url:`data:${i};base64,${g.toString("base64")}`,mimeType:i}}catch{return null}finally{m&&clearTimeout(m),o.close().catch(()=>{})}}},29675:(a,b,c)=>{c.d(b,{P:()=>l});var d=c(82380),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(44236);function k(a,b,c=null){return(0,g.k)({id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model},b,c)}function l(a,b){if(!a)return null;let c=[];switch(a.type){case"message_start":{b.messageId=a.message?.id||`msg_${Date.now()}`,b.model=a.message?.model,b.toolCallIndex=0;let d=a.message?.usage;if(d&&"object"==typeof d){let a="number"==typeof d.input_tokens?d.input_tokens:0,c="number"==typeof d.cache_read_input_tokens?d.cache_read_input_tokens:0,e="number"==typeof d.cache_creation_input_tokens?d.cache_creation_input_tokens:0,f=a+c+e;b.usage={prompt_tokens:f,completion_tokens:0,total_tokens:f,input_tokens:a,output_tokens:0},c>0&&(b.usage.cache_read_input_tokens=c),e>0&&(b.usage.cache_creation_input_tokens=e)}c.push(k(b,{role:f.z7.ASSISTANT}));break}case"content_block_start":{let d=a.content_block;if(d?.type==="server_tool_use"){b.serverToolBlockIndex=a.index;break}if(d?.type===f.R4.TEXT)b.textBlockStarted=!0;else if(d?.type===f.R4.TOOL_USE){let e=b.toolCallIndex++,g=b.toolNameMap?.get(d.name)||d.name,h={index:e,id:d.id,type:f.x4.FUNCTION,function:{name:g,arguments:""}};b.toolCalls.set(a.index,h),c.push(k(b,{tool_calls:[h]}))}break}case"content_block_delta":{if(a.index===b.serverToolBlockIndex)break;let d=a.delta;if(d?.type==="text_delta"&&d.text)c.push(k(b,{content:d.text}));else if(d?.type==="thinking_delta"&&d.thinking)c.push(k(b,(0,i.B7)(d.thinking)));else if(d?.type==="input_json_delta"&&d.partial_json){let e=b.toolCalls.get(a.index);e&&(e.function.arguments+=d.partial_json,c.push(k(b,{tool_calls:[{index:e.index,id:e.id,function:{arguments:d.partial_json}}]})))}break}case"content_block_stop":if(a.index===b.serverToolBlockIndex){b.serverToolBlockIndex=-1;break}b.textBlockStarted=!1,b.thinkingBlockStarted=!1;break;case"message_delta":if(a.usage&&"object"==typeof a.usage){let c=b.usage||{},d="number"==typeof a.usage.input_tokens?a.usage.input_tokens:c.input_tokens||0,e="number"==typeof a.usage.output_tokens?a.usage.output_tokens:0,f="number"==typeof a.usage.cache_read_input_tokens?a.usage.cache_read_input_tokens:c.cache_read_input_tokens||0,g="number"==typeof a.usage.cache_creation_input_tokens?a.usage.cache_creation_input_tokens:c.cache_creation_input_tokens||0,h=d+f+g;b.usage={prompt_tokens:h,completion_tokens:e,total_tokens:h+e,input_tokens:d,output_tokens:e},f>0&&(b.usage.cache_read_input_tokens=f),g>0&&(b.usage.cache_creation_input_tokens=g)}if(a.delta?.stop_reason){b.finishReason=m(a.delta.stop_reason);let d="refusal"===a.delta.stop_reason&&a.delta.stop_details?.explanation;d&&c.push(k(b,{content:d}));let e=k(b,{},b.finishReason);b.usage&&(e.usage=(0,h.B)({input_tokens:b.usage.input_tokens||0,output_tokens:b.usage.output_tokens||0,cache_read_input_tokens:b.usage.cache_read_input_tokens,cache_creation_input_tokens:b.usage.cache_creation_input_tokens},"claude")),c.push(e),b.finishReasonSent=!0}break;case"message_stop":if(!b.finishReasonSent){let a=b.finishReason||(b.toolCalls?.size>0?f.bC.TOOL_CALLS:f.bC.STOP),d=b.usage&&"object"==typeof b.usage?{usage:{prompt_tokens:b.usage.input_tokens||0,completion_tokens:b.usage.output_tokens||0,total_tokens:(b.usage.input_tokens||0)+(b.usage.output_tokens||0)}}:{};c.push({...k(b,{},a),...d}),b.finishReasonSent=!0}}return c.length>0?c:null}let m=a=>(0,j.F)(a,"claude");(0,d.kz)(e.h.CLAUDE,e.h.OPENAI,null,l)},32271:(a,b,c)=>{c.d(b,{k:()=>d});function d({id:a,created:b,model:c},e,f=null){return{id:a,object:"chat.completion.chunk",created:b,model:c,choices:[{index:0,delta:e,finish_reason:f}]}}},32546:(a,b,c)=>{c.d(b,{o:()=>o});var d=c(82380),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(29463),k=c(44236),l=c(71782);function m(a){return{id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model}}function n(a,b,c=null){let d=a.name,e=b.toolNameMap?.get(d)||d,h=a.args||{},i=b.functionIndex++,j=a.id||`${e}-${Date.now()}-${i}`;c&&(0,l.Sk)(j,c,b.sessionId,b.model);let k={id:j,index:i,type:f.x4.FUNCTION,function:{name:e,arguments:JSON.stringify(h)}};return b.geminiToolCallCount=(b.geminiToolCallCount||0)+1,(0,g.k)(m(b),{tool_calls:[k]},null)}function o(a,b){if(!a)return null;let c=a.response||a;if(!c||!c.candidates?.[0])return null;let d=[],e=c.candidates[0],l=e.content;if(b.messageId||(b.messageId=c.responseId||`msg_${Date.now()}`,b.model=c.modelVersion||b.model||"gemini",b.functionIndex=0,b.geminiToolCallCount=0,d.push((0,g.k)(m(b),{role:f.z7.ASSISTANT},null))),l?.parts)for(let a of l.parts){let c=a.thoughtSignature||a.thought_signature;c&&"string"==typeof c&&(b.pendingThoughtSignature=c);let e=!0===a.thought;if(c){let f=void 0!==a.text&&""!==a.text,h=!!a.functionCall;if(!f&&!h)continue;f&&d.push((0,g.k)(m(b),e?(0,i.B7)(a.text):{content:a.text},null)),h&&(d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null);continue}if(void 0!==a.text&&""!==a.text&&d.push((0,g.k)(m(b),e?(0,i.B7)(a.text):{content:a.text},null)),a.functionCall){let c=b.pendingThoughtSignature||null;d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null}let h=a.inlineData||a.inline_data;if(h?.data){let a=h.mimeType||h.mime_type||f.BY;d.push((0,g.k)(m(b),{images:[{type:f.x4.IMAGE_URL,image_url:{url:(0,j.$q)(a,h.data)}}]},null))}}let o=c.usageMetadata||a.usageMetadata,p=(0,h.B)(o,"gemini");if(p&&(b.usage=p),e.finishReason){let a=(0,k.F)(e.finishReason,"gemini");a===f.bC.STOP&&b.geminiToolCallCount>0&&(a=f.bC.TOOL_CALLS);let c=(0,g.k)(m(b),{},a);b.usage&&(c.usage=b.usage),d.push(c),b.finishReason=a}return d.length>0?d:null}(0,d.kz)(e.h.GEMINI,e.h.OPENAI,null,o),(0,d.kz)(e.h.GEMINI_CLI,e.h.OPENAI,null,o),(0,d.kz)(e.h.ANTIGRAVITY,e.h.OPENAI,null,o),(0,d.kz)(e.h.VERTEX,e.h.OPENAI,null,o)},34097:(a,b,c)=>{function d({promptTokens:a,completionTokens:b,totalTokens:c,cachedTokens:e=0,cacheCreationTokens:f=0,reasoningTokens:g=0}){let h={prompt_tokens:a,completion_tokens:b,total_tokens:c};return(e>0||f>0)&&(h.prompt_tokens_details={},e>0&&(h.prompt_tokens_details.cached_tokens=e),f>0&&(h.prompt_tokens_details.cache_creation_tokens=f)),g>0&&(h.completion_tokens_details={reasoning_tokens:g}),h}c.d(b,{B:()=>g,c:()=>d});let e=a=>"number"==typeof a?a:0,f={claude(a){let b=e(a.input_tokens),c=e(a.output_tokens),d=e(a.cache_read_input_tokens),f=e(a.cache_creation_input_tokens),g=b+d+f;return{promptTokens:g,completionTokens:c,totalTokens:g+c,cachedTokens:d,cacheCreationTokens:f}},gemini(a){let b=e(a.cachedContentTokenCount),c=e(a.promptTokenCount),d=e(a.thoughtsTokenCount),f=e(a.totalTokenCount),g=e(a.candidatesTokenCount);return 0===g&&f>0&&(g=f-c-d)<0&&(g=0),{promptTokens:c,completionTokens:g+d,totalTokens:f,cachedTokens:b,reasoningTokens:d}},kiro(a){let b=e(a.inputTokens),c=e(a.outputTokens),d=e(a.cache_read_input_tokens)||e(a.cachedTokens)||e(a.cached_tokens),f=e(a.cache_creation_input_tokens),g={promptTokens:b,completionTokens:c,totalTokens:b+c};return d>0&&(g.cachedTokens=d),f>0&&(g.cacheCreationTokens=f),g},ollama(a){let b=e(a.prompt_eval_count),c=e(a.eval_count);return{promptTokens:b,completionTokens:c,totalTokens:b+c,cachedTokens:e(a.prompt_eval_cached_count)}},commandcode(a){let b=e(a.inputTokens),c=e(a.outputTokens),d="number"==typeof a.totalTokens?a.totalTokens:b+c;return{promptTokens:b,completionTokens:c,totalTokens:d,cachedTokens:e(a.inputTokenDetails?.cacheReadTokens),cacheCreationTokens:e(a.inputTokenDetails?.cacheWriteTokens)}}};function g(a,b){let c=f[b];return c&&a&&"object"==typeof a?d(c(a)):null}},39536:(a,b,c)=>{c.d(b,{c:()=>x});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024),h=c(75924),i=c(41004),j=c(80662),k=c(39609),l=c(26922),m=c(96281),n=c(71782);let o=/^agent\/[^/]+\/\d+\/[^/]+\/\d+$/,p=[/high\s+traffic/i,/agent\s+(execution\s+)?terminated\s+due\s+to\s+error/i,/capacity/i,/temporarily\s+unavailable/i,/timeout/i,/stream\s+(ended|closed|terminated|interrupted)/i,/empty\s+response/i],q=new Set([i.gx.SERVER_ERROR,i.gx.BAD_GATEWAY,i.gx.SERVICE_UNAVAILABLE,i.gx.GATEWAY_TIMEOUT]),r=["output_config","thinking","reasoning_effort","reasoning","enable_thinking","thinking_budget","thinkingConfig"],s=a=>{for(let b of r)delete a[b]},t=[/image/i,/imagen/i,/image-generation/i];function u(a){return!!a&&t.some(b=>b.test(a))}function v(a){let b=e().createHash("sha256").update(String(a||"antigravity")).digest().subarray(0,16);b[6]=15&b[6]|80,b[8]=63&b[8]|128;let c=b.toString("hex");return`${c.slice(0,8)}-${c.slice(8,12)}-${c.slice(12,16)}-${c.slice(16,20)}-${c.slice(20)}`}function w({body:a,request:b,credentials:c,model:d,requestType:e}){if(o.test(a?.requestId||""))return a.requestId;let f=b?.sessionId||a?.request?.sessionId||c?._clientSessionId||c?.connectionId||c?.email||"anonymous",g=v(`antigravity:conversation:${f}`),h=v(`antigravity:trajectory:${f}:${d}:${e}`),i=Math.max(1,2*(Array.isArray(b?.contents)?b.contents.length:1)-1);return`agent/${g}/${Date.now()}/${h}/${i}`}class x extends f.H{constructor(){super("antigravity",g.xq.antigravity)}parseError(a,b){if((429===a.status||409===a.status)&&b)try{let c=JSON.parse(b),d=c?.error,e=null;for(let a of Array.isArray(d?.details)?d.details:[]){if(a?.metadata?.quotaResetTimeStamp){let b=new Date(a.metadata.quotaResetTimeStamp).getTime();if(!isNaN(b)&&b>Date.now()){e=b;break}}if("string"==typeof a?.retryDelay){let b=parseFloat(a.retryDelay);if(!isNaN(b)&&b>0){let a=Date.now()+Math.round(1e3*b);if(a>Date.now()){e=a;break}}}}if(e)return{status:a.status,message:d?.message||b,resetsAtMs:e}}catch{}return super.parseError(a,b)}buildUrl(a,b,c=0){let d=this.getBaseUrls(),e=d[c]||d[0],f=u(a);return`${e}/v1internal:${b&&!f?"streamGenerateContent?alt=sse":"generateContent"}`}buildHeaders(a,b=!0,c=null){return{"Content-Type":"application/json",Authorization:`Bearer ${a.accessToken}`,"User-Agent":this.config.headers?.["User-Agent"]||h.K["User-Agent"]}}transformRequest(a,b,c,d){let e=d?.projectId||this.generateProjectId();if(!0!==c&&delete b.stream_options,u(a)){let c=function(a){let b={aspectRatio:"1:1"},c=a.match(/(\d+)x(\d+)$/);if(c){let a=parseInt(c[1]),d=parseInt(c[2]);if(a<=16&&d<=16)b.aspectRatio=`${a}:${d}`;else{let c=(a,b)=>b?c(b,a%b):a,e=c(a,d);b.aspectRatio=`${a/e}:${d/e}`}}return b}(a),f=a.replace(/-(\d+)x(\d+)$/,""),g=[];for(let a of b.request?.contents||b.contents||[]){let b=(a.parts||[]).flatMap(a=>void 0!==a.text?[{text:a.text}]:a.inlineData?.data?[{inlineData:a.inlineData}]:[]);b.length>0&&g.push({role:a.role||"user",parts:b})}let h=(0,j.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.email||d?.connectionId,scope:"antigravity"});this._lastSessionId=h;let i={contents:g,generationConfig:{temperature:1,topP:.95,topK:40,maxOutputTokens:8192,imageConfig:c},sessionId:h};return{project:e,model:f,userAgent:"antigravity",requestType:"image_gen",requestId:w({body:b,request:i,credentials:d,model:f,requestType:"image_gen"}),request:i}}let f=b.request?.sessionId||(0,j.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.email||d?.connectionId,scope:"antigravity"}),g=(0,j.E9)(f)||f,i=(b.request?.contents||[]).map(c=>{let d=c.role;c.parts?.some(a=>a.functionResponse)&&(d="user");let e=c.parts?.filter(a=>(!a.thought||!!a.functionCall)&&(!a.thoughtSignature||!!a.functionCall||!!a.text)),f=!1,h=e?.map(c=>{if(!c.functionCall)return c;let d=c.functionCall.id,e=d?(0,n.el)(d,g,b.model||a):null,h=c.thoughtSignature||e||(f?void 0:m.bf);if(f=!0,h)return{...c,thoughtSignature:h};if(c.thoughtSignature&&!e){let{thoughtSignature:a,...b}=c;return b}return c});return{...c,role:d,parts:h||e||[]}}),k=(0,l.$J)(i,a),o=b.request?.tools;if(o&&o.length>0){let a=new Set,b=[];for(let c of o)for(let d of c.functionDeclarations||[]){let c=function(a){if(!a)return"_unknown";let b=a.replace(/[^a-zA-Z0-9_.:\-]/g,"_");return/^[a-zA-Z_]/.test(b)||(b="_"+b),b.substring(0,64)}(d.name);a.has(c)||(a.add(c),b.push({...d,name:c,parameters:d.parameters?(0,l.Yr)(structuredClone(d.parameters)):{type:"object",properties:{reason:{type:"string",description:"Brief explanation"}},required:["reason"]}}))}o=b.length>0?[{functionDeclarations:b}]:[]}let{tools:p,toolConfig:q,...r}=b.request||{};if(s(r),r.systemInstruction?.parts){for(let a of r.systemInstruction.parts)if("string"==typeof a.text)for(let{from:b,to:c}of h.iO)a.text=a.text.replaceAll(b,c)}let t={...r.generationConfig||{}};t.maxOutputTokens>64e3&&(t.maxOutputTokens=64e3);let v={...r,generationConfig:t,...k&&{contents:k},...o&&{tools:o},sessionId:g,safetySettings:void 0,...o?.length>0&&{toolConfig:{functionCallingConfig:{mode:"VALIDATED"}}}};return s(b),this._lastSessionId=v.sessionId,delete b.requestType,{...b,project:e,model:b.model||a,userAgent:"antigravity",requestId:w({body:b,request:v,credentials:d,model:a,requestType:"agent"}),request:v}}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;try{let d=await (0,k.proxyAwareFetch)(h.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","Antigravity refreshed"),{accessToken:e.access_token,refreshToken:e.refresh_token||a.refreshToken,expiresIn:e.expires_in,projectId:a.projectId}}catch(a){return b?.error?.("TOKEN",`Antigravity refresh error: ${a.message}`),null}}generateProjectId(){let a=["useful","bright","swift","calm","bold"][Math.floor(5*Math.random())],b=["fuze","wave","spark","flow","core"][Math.floor(5*Math.random())];return`${a}-${b}-${e().randomUUID().slice(0,5)}`}generateSessionId(){return e().randomUUID()+Date.now().toString()}parseRetryHeaders(a){if(!a?.get)return null;let b=a.get("retry-after");if(b){let a=parseInt(b,10);if(!isNaN(a)&&a>0)return 1e3*a;let c=new Date(b);if(!isNaN(c.getTime())){let a=c.getTime()-Date.now();return a>0?a:null}}let c=a.get("x-ratelimit-reset-after");if(c){let a=parseInt(c,10);if(!isNaN(a)&&a>0)return 1e3*a}let d=a.get("x-ratelimit-reset");if(d){let a=1e3*parseInt(d,10)-Date.now();return a>0?a:null}return null}parseRetryFromErrorMessage(a){if(!a||"string"!=typeof a)return null;let b=a.match(/reset after (\d+h)?(\d+m)?(\d+s)?/i);if(!b)return null;let c=0;return b[1]&&(c+=3600*parseInt(b[1])*1e3),b[2]&&(c+=60*parseInt(b[2])*1e3),b[3]&&(c+=1e3*parseInt(b[3])),c>0?c:null}extractErrorMessage(a,b=""){return[a?.error?.message,a?.message,a?.error,b].filter(Boolean).map(a=>"string"==typeof a?a:JSON.stringify(a)).join("\n")}isTransientAntigravityError(a,b){return!!(a===i.gx.RATE_LIMITED||q.has(a))||p.some(a=>a.test(b||""))}async computeRetryDelay(a,b){let c="",d=null,e=this.parseRetryHeaders(a.headers);try{d=(c=await a.clone().text())?JSON.parse(c):null}catch{}let f=this.extractErrorMessage(d,c);return(e||(e=this.parseRetryFromErrorMessage(f)),e)?e<=1e4&&e:!!this.isTransientAntigravityError(a.status,f)&&Math.min(1e3*2**b,a.status===i.gx.RATE_LIMITED?1e4:15e3)}static cloakTools(a,b=null){let c=a.request?.tools;if(!c||0===c.length)return{cloakedBody:a,toolNameMap:null};let d="github-copilot"===b,e=new Map,f=[],g=new Set(y.map(a=>a.name));for(let a of c)if(a.functionDeclarations)for(let b of a.functionDeclarations){if(d&&h.J5.has(b.name)||d&&g.has(b.name))continue;if(h.J5.has(b.name)){f.push(b);continue}let a=`${b.name}${h.QH}`;e.set(a,b.name),f.push({...b,name:a})}let i=[],j=new Set;for(let a of[...f,...y])!a?.name||j.has(a.name)||(j.add(a.name),i.push(a));let k=a.request?.contents?.map(a=>{if(!a.parts)return a;let b=a.parts.map(a=>a.functionCall&&!h.J5.has(a.functionCall.name)?{...a,functionCall:{...a.functionCall,name:`${a.functionCall.name}${h.QH}`}}:a.functionResponse&&!h.J5.has(a.functionResponse.name)?{...a,functionResponse:{...a.functionResponse,name:`${a.functionResponse.name}${h.QH}`}}:a);return{...a,parts:b}});return{cloakedBody:{...a,request:{...a.request,tools:[{functionDeclarations:i}],contents:k||a.request.contents}},toolNameMap:e}}}let y=[{name:"browser_subagent",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"command_status",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"find_by_name",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"generate_image",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"grep_search",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"list_dir",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"list_resources",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"mcp_sequential-thinking_sequentialthinking",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"multi_replace_file_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"notify_user",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_resource",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_terminal",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_url_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"replace_file_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"run_command",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"search_web",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"send_command_input",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"task_boundary",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"view_content_chunk",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"view_file",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"write_to_file",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}}]},39551:(a,b,c)=>{c.d(b,{_:()=>m});var d=c(82380),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(17242),j=c(44236);function k(a){return(0,h.B)(a,"ollama")}function l(a){return a.map((a,b)=>({index:a.function?.index??b,id:a.id||(0,i.eG)(b),type:f.x4.FUNCTION,function:{name:a.function?.name||"",arguments:"string"==typeof a.function?.arguments?a.function.arguments:JSON.stringify(a.function?.arguments||{})}}))}function m(a){let b=a.message||{},c=b.content||"",d=b.thinking||"",e=Array.isArray(b.tool_calls)?b.tool_calls:[],g={role:f.z7.ASSISTANT};c&&(g.content=c),d&&(g.reasoning_content=d),e.length>0&&(g.tool_calls=l(e)),g.content||g.tool_calls||(g.content="");let h=(0,j.F)(a.done_reason,"ollama");return e.length>0&&(h=f.bC.TOOL_CALLS),{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:a.model||"ollama",choices:[{index:0,message:g,finish_reason:h}],usage:k(a)}}(0,d.kz)(e.h.OLLAMA,e.h.OPENAI,null,function(a,b){if(!a||"object"!=typeof a)return null;b.ollama||(b.ollama={id:`chatcmpl-${Date.now()}`,created:Math.floor(Date.now()/1e3),model:a.model||b.model});let{id:c,created:d,model:e}=b.ollama;if(a.done){let h=k(a),i=(0,j.F)(a.done_reason,"ollama");(a.done_reason===f.bC.TOOL_CALLS||b.hadToolCalls)&&(i=f.bC.TOOL_CALLS);let l=(0,g.k)({id:c,created:d,model:e},{},i);return l.usage=h,l}let h=a.message;if(!h)return null;let i="string"==typeof h.content?h.content:"",m="string"==typeof h.thinking?h.thinking:"",n=Array.isArray(h.tool_calls)?h.tool_calls:null;if(!i&&!m&&!n)return null;i&&(b.accumulatedContent=(b.accumulatedContent||"")+i),m&&(b.accumulatedThinking=(b.accumulatedThinking||"")+m);let o={};return i&&(o.content=i),m&&(o.reasoning_content=m),n&&(b.hadToolCalls=!0,o.tool_calls=l(n)),(0,g.k)({id:c,created:d,model:e},o,null)})},44090:(a,b,c)=>{c.d(b,{B7:()=>e,Vi:()=>g,Wy:()=>f});var d=c(43698);function e(a,b=!1){return b?{role:d.z7.ASSISTANT,reasoning_content:a}:{reasoning_content:a}}function f(a){if(!a||"object"!=typeof a||"string"==typeof a.reasoning_content&&a.reasoning_content)return a;let b=g(a);return b?{...a,reasoning_content:b}:a}function g(a){if(!a||"object"!=typeof a)return"";if("string"==typeof a.reasoning_content&&a.reasoning_content)return a.reasoning_content;if("string"==typeof a.reasoning&&a.reasoning)return a.reasoning;let b=a.reasoning_details;return Array.isArray(b)?b.map(a=>"string"==typeof a?a:a?.text||a?.content||"").join(""):""}},47723:(a,b,c)=>{c.d(b,{H:()=>n});var d=c(82380),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(17242),k=c(44236);function l(a,b,c=null){return(0,g.k)({id:a.responseId,created:a.created,model:a.model},b,c)}let m=a=>(0,k.F)(a,"commandcode");function n(a,b){var c;if(!a)return null;if(a&&"object"==typeof a&&"chat.completion.chunk"===a.object)return a;let d=a;if("string"==typeof a){let b=a.trim();if(!b)return null;let c=b.startsWith("data:")?b.slice(5).trim():b;if(!c||"[DONE]"===c)return null;try{d=JSON.parse(c)}catch{return null}}if(!d||"object"!=typeof d||!d.type)return null;c=d.model,b.responseId||(b.responseId=`chatcmpl-${Date.now()}`,b.created=Math.floor(Date.now()/1e3),b.model=b.model||c||"commandcode",b.chunkIndex=0,b.toolIndex=0,b.toolIndexById=new Map,b.openTools=new Set,b.openText=!1,b.finishReason=null,b.usage=null);let e=[];switch(d.type){case"text-delta":{let a=d.text||d.delta||"";if(!a)break;let c=0===b.chunkIndex?{role:f.z7.ASSISTANT,content:a}:{content:a};b.chunkIndex++,b.openText=!0,e.push(l(b,c));break}case"reasoning-delta":{let a=d.text||"";if(!a)break;let c=(0,i.B7)(a,0===b.chunkIndex);b.chunkIndex++,e.push(l(b,c));break}case"tool-input-start":{let a=d.id||d.toolCallId||(0,j.eG)(b.toolIndex),c=b.toolIndexById.get(a);null==c&&(c=b.toolIndex++,b.toolIndexById.set(a,c)),b.openTools.add(a);let g={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:""}}]};b.chunkIndex++,e.push(l(b,g));break}case"tool-input-delta":{let a=d.id||d.toolCallId,c=b.toolIndexById.get(a);if(null==c)break;let f={tool_calls:[{index:c,function:{arguments:d.delta||d.inputTextDelta||""}}]};e.push(l(b,f));break}case"tool-call":{let a=d.toolCallId;if(b.toolIndexById.has(a))break;let c=b.toolIndex++;b.toolIndexById.set(a,c);let g="string"==typeof d.input?d.input:JSON.stringify(d.input??{}),h={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:g}}]};b.chunkIndex++,e.push(l(b,h));break}case"finish-step":b.finishReason=m(d.finishReason),d.usage&&(b.usage=d.usage);break;case"finish":{let a=b.finishReason||m(d.finishReason||"stop"),c=l(b,{},a),f=d.totalUsage||b.usage,g=(0,h.B)(f,"commandcode");g&&(c.usage=g),e.push(c);break}case"error":{let a=d.error??d.message??"unknown",b="string"==typeof a?a:JSON.stringify(a);throw Error(`[CommandCode error: ${b}]`)}}return e.length?e:null}(0,d.kz)(e.h.COMMANDCODE,e.h.OPENAI,null,n)},53468:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(38522);let e="function"==typeof(c.n(d))().createZstdDecompress?"gzip, deflate, br, zstd":"gzip, deflate, br"},60210:(a,b,c)=>{c.d(b,{HR:()=>function a(b,c){if(!c?.size||!b)return b;if(Array.isArray(b))return b.map(b=>a(b,c));if("object"!=typeof b)return b;let d=b,e=(a,c)=>{d===b&&(d={...b}),d[a]=c};if("content_block_start"===b.type){let a=b.content_block;a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)&&e("content_block",{...a,name:c.get(a.name)})}Array.isArray(b.content)&&e("content",b.content.map(a=>a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(b.choices)&&e("choices",b.choices.map(a=>{let b=!1,d={...a};for(let e of["delta","message"]){let f=a?.[e];if(!f||!Array.isArray(f.tool_calls)||0===f.tool_calls.length)continue;let g=f.tool_calls.map(a=>{let d=a?.function?.name;return"string"==typeof d&&c.has(d)?(b=!0,{...a,function:{...a.function,name:c.get(d)}}):a});d[e]={...f,tool_calls:g}}return b?d:a})),Array.isArray(b.output)&&e("output",b.output.map(a=>a?.type==="function_call"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a));let f=b.item;return f?.type==="function_call"&&"string"==typeof f.name&&c.has(f.name)&&e("item",{...f,name:c.get(f.name)}),d},Ke:()=>x,g4:()=>y});var d=c(48161),e=c.n(d),f=c(76760),g=c.n(f);let h=["read","shell"],i=/terminal/i,j="run_command",k={read:{description:"Read the contents of a file or directory. Supports text files, images, and PDFs. Images and PDFs are presented directly to the model. Each text line is prefixed by its 1-based line number as <line>: <content>. The prefix is for reference and is not part of the file content. Directory entries are returned one per line. Use offset and limit to read large files or directories in sections. Prefer one larger read over many small slices, and use grep to find specific content in large files.",parameters:{type:"object",properties:{path:{type:"string",description:"File or directory to read"},offset:{type:"integer",minimum:0,description:"The line or directory entry to start reading from (1-based)"},limit:{type:"integer",minimum:0,description:"The maximum number of lines or directory entries to read (defaults to and capped at 2000)"}},required:["path"],additionalProperties:!1}},shell:{description:"Execute a shell command and return its output. Commands run on Linux using bash. Quote file paths containing spaces or special characters. Prefer dedicated tools over shell commands when possible. When output is large, the full result is saved to a file and a truncated preview is returned. Rely on automatic truncation unless filtering the output is more useful. Commands accept an optional timeout, background commands have no timeout by default. Background commands return immediately, and you will be notified when they complete.",parameters:{type:"object",properties:{command:{type:"string",description:"Shell command string to execute"},workdir:{type:"string",description:"Working directory to execute the command in. Defaults to the current working directory. When possible, avoid changing directories in the command and set the working directory here instead."},timeout:{type:"integer",minimum:0,description:"Timeout in milliseconds. Set to 0 to disable the timeout. Defaults to 120000 for foreground commands. Background commands have no timeout by default."},background:{type:"boolean",description:"Run the command in the background and return immediately (useful for dev servers and long-running builds). You do not need to use '&' at the end of the command when using this parameter. You will be notified when it completes. DO NOT poll for completion."}},required:["command"],additionalProperties:!1}}},l=new WeakMap;function m(a){let b=String(a??"").trim();return h.includes(b)?b:""}function n(a){if(!a||"object"!=typeof a||Array.isArray(a))return"";if("string"==typeof a.name&&a.name.trim())return a.name.trim();let b=a.function;return b&&"object"==typeof b&&!Array.isArray(b)&&"string"==typeof b.name?b.name.trim():""}function o(a){let b=a?.function;return b&&"object"==typeof b&&!Array.isArray(b)?b:null}function p(a,b){let c=o(a);return c?{...a,function:{...c,name:b}}:{...a,name:b}}function q(a){return new Map([...a].map(([a,b])=>[b,a]))}let r="<env>",s=g().join(e().tmpdir(),"opencode"),t=process.cwd(),u=["Here is some useful information about the environment you are running in:",r,` Working directory: ${t}`,` Workspace root folder: ${t}`," Is directory a git repo: no",` Platform: ${process.platform}`,` Prefer ${s} over generic system temporary directories such as /tmp; it is pre-created and approved for external access.`,"</env>"].join("\n");function v(a){return"string"==typeof a?a.includes(r):!!Array.isArray(a)&&a.some(a=>"string"==typeof a?.text&&a.text.includes(r))}function w(a,b){if("string"==typeof a)return a.trim()?`${a}
|
|
6
|
+
|
|
7
|
+
${b}`:b;let c=Array.isArray(a)?[...a]:[];for(let a=c.length-1;a>=0;a--){let d=c[a];if("string"==typeof d?.text){let e=d.text.trim();return c[a]={...d,text:e?`${d.text}
|
|
8
|
+
|
|
9
|
+
${b}`:b},c}}return[...c,{type:"text",text:b}]}function x(a,b,{claude:c=!1}={}){var d,e;if(!a||"object"!=typeof a)return new Map;let{tools:f,map:g}=function(a){let b=new Map;if(!Array.isArray(a)||0===a.length)return{tools:a,map:b};let c=new Set(a.map(n)),d=new Set,e=[];for(let f of a){if(!f||"object"!=typeof f||Array.isArray(f)){e.push(f);continue}let a=n(f);if(i.test(a)){let d=j;for(let a=2;c.has(d);a++)d=`${j}${a}`;c.add(d),b.set(d,a),e.push(p(f,d));continue}let g=m(a);if(!g){e.push(f);continue}if(d.has(g))continue;if(d.add(g),function(a,b){let c=a&&(o(a)||a),d=k[b];return!!c&&c.description===d.description&&JSON.stringify(c.parameters)===JSON.stringify(d.parameters)}(f,g)){e.push(f);continue}if(function(a,b){let c=a&&(o(a)||a),d=c?.parameters?.properties;if(!d||"object"!=typeof d||Array.isArray(d))return!1;let e=Object.keys(k[b].parameters.properties||{}),f=Object.keys(d);return!f.some(a=>!e.includes(a))&&k[b].parameters.required.every(a=>f.includes(a))}(f,g)){e.push(function(a,b){let{description:c,parameters:d}=k[b],e=o(a);return e?{...a,function:{...e,description:c,parameters:d}}:{...a,description:c,parameters:d}}(f,g));continue}let h=`${g}_client`;for(let a=2;c.has(h);a++)h=`${g}_client${a}`;c.add(h),b.set(h,g),e.push(p(f,h))}return{tools:e,map:b}}(a.tools);a.tools=Array.isArray(f)?f:[];let r=function(a,b){let c=[];if(!Array.isArray(a))return c;for(let d of h){if(a.some(a=>m(n(a))===d))continue;let{description:e,parameters:f}=k[d];a.push(b?{type:"function",name:d,description:e,parameters:f,strict:!1}:{type:"function",function:{name:d,description:e,parameters:f}}),c.push(d)}return c}(a.tools,b);return!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=a.tool_choice;if(!c||"object"!=typeof c||Array.isArray(c))return;let d=q(b);if("string"==typeof c.name){let b=d.get(c.name.trim());b&&(a.tool_choice={...c,name:b});return}let e=c.function;if(e&&"object"==typeof e&&!Array.isArray(e)&&"string"==typeof e.name){let b=d.get(e.name.trim());b&&(a.tool_choice={...c,function:{...e,name:b}})}}(a,g),!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=q(b);Array.isArray(a.input)&&(a.input=a.input.map(a=>a?.type==="function_call"&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(a.messages)&&(a.messages=a.messages.map(a=>Array.isArray(a?.tool_calls)?{...a,tool_calls:a.tool_calls.map(a=>c.has(a?.function?.name)?{...a,function:{...a.function,name:c.get(a.function.name)}}:a)}:a))}(a,g),r.length&&function(a,b,c,d=!1){let e=c.map(a=>`\`${a}\``).join(" or "),f=c.length>1?`Do not call the ${e} tools; they are placeholders that do nothing. Use the other tools you have been given instead.`:`Do not call the ${e} tool; it is a placeholder that does nothing. Use the other tools you have been given instead.`;if(b){a.instructions="string"==typeof a.instructions&&a.instructions.trim()?`${a.instructions}
|
|
10
|
+
|
|
11
|
+
${f}`:f;return}if(d||void 0!==a.system){a.system=w(a.system,f);return}if(!Array.isArray(a.messages))return;let g=a.messages[0];g?.role==="system"&&"string"==typeof g.content?a.messages=[{...g,content:`${g.content}
|
|
12
|
+
|
|
13
|
+
${f}`},...a.messages.slice(1)]:a.messages=[{role:"system",content:f},...a.messages]}(a,b,r,c),!function(a,b,{claude:c=!1}={}){try{if(!a||"object"!=typeof a)return!1;if(b){if(void 0!==a.instructions&&"string"!=typeof a.instructions||v(a.instructions))return!1;return a.instructions="string"==typeof a.instructions&&a.instructions.trim()?`${a.instructions}
|
|
14
|
+
|
|
15
|
+
${u}`:u,!0}if(c||void 0!==a.system){if(v(a.system))return!1;return a.system=w(a.system,u),!0}if(!Array.isArray(a.messages))return!1;let d=a.messages.findIndex(a=>a?.role==="system");if(d>=0){let b=a.messages[d];if(v(b.content))return!1;let c=w(b.content,u);return a.messages=a.messages.map((a,b)=>b===d?{...a,content:c}:a),!0}a.messages=[{role:"system",content:u},...a.messages]}catch{return!1}}(a,b,{claude:c}),!a.tool_choice&&b&&(a.tool_choice="auto"),d=a,e=g,d&&"object"==typeof d&&e?.size&&l.set(d,e),g}function y(a){return a&&"object"==typeof a&&l.get(a)||null}},65377:(a,b,c)=>{c.d(b,{Z:()=>h,h:()=>j});var d=c(82380),e=c(14170),f=c(37981),g=c(43698);function h(a,b,c,d){if(!b.input)return b;let e={...b};e.messages=[],b.instructions&&e.messages.push({role:g.z7.SYSTEM,content:b.instructions});let h=null,j=[],k="",l="",m=[],n=new Set,o=(0,f.me)(b.input);if(!o)return b;let p=a=>{if(Array.isArray(a.summary)){let b=a.summary.map(a=>a?.text||"").filter(Boolean).join("\n");if(b)return b}if(Array.isArray(a.content)){let b=a.content.map(a=>a?.text||"").filter(Boolean).join("\n");if(b)return b}return""},q=a=>{k&&(a.reasoning_content=k),l&&(a.encrypted_content=l),k="",l=""};for(let a of o){let b=a.type||(a.role?g.Du.MESSAGE:null);if(b===g.Du.MESSAGE){if(h&&(e.messages.push(h),h=null),j.length>0){for(let a of j)e.messages.push(a);j=[]}let b=Array.isArray(a.content)?a.content.map(a=>{if(a.type===g.Du.INPUT_TEXT||a.type===g.Du.OUTPUT_TEXT)return{type:g.x4.TEXT,text:a.text};if(a.type===g.Du.INPUT_IMAGE){let b=a.image_url||a.file_id||"";return{type:g.x4.IMAGE_URL,image_url:{url:b,detail:a.detail||"auto"}}}return a}):a.content,c={role:a.role,content:b};a.role===g.z7.ASSISTANT?q(c):(k="",l=""),e.messages.push(c)}else if(b===g.Du.FUNCTION_CALL||b===g.Du.CUSTOM_TOOL_CALL){if(h||q(h={role:g.z7.ASSISTANT,content:null,tool_calls:[]}),!a.name||"string"!=typeof a.name||""===a.name.trim())continue;b===g.Du.CUSTOM_TOOL_CALL&&n.add(a.name);let c=b===g.Du.CUSTOM_TOOL_CALL?{input:"string"==typeof a.input?a.input:JSON.stringify(a.input??"")}:a.arguments;h.tool_calls.push({id:a.call_id,type:g.x4.FUNCTION,function:{name:a.name,arguments:"string"==typeof c?c:JSON.stringify(c??{})}})}else if(b===g.Du.FUNCTION_CALL_OUTPUT||b===g.Du.CUSTOM_TOOL_CALL_OUTPUT){if(h&&(e.messages.push(h),h=null),j.length>0){for(let a of j)e.messages.push(a);j=[]}e.messages.push({role:g.z7.TOOL,tool_call_id:a.call_id,content:"string"==typeof a.output?a.output:JSON.stringify(a.output)})}else if(b===g.Du.ADDITIONAL_TOOLS)Array.isArray(a.tools)&&m.push(...a.tools);else if(b===g.Du.REASONING){let b=p(a);b&&(k=k?`${k}
|
|
16
|
+
${b}`:b),"string"==typeof a.encrypted_content&&a.encrypted_content&&(l=a.encrypted_content);continue}}if(h&&e.messages.push(h),j.length>0)for(let a of j)e.messages.push(a);let r=[...Array.isArray(b.tools)?b.tools:[],...m];return r.length>0&&(e.tools=r.map(a=>{if(a.function)return a;let b=a.name;if(!b||"string"!=typeof b||""===b.trim())return null;if("custom"===a.type){n.add(b);let c=[a.format?.syntax,a.format?.definition].filter(Boolean).join("\n");return{type:g.x4.FUNCTION,function:{name:b,description:[String(a.description||""),c].filter(Boolean).join("\n\n"),parameters:{type:"object",properties:{input:{type:"string",description:"Raw freeform input for this custom tool"}},required:["input"],additionalProperties:!1}}}}return{type:g.x4.FUNCTION,function:{name:b,description:String(a.description||""),parameters:i(a.parameters),strict:a.strict}}}).filter(Boolean)),n.size>0&&(e._customToolNames=[...n]),void 0!==e.max_output_tokens&&(void 0===e.max_tokens&&(e.max_tokens=e.max_output_tokens),delete e.max_output_tokens),delete e.input,delete e.instructions,delete e.include,delete e.prompt_cache_key,delete e.store,"string"==typeof e.reasoning?.effort&&(e.reasoning_effort=e.reasoning.effort),delete e.reasoning,delete e.client_metadata,e}function i(a){return a?"object"!==a.type||a.properties?a:{...a,properties:{}}:{type:"object",properties:{}}}function j(a,b,c,d){if(b.input){let c={...b,model:a,stream:!0};return void 0===c.max_output_tokens&&(void 0!==c.max_completion_tokens?c.max_output_tokens=c.max_completion_tokens:void 0!==c.max_tokens&&(c.max_output_tokens=c.max_tokens)),delete c.max_tokens,delete c.max_completion_tokens,c}let e={model:a,input:[],stream:!0,store:!1},h=!1;for(let a of b.messages||[]){if(a.role===g.z7.SYSTEM||a.role===g.z7.DEVELOPER){if(!h){var j;e.instructions="string"==typeof(j=a.content)?j:Array.isArray(j)?j.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n"):"",h=!0}continue}if(a.role===g.z7.USER||a.role===g.z7.ASSISTANT){if(a.role===g.z7.ASSISTANT){let b=function(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.encrypted_content&&a.encrypted_content||"string"==typeof a.reasoning_encrypted_content&&a.reasoning_encrypted_content||"string"==typeof a.reasoning?.encrypted_content&&a.reasoning.encrypted_content||"",c="";if("string"==typeof a.reasoning_content&&a.reasoning_content.trim()?c=a.reasoning_content:"string"==typeof a.reasoning&&a.reasoning.trim()?c=a.reasoning:Array.isArray(a.reasoning_details)&&(c=a.reasoning_details.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n")),!b&&!c)return null;let d={type:g.Du.REASONING};return c&&(d.summary=[{type:g.Du.SUMMARY_TEXT,text:c}]),b&&(d.encrypted_content=b),d}(a);b&&e.input.push(b)}let b=a.role===g.z7.USER?g.Du.INPUT_TEXT:g.Du.OUTPUT_TEXT,c="string"==typeof a.content?[{type:b,text:a.content}]:Array.isArray(a.content)?a.content.map(a=>{if(a.type===g.x4.TEXT)return{type:b,text:a.text};if(a.type===g.x4.IMAGE_URL){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url;return{type:g.Du.INPUT_IMAGE,image_url:b,detail:a.image_url?.detail||"auto"}}if(a.type===g.Du.INPUT_IMAGE)return a;let c=a.text||a.content||JSON.stringify(a);return{type:b,text:"string"==typeof c?c:JSON.stringify(c)}}):[];c.length>0&&e.input.push({type:g.Du.MESSAGE,role:a.role,content:c})}if(a.role===g.z7.ASSISTANT&&a.tool_calls)for(let b of a.tool_calls){let a="string"==typeof b.function?.name?b.function.name.trim():"";a&&e.input.push({type:g.Du.FUNCTION_CALL,call_id:(0,f.N8)(b.id),name:a.slice(0,128),arguments:(0,f.We)(b.function?.arguments)})}a.role===g.z7.TOOL&&e.input.push({type:g.Du.FUNCTION_CALL_OUTPUT,call_id:(0,f.N8)(a.tool_call_id),output:(0,f.DP)(a.content)})}return h||(e.instructions=""),b.tools&&Array.isArray(b.tools)&&(e.tools=b.tools.map(a=>{if(a.type===g.x4.FUNCTION){let b="string"==typeof a.function?.name?a.function.name.trim():"";return b?{type:g.x4.FUNCTION,name:b.slice(0,128),description:String(a.function.description||""),parameters:i(a.function.parameters),strict:a.function.strict}:null}return a}).filter(Boolean)),void 0!==b.temperature&&(e.temperature=b.temperature),void 0!==b.max_output_tokens?e.max_output_tokens=b.max_output_tokens:void 0!==b.max_completion_tokens?e.max_output_tokens=b.max_completion_tokens:void 0!==b.max_tokens&&(e.max_output_tokens=b.max_tokens),void 0!==b.top_p&&(e.top_p=b.top_p),void 0!==b.reasoning&&(e.reasoning=b.reasoning),void 0!==b.reasoning_effort&&(e.reasoning={effort:b.reasoning_effort,summary:"auto"}),void 0!==b.service_tier&&(e.service_tier=b.service_tier),void 0!==b.prompt_cache_key&&(e.prompt_cache_key=b.prompt_cache_key),e}(0,d.kz)(e.h.OPENAI_RESPONSES,e.h.OPENAI,h,null),(0,d.kz)(e.h.OPENAI,e.h.OPENAI_RESPONSES,j,null)},71782:(a,b,c)=>{c.d(b,{Sk:()=>k,el:()=>l});let d=(0,c(22846).U)("gemini_thought_signatures"),e=new Map,f=0;function g(a){let b="string"==typeof a?a.toLowerCase():"";return b?b.includes("claude")?"claude":b.includes("gemini")?"gemini":b:null}function h(a,b){return!a.family||!b||a.family===b}function i(){let a=Date.now();for(let[b,c]of e.entries())c.expiresAt<=a&&e.delete(b);for(;e.size>2e3;){let a=e.keys().next().value;if(!a)break;e.delete(a)}}async function j(){if(++f%100==0)try{let a=await d.getAll(),b=Object.keys(a),c=Date.now(),e=[],f=[];for(let d of b){let b=a[d];!b||"string"!=typeof b.signature||b.expiresAt&&b.expiresAt<=c?e.push(d):f.push({key:d,createdAt:b.createdAt||0})}for(let a of e)await d.remove(a).catch(()=>{});if(f.length>1e4)for(let a of(f.sort((a,b)=>b.createdAt-a.createdAt),f.slice(1e4)))await d.remove(a.key).catch(()=>{})}catch{}}function k(a,b,c=null,f=null){if("string"!=typeof a||!a||"string"!=typeof b||!b)return;let h=Date.now(),l=g(f);i();let m=[];for(let f of(c&&"string"==typeof c&&m.push(`${c}:${a}`),m.push(a),m))e.set(f,{signature:b,family:l,expiresAt:h+36e5}),d.set(f,{signature:b,family:l,createdAt:h,expiresAt:h+6048e5}).catch(()=>{});j().catch(()=>{})}function l(a,b=null,c=null){if("string"!=typeof a||!a)return null;let d=g(c);if(i(),b&&"string"==typeof b){let c=`${b}:${a}`,f=e.get(c);if(f&&f.expiresAt>Date.now()&&h(f,d))return f.signature}let f=e.get(a);return f&&f.expiresAt>Date.now()&&h(f,d)?f.signature:null}},74525:(a,b,c)=>{c.d(b,{M:()=>e});var d=c(41004);function e(a,b=d.Uc){let c=a.max_tokens||d.Uc;return a.tools&&Array.isArray(a.tools)&&a.tools.length>0&&c<d.eo&&(c=d.eo),a.thinking?.budget_tokens&&c<=a.thinking.budget_tokens&&(c=a.thinking.budget_tokens+1024),c>b&&(c=b),c}},76924:(a,b,c)=>{c.d(b,{J5:()=>d,MT:()=>e,Xc:()=>g,Yv:()=>f});let d=0xa00000,e=1e4,f=[{sig:[137,80,78,71],offset:0,mime:"image/png"},{sig:[255,216,255],offset:0,mime:"image/jpeg"},{sig:[71,73,70,56],offset:0,mime:"image/gif"},{sig:[82,73,70,70],offset:0,mime:"image/webp",verifyWebp:!0},{sig:[66,77],offset:0,mime:"image/bmp"}],g=new Set(["localhost","127.0.0.1","0.0.0.0","::1","169.254.169.254","metadata.google.internal"])},82380:(a,b,c)=>{c.d(b,{Ws:()=>au,Ai:()=>av,nZ:()=>at,kz:()=>aq,GH:()=>ar,Y8:()=>as});var d,e,f=c(14170),g=c(17242),h=c(95189),i=c(55399),j=c(60210),k=c(43698),l=c(57647),m=c(52136),n=c(80662),o=c(9024);c(39536);var p=c(26070),q=c(33077),r=c(74525),s=c(29463);function t(a,b={}){return 1!==a.length||a[0].type!==k.x4.TEXT||b.preserveCacheControl&&a[0].cache_control?a:a[0].text}function u(a){return"string"!=typeof a?"":a.replace(/^x-anthropic-billing-header:[^\n]*(?:\r?\n)?/i,"")}function v(a,b,c){let d={model:a,messages:[],stream:c};if(b.generationConfig){let a=b.generationConfig;if(a.maxOutputTokens){let c={max_tokens:a.maxOutputTokens,tools:b.tools};d.max_tokens=(0,r.M)(c)}void 0!==a.temperature&&(d.temperature=a.temperature),void 0!==a.topP&&(d.top_p=a.topP)}if(b.systemInstruction){var e;let a="string"==typeof(e=b.systemInstruction)?e:e.parts&&Array.isArray(e.parts)?e.parts.map(a=>a.text||"").join(""):"";a&&d.messages.push({role:k.z7.SYSTEM,content:a})}if(b.contents&&Array.isArray(b.contents))for(let a of b.contents){let b=function(a){let b=a.role===k.RV.USER?k.z7.USER:k.z7.ASSISTANT;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[],e=[];for(let b of a.parts)void 0!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,s.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse&&e.push({role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})});let f=null;return(d.length>0?(f={role:k.z7.ASSISTANT},c.length>0&&(f.content=1===c.length?c[0].text:c),f.tool_calls=d):c.length>0&&(f={role:b,content:t(c)}),e.length>0)?f?[...e,f]:e:f}(a);b&&(Array.isArray(b)?d.messages.push(...b):d.messages.push(b))}if(b.tools&&Array.isArray(b.tools)){for(let a of(d.tools=[],b.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)d.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:b.parameters||{type:"object",properties:{}}}})}return d}aq(f.h.CLAUDE,f.h.OPENAI,function(a,b,c,d,e={}){let f={model:a,messages:[],stream:c};if(b.max_tokens&&(f.max_tokens=(0,r.M)(b)),void 0!==b.temperature&&(f.temperature=b.temperature),b.system){let a=Array.isArray(b.system)?b.system.map(a=>u(a.text||"")).filter(Boolean).join("\n"):u(b.system);if(e.preserveCacheControl&&Array.isArray(b.system)&&b.system.some(a=>a.cache_control)){let c=[];for(let a of b.system){let b=u(a.text||"");b?c.push({type:k.x4.TEXT,text:b,...a.cache_control?{cache_control:a.cache_control}:{}}):a.cache_control&&c.length&&(c[c.length-1].cache_control=a.cache_control)}a=c.some(a=>a.cache_control)?c:c.map(a=>a.text).join("\n")}(Array.isArray(a)?a.length>0:a)&&f.messages.push({role:k.z7.SYSTEM,content:a})}if(b.messages&&Array.isArray(b.messages))for(let a=0;a<b.messages.length;a++){let c=function(a,b={}){if(a.content&&"object"==typeof a.content&&!Array.isArray(a.content)&&(a.content=[a.content]),a.role===k.z7.SYSTEM){var c;let b,d=(b=(Array.isArray(c=a.content)?c.filter(a=>a?.type===k.R4.TEXT).map(a=>a.text||""):["string"==typeof c?c:""]).filter(Boolean).join("\n")).trim()?`<instructions>
|
|
17
|
+
${b}
|
|
18
|
+
</instructions>`:"";return d?{role:k.z7.USER,content:d}:null}let d=a.role===k.z7.USER||a.role===k.z7.TOOL?k.z7.USER:k.z7.ASSISTANT;if("string"==typeof a.content)return{role:d,content:a.content};if(Array.isArray(a.content)){let c=[],e=[],f=[];for(let d of a.content)switch(d.type){case k.R4.TEXT:c.push({type:k.x4.TEXT,text:d.text,...b.preserveCacheControl&&d.cache_control?{cache_control:d.cache_control}:{}});break;case k.R4.IMAGE:d.source?.type==="base64"&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,s.$q)(d.source.media_type,d.source.data)}});break;case k.R4.TOOL_USE:e.push({id:d.id,type:k.x4.FUNCTION,function:{name:d.name,arguments:JSON.stringify(d.input||{})}});break;case k.R4.TOOL_RESULT:{let a="",b=[];if("string"==typeof d.content)a=d.content;else if(Array.isArray(d.content)){for(let a of d.content)a?.type===k.R4.IMAGE&&a.source?.type==="base64"&&b.push({type:k.x4.IMAGE_URL,image_url:{url:(0,s.$q)(a.source.media_type,a.source.data)}});a=d.content.filter(a=>a?.type===k.R4.TEXT).map(a=>a.text).join("\n")||(b.length?"":JSON.stringify(d.content))}else d.content&&(a=JSON.stringify(d.content));f.push({role:k.z7.TOOL,tool_call_id:d.tool_use_id,content:a}),b.length&&(c.push({type:k.x4.TEXT,text:`[Image from tool result ${d.tool_use_id}]`}),c.push(...b))}}if(f.length>0)return c.length>0?[...f,{role:k.z7.USER,content:t(c,b)}]:f;if(e.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=t(c,b)),a.tool_calls=e,a}if(c.length>0)return{role:d,content:t(c,b)};if(0===a.content.length)return{role:d,content:""}}return null}(b.messages[a],e);c&&(Array.isArray(c)?f.messages.push(...c):f.messages.push(c))}return function(a){for(let b=0;b<a.length;b++){let c=a[b];if(c.role===k.z7.ASSISTANT&&c.tool_calls&&c.tool_calls.length>0){let d=c.tool_calls.map(a=>a.id),e=new Set,f=b+1;for(let c=b+1;c<a.length;c++){let b=a[c];if(b.role===k.z7.TOOL&&b.tool_call_id)e.add(b.tool_call_id),f=c+1;else break}let g=d.filter(a=>!e.has(a));if(g.length>0){let c=g.map(a=>({role:k.z7.TOOL,tool_call_id:a,content:"[No response received]"}));a.splice(f,0,...c),b=f+c.length-1}}}}(f.messages),b.tools&&Array.isArray(b.tools)&&(f.tools=b.tools.map(a=>({type:k.x4.FUNCTION,function:{name:a.name,description:String(a.description||""),parameters:a.input_schema||{type:"object",properties:{}}}}))),b.tool_choice&&(f.tool_choice=function(a){if(!a)return"auto";if("string"==typeof a)return a;switch(a.type){case"auto":default:return"auto";case"any":return"required";case"tool":return{type:k.x4.FUNCTION,function:{name:a.name}}}}(b.tool_choice)),void 0!==b.reasoning_effort?f.reasoning_effort=b.reasoning_effort:b.output_config?.effort!==void 0?f.reasoning_effort=b.output_config.effort:b.reasoning?.effort!==void 0&&(f.reasoning_effort=b.reasoning.effort),void 0!==b.reasoning&&(f.reasoning=b.reasoning),f},null),c(19979),aq(f.h.GEMINI,f.h.OPENAI,v,null),aq(f.h.GEMINI_CLI,f.h.OPENAI,v,null);var w=c(97102),x=c(96281);aq(f.h.OPENAI,f.h.VERTEX,function(a,b,c,d){var e=(0,w.m$)(a,b,c,d);if(!e?.contents)return e;for(let a of e.contents)if(Array.isArray(a.parts))for(let b of a.parts)void 0!==b.thoughtSignature&&(b.thoughtSignature=x.n6),b.functionCall&&"id"in b.functionCall&&delete b.functionCall.id,b.functionResponse&&"id"in b.functionResponse&&delete b.functionResponse.id;return e},null);var y=c(58028);aq(f.h.ANTIGRAVITY,f.h.OPENAI,function(a,b,c){let d=b.request||b,e={model:a,messages:[],stream:c};if(d.generationConfig){let a=d.generationConfig;if(a.maxOutputTokens){let b={max_tokens:a.maxOutputTokens,tools:d.tools};e.max_tokens=(0,r.M)(b)}if(void 0!==a.temperature&&(e.temperature=a.temperature),void 0!==a.topP&&(e.top_p=a.topP),void 0!==a.topK&&(e.top_k=a.topK),a.thinkingConfig){let b=(0,y.Vp)(a.thinkingConfig.thinkingBudget||0);b&&(e.reasoning_effort=b)}}if(d.systemInstruction){var f;let a="string"==typeof(f=d.systemInstruction)?f:f.parts&&Array.isArray(f.parts)?f.parts.map(a=>a.text||"").join(""):"";a&&e.messages.push({role:k.z7.SYSTEM,content:a})}if(d.contents&&Array.isArray(d.contents))for(let a of d.contents){let b=function(a){let b=a.role===k.RV.MODEL?k.z7.ASSISTANT:a.role===k.RV.USER?k.z7.USER:a.role;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[],e=[],f="";for(let b of a.parts){if(!0===b.thought&&b.text){f+=b.text;continue}if(b.thoughtSignature&&void 0!==b.text){b.text&&c.push({type:k.x4.TEXT,text:b.text});continue}void 0!==b.text&&""!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,s.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse&&e.push({role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})})}if(e.length>0){if(d.length>0||c.length>0||f){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=t(c)),f&&(a.reasoning_content=f),d.length>0&&(a.tool_calls=d),[...e,a]}return e}if(d.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=t(c)),f&&(a.reasoning_content=f),a.tool_calls=d,a}if(c.length>0||f){let a={role:b};return c.length>0&&(a.content=t(c)),f&&(a.reasoning_content=f),a}return null}(a);b&&(Array.isArray(b)?e.messages.push(...b):e.messages.push(b))}if(d.tools&&Array.isArray(d.tools)){for(let a of(e.tools=[],d.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)e.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:function a(b){if(!b||"object"!=typeof b)return b;let c=Array.isArray(b)?[...b]:{...b};if("string"==typeof c.type&&(c.type=c.type.toLowerCase()),delete c.enumDescriptions,c.properties){let b={};for(let[d,e]of Object.entries(c.properties))b[d]=a(e);c.properties=b}return c.items&&(c.items=a(c.items)),c}(b.parameters)||{type:"object",properties:{}}}})}return e},null),c(65377);var z=c(94755),A=c(41004);let B=new Map;function C(a){return null==a?a:JSON.parse(JSON.stringify(a))}function D(a,b){return a?.userInputMessage&&!a.userInputMessage.modelId&&b&&(a.userInputMessage.modelId=b),a}function E(a,b){for(let c of a||[])D(c,b);return a}function F(a,b,c){let d=C(a)||{userInputMessage:{content:""}};if(d.userInputMessage||(d.userInputMessage={content:""}),D(d,c),b){let a=d.userInputMessage.content||"";d.userInputMessage.content=a?`${b}
|
|
19
|
+
|
|
20
|
+
${a}`:b}return d}function G(a){return a.findIndex(a=>a?.userInputMessage)}function H(a,b){var c;return 0===b&&(c=a[b],!c?.userInputMessage?.userInputMessageContext?.toolResults?.length)}function I({conversationId:a,connectionId:b,modelId:c,systemPrompt:d="",contentPrefix:e="",currentContentPrefix:f="",history:g=[],currentMessage:h}={}){var i;let j,k=`${b||""}:${a||""}`,l=a?B.get(k):null,m=C(g)||[],n=C(h)||{userInputMessage:{content:""}};if(l&&l.modelId===c&&l.systemPrompt===d){l.lastUsed=Date.now();let a=G(m),b=D(C(l.sessionStart),c);return H(m,a)?m[a]=b:(m.unshift(b),1===m.length&&m.push({assistantResponseMessage:{content:"..."}})),{history:E(m,c),currentMessage:F(n,f,c),replayed:!0}}let o=G(m),p=D(n,c);return H(m,o)?(j=F(m[o],e,c),m[o]=C(j),p=F(n,f,c)):o>=0?(j=F({userInputMessage:{content:"",modelId:c}},e,c),m.unshift(C(j)),p=F(n,f,c)):p=C(j=F(n,e,c)),a&&(i={sessionStart:C(j),modelId:c,systemPrompt:d},B.size>=5e3&&B.delete(B.keys().next().value),B.set(k,{...i,lastUsed:Date.now()})),{history:E(m,c),currentMessage:p,replayed:!1}}let J=setInterval(()=>{let a=Date.now();for(let[b,c]of B)a-c.lastUsed>A.v1.sessionTtlMs&&B.delete(b)},A.v1.sessionCleanupIntervalMs);J.unref&&J.unref();var K=c(6382);let L=/^[a-zA-Z0-9_-]+$/;function M(a){return a?"Tool results provided.":"continue"}let N=/[^a-zA-Z0-9_-]/g;function O(a){return null==a?a:JSON.parse(JSON.stringify(a))}function P(a){if("string"==typeof a)return a;if(null==a)return"";try{return JSON.stringify(a)}catch{return String(a)}}function Q(a,b){b&&(a.content=a.content?`${a.content}
|
|
21
|
+
|
|
22
|
+
${b}`:b)}function R(a,b){return[...String(a||"")].slice(0,b).join("")}function S(a){let b=[],c=new Map,d=new Set;for(let[e,f]of(Array.isArray(a)?a:[]).entries()){if(!f||"object"!=typeof f)continue;let a=f.function?.name??f.name;if("string"!=typeof a||!a.trim()||c.has(a))continue;let g=function(a,b,c){let d=R(String(a||"").trim().replace(N,"_").replace(/^_+|_+$/g,"")||`tool_${b+1}`,K.Zm),e=d,f=2;for(;c.has(e);){let a=`_${f++}`;e=`${d.slice(0,K.Zm-a.length)}${a}`}return c.add(e),e}(a,e,d);c.set(a,g);let h=R(String((f.function?.description??f.description??`Tool: ${a}`)||`Tool: ${a}`),K.Oj),i=f.function?.parameters??f.parameters??f.input_schema??{};b.push({toolSpecification:{name:g,description:h,inputSchema:{json:function(a){let b=function a(b){if(Array.isArray(b))return b.map(a);if(!b||"object"!=typeof b)return b;let c={};for(let[d,e]of Object.entries(b))"additionalProperties"!==d&&("required"===d&&Array.isArray(e)&&0===e.length||(c[d]=a(e)));return c}(a&&"object"==typeof a?O(a):{});return b.type="object",(!b.properties||"object"!=typeof b.properties||Array.isArray(b.properties))&&(b.properties={}),Array.isArray(b.required)&&(b.required=[...new Set(b.required.filter(a=>"string"==typeof a&&Object.hasOwn(b.properties,a)))],0===b.required.length&&delete b.required),b}(i)}}})}return{specs:b,nameMap:c}}function T(a){return`[Tool call: ${a?.name||"unknown"}(${P(a?.input||{})})]`}function U(a){return"string"==typeof a?a:""}function V(a){let b=Array.isArray(a?.content)?a.content.map(a=>({text:P(a?.text??a)})):[{text:P(a?.content)}];return{toolUseId:U(a?.toolUseId),status:a?.status==="error"?"error":"success",content:b.length>0?b:[{text:""}]}}function W(a,b){for(let c of b)Q(a,function(a){let b=Array.isArray(a?.content)?a.content.map(a=>P(a?.text??a)).filter(Boolean).join("\n"):P(a?.content);return`[Tool result${a?.status==="error"?" (error)":""}: ${b}]`}(c))}function X(a){let b=a.userInputMessageContext;b&&(b.toolResults?.length||delete b.toolResults,b.tools?.length||delete b.tools,0===Object.keys(b).length&&delete a.userInputMessageContext)}function Y(a,b,c=[]){let d=[],e=[...a||[],b].filter(Boolean),f=new Set(c.map(a=>a?.toolSpecification?.name).filter(Boolean)),g=new Set;for(let a=0;a<e.length;a++){let b=a%2==0,c=!!e[a]?.userInputMessage;if(c!==b&&d.push(`role:${a}`),c){if(0===a){let b=e[a].userInputMessage?.userInputMessageContext?.toolResults;b?.length&&d.push("orphan:0")}}else{let b=e[a].assistantResponseMessage?.toolUses||[],c=e[a+1]?.userInputMessage?.userInputMessageContext?.toolResults||[],h=b.map(a=>a.toolUseId),i=c.map(a=>a.toolUseId);for(let e of((b.length!==c.length||h.some(a=>!i.includes(a)))&&d.push(`pair:${a}`),b))(!e.toolUseId||g.has(e.toolUseId))&&d.push(`id:${a}`),g.add(e.toolUseId),f.has(e.name)||d.push(`spec:${a}`)}}return b?.userInputMessage?.content||d.push("current"),{valid:0===d.length,errors:d}}function Z({history:a,currentMessage:b,modelId:c,toolSpecs:d=[],nameMap:e=new Map}={}){let f=function(a,b,c){let d=[...Array.isArray(a)?a:[]];b&&d.push(b);let e=[];for(let a of d){let b=!!a?.userInputMessage;if(b===!!a?.assistantResponseMessage)continue;let c=b?{userInputMessage:O(a.userInputMessage)}:{assistantResponseMessage:O(a.assistantResponseMessage)},d=e[e.length-1];if(c.userInputMessage&&d?.userInputMessage)!function(a,b){Q(a,b.content),Array.isArray(b.images)&&b.images.length>0&&(a.images=[...a.images||[],...b.images]);let c=b.userInputMessageContext?.toolResults;Array.isArray(c)&&c.length>0&&(a.userInputMessageContext||={},a.userInputMessageContext.toolResults=[...a.userInputMessageContext.toolResults||[],...c])}(d.userInputMessage,c.userInputMessage);else if(c.assistantResponseMessage&&d?.assistantResponseMessage){var f,g;Q(f=d.assistantResponseMessage,(g=c.assistantResponseMessage).content),Array.isArray(g.toolUses)&&g.toolUses.length>0&&(f.toolUses=[...f.toolUses||[],...g.toolUses])}else e.push(c)}for(let a of(e[0]?.assistantResponseMessage&&e.unshift({userInputMessage:{content:"continue",modelId:c}}),(0===e.length||e[e.length-1]?.assistantResponseMessage)&&e.push({userInputMessage:{content:"continue",modelId:c}}),e))a.userInputMessage?(a.userInputMessage.content=P(a.userInputMessage.content).trim()||M(a.userInputMessage.userInputMessageContext?.toolResults?.length>0),a.userInputMessage.modelId||=c,a.userInputMessage.userInputMessageContext?.tools&&delete a.userInputMessage.userInputMessageContext.tools):a.assistantResponseMessage.content=P(a.assistantResponseMessage.content).trim()||"...";return e}(a,b,c),g={missingResults:0,orphanResults:0,invalidToolUses:0},h=new Set(d.map(a=>a?.toolSpecification?.name).filter(Boolean)),i=new Set;for(let a=0;a<f.length;a+=2){let b=f[a].userInputMessage;if(0===a){let a=b.userInputMessageContext?.toolResults||[];a.length>0&&(W(b,a),g.orphanResults+=a.length,delete b.userInputMessageContext.toolResults,X(b))}let c=f[a+1]?.assistantResponseMessage,d=f[a+2]?.userInputMessage;c&&d&&function(a,b,c,d,e,f,g){let h=Array.isArray(a.toolUses)?a.toolUses:[],i=Array.isArray(b.userInputMessageContext?.toolResults)?b.userInputMessageContext.toolResults.map(V):[];if(0===h.length){i.length>0&&(W(b,i),g.orphanResults+=i.length),b.userInputMessageContext&&delete b.userInputMessageContext.toolResults,X(b);return}let j=new Map,k=h.map((a,b)=>{let c=U(a?.toolUseId),e=d.get(a?.name)||a?.name,f=function(a){if(a&&"object"==typeof a&&!Array.isArray(a))return O(a);if("string"==typeof a)try{let b=JSON.parse(a);if(b&&"object"==typeof b&&!Array.isArray(b))return b}catch{return null}return null==a?{}:null}(a?.input),g={call:a,callIndex:b,key:c,mappedName:e,input:f,result:null},h=j.get(c)||[];return h.push(g),j.set(c,h),g}),l=[];for(let a of i){let b=j.get(U(a.toolUseId)),c=b?.find(a=>!a.result);c?c.result=a:l.push(a)}let m=[],n=[];for(let d of k){let h="string"==typeof d.mappedName&&e.has(d.mappedName);if(!(d.result&&h&&null!==d.input)){Q(a,T({name:d.mappedName,input:d.call?.input})),g.missingResults+=+!d.result,g.invalidToolUses+=h&&null!==d.input?0:1,d.result&&(W(b,[d.result]),g.orphanResults++);continue}let i=function(a,b,c,d,e){let f=U(a).replace(/[^a-zA-Z0-9_-]/g,""),g=`call_msg${b}_tc${c}_${d||"tool"}`,h=R(L.test(f)&&f?f:g,K.h3),i=h,j=2;for(;e.has(i);){let a=`_${j++}`;i=`${h.slice(0,K.h3-a.length)}${a}`}return e.add(i),i}(d.key,c,d.callIndex,d.mappedName,f);m.push({toolUseId:i,name:d.mappedName,input:d.input}),n.push({...d.result,toolUseId:i})}l.length>0&&(W(b,l),g.orphanResults+=l.length),m.length>0?a.toolUses=m:delete a.toolUses,b.userInputMessageContext||={},n.length>0?b.userInputMessageContext.toolResults=n:delete b.userInputMessageContext.toolResults,X(b)}(c,d,a+1,e,h,i,g)}let j=f[f.length-1];j.userInputMessage.userInputMessageContext||={},d.length>0&&(j.userInputMessage.userInputMessageContext.tools=O(d)),X(j.userInputMessage);let k=f.slice(0,-1),l=Y(k,j,d);if(!l.valid){for(let a of f){if(a.assistantResponseMessage?.toolUses?.length){for(let b of a.assistantResponseMessage.toolUses)Q(a.assistantResponseMessage,T(b));g.invalidToolUses+=a.assistantResponseMessage.toolUses.length,delete a.assistantResponseMessage.toolUses}let b=a.userInputMessage,c=b?.userInputMessageContext?.toolResults;c?.length&&(W(b,c),g.orphanResults+=c.length,delete b.userInputMessageContext.toolResults,X(b))}l=Y(k=f.slice(0,-1),j,d)}return{history:k,currentMessage:j,repairs:g,valid:l.valid,errors:l.errors}}function $(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>!!a&&"object"==typeof a&&a.type===k.x4.TEXT&&"string"==typeof a.text).map(a=>a.text||"").join(""):""}function _(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function aa(a,b,c){let d=(c||"").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,"");return`<tool_result>
|
|
23
|
+
<tool_name>${_(a||"tool")}</tool_name>
|
|
24
|
+
<tool_call_id>${_(b||"")}</tool_call_id>
|
|
25
|
+
<result>${_(d)}</result>
|
|
26
|
+
</tool_result>`}function ab(a){return"string"==typeof a?a.split("\n")[0]:""}aq(f.h.OPENAI,f.h.KIRO,function(a,b,c,d){let e=b.messages||[],f=b.tools||[],g=b.temperature,h=b.top_p,i=(0,K.BB)(a),{upstream:j,agentic:l}=i,m=(0,K.y2)(b,i.thinkingOverride),o=(0,K.P9)(m,d?.rawHeaders,i.model),p=(0,K.yh)(m,j),q=(0,K.cr)(m,j),{specs:r,nameMap:t}=S(f),{history:u,currentMessage:v}=function(a,b){let c=[],d=null,e=[],f=[],g=[],h=[],i=null,j=()=>{if("user"===i){let a={userInputMessage:{content:e.join("\n\n").trim()||M(g.length>0),modelId:""}};h.length>0&&(a.userInputMessage.images=h),g.length>0&&(a.userInputMessage.userInputMessageContext={toolResults:g}),c.push(a),d=a,e=[],g=[],h=[]}else if("assistant"===i){let a=f.join("\n\n").trim()||"...";c.push({assistantResponseMessage:{content:a}}),f=[]}};for(let b=0;b<a.length;b++){let d=a[b],l=d.role,m=l===k.z7.SYSTEM;if((l===k.z7.SYSTEM||l===k.z7.TOOL)&&(l=k.z7.USER),l!==i&&null!==i&&j(),i=l,l===k.z7.USER){let a="";if("string"==typeof d.content)a=d.content;else if(Array.isArray(d.content)){let b=[];for(let a of d.content)if(a.type===k.x4.TEXT||a.text)b.push(a.text||"");else if(a.type===k.x4.IMAGE_URL){let c=a.image_url?.url||"",d=(0,s.W$)(c);if(d){let a=d.mimeType.split("/")[1]||d.mimeType;h.push({format:a,source:{bytes:d.base64}})}else(c.startsWith("http://")||c.startsWith("https://"))&&b.push(`[Image: ${c}]`)}else if(a.type===k.R4.IMAGE&&a.source?.type==="base64"&&a.source?.data){let b=a.source.media_type||k.BY,c=b.split("/")[1]||b;h.push({format:c,source:{bytes:a.source.data}})}a=b.join("\n");let c=d.content.filter(a=>a.type===k.R4.TOOL_RESULT);c.length>0&&c.forEach(a=>{let b=Array.isArray(a.content)?a.content.map(a=>a.text||"").join("\n"):"string"==typeof a.content?a.content:"";g.push({toolUseId:a.tool_use_id,status:a.is_error?"error":"success",content:[{text:b}]})})}if(d.role===k.z7.TOOL){let a="string"==typeof d.content?d.content:"";g.push({toolUseId:d.tool_call_id,status:d.is_error||"error"===d.status?"error":"success",content:[{text:a}]})}else a&&e.push(m?`<instructions>
|
|
27
|
+
${a}
|
|
28
|
+
</instructions>`:a)}else if(l===k.z7.ASSISTANT){let a="",b=[];if(Array.isArray(d.content)?(a=d.content.filter(a=>a.type===k.x4.TEXT).map(a=>a.text).join("\n").trim(),b=d.content.filter(a=>a.type===k.R4.TOOL_USE)):"string"==typeof d.content&&(a=d.content.trim()),d.tool_calls&&d.tool_calls.length>0&&(b=d.tool_calls),a&&f.push(a),b.length>0){j();let a=c[c.length-1];a?.assistantResponseMessage&&(a.assistantResponseMessage.toolUses=b.map(a=>a.function?{toolUseId:a.id||(0,z.A)(),name:a.function.name,input:function(a,b){if("string"!=typeof a)return a??b;try{return JSON.parse(a)}catch{return b}}(a.function.arguments,{})}:{toolUseId:a.id||(0,z.A)(),name:a.name,input:a.input||{}})),i=null}}}null!==i&&j();for(let a=c.length-1;a>=0;a--)if(c[a].userInputMessage){d=c.splice(a,1)[0];break}c.forEach(a=>{a.userInputMessage?.userInputMessageContext&&0===Object.keys(a.userInputMessage.userInputMessageContext).length&&delete a.userInputMessage.userInputMessageContext,a.userInputMessage&&!a.userInputMessage.modelId&&(a.userInputMessage.modelId=b)});let l=[];for(let a=0;a<c.length;a++){let b=c[a];if(b.userInputMessage&&l.length>0&&l[l.length-1].userInputMessage){let a=l[l.length-1];a.userInputMessage.content+="\n\n"+b.userInputMessage.content;let c=a.userInputMessage.userInputMessageContext,d=b.userInputMessage.userInputMessageContext;d&&(c?(d.toolResults?.length>0&&(c.toolResults=[...c.toolResults||[],...d.toolResults]),d.tools?.length>0&&(c.tools=[...c.tools||[],...d.tools])):a.userInputMessage.userInputMessageContext=d)}else l.push(b)}return d||(d={userInputMessage:{content:"",modelId:b}}),{history:l,currentMessage:d}}(e,j),w=d?.providerSpecificData?.authMethod,x="api_key"===w||"idc"===w||"external_idp"===w?d?.providerSpecificData?.profileArn||"":d?.providerSpecificData?.profileArn||(0,K.We)(w),y=new Date().toISOString(),A=[];null===o||q||A.push((0,K.aZ)(o)),l&&A.push(K.rG);let B=A.filter(Boolean).join("\n\n"),C=`[Context: Current time is ${y}]`,D=[B,C].filter(Boolean).join("\n\n"),E=(0,n.bS)({headers:d?.rawHeaders,body:b,connectionId:d?.connectionId,scope:"kiro"}),F=E.sessionId;(0,n.fd)({sessionId:F,connectionId:d?.connectionId,scope:"kiro",ephemeral:E.ephemeral});let G=I({conversationId:F,connectionId:d?.connectionId,modelId:j,systemPrompt:B,contentPrefix:D,currentContentPrefix:C,history:u,currentMessage:v}),H=Z({history:G.history,currentMessage:G.currentMessage,modelId:j,toolSpecs:r,nameMap:t});if(!H.valid)return console.error(`[Kiro] refusing invalid conversation (openai → kiro): ${(H.errors||[]).join(", ")||"unknown"} | turns=${(H.history||[]).length+1}`),null;let J=H.currentMessage.userInputMessage,L={conversationState:{chatTriggerType:"MANUAL",conversationId:F,currentMessage:{userInputMessage:{content:J.content||"",modelId:j,origin:"AI_EDITOR",...J.images?.length>0&&{images:J.images},...J.userInputMessageContext&&{userInputMessageContext:J.userInputMessageContext}}},history:H.history}};x&&(L.profileArn=x),p&&(L.additionalModelRequestFields=p),L.inferenceConfig={},L.inferenceConfig.maxTokens=32e3,void 0!==g&&(L.inferenceConfig.temperature=g),void 0!==h&&(L.inferenceConfig.topP=h),Object.defineProperty(L,"_kiroUpstreamModel",{value:j,enumerable:!1});let N=new Map;for(let[a,b]of t)a!==b&&N.set(b,a);return N.size&&(L._toolNameMap=N),L},null),aq(f.h.OPENAI,f.h.CURSOR,function(a,b,c,d){let e=function(a){let b=[],c=new Map,d=(a,b)=>{if(!a)return;let d=b||"tool";c.set(a,{name:d});let e=ab(a);e&&e!==a&&c.set(e,{name:d})};for(let b of a){if(b.role===k.z7.ASSISTANT&&b.tool_calls)for(let a of b.tool_calls)d(a.id||"",a.function?.name||"tool");if(b.role===k.z7.ASSISTANT&&Array.isArray(b.content))for(let a of b.content)a?.type===k.R4.TOOL_USE&&d(a.id||"",a.name||"tool")}for(let d=0;d<a.length;d++){let e=a[d];if(e.role===k.z7.SYSTEM){b.push({role:k.z7.USER,content:`[System Instructions]
|
|
29
|
+
${$(e.content)}`});continue}if(e.role===k.z7.TOOL){let a=$(e.content),d=e.tool_call_id||"",f=c.get(d)||{},g=e.name||f.name||"tool";b.push({role:k.z7.USER,content:aa(g,d,a)});continue}if(e.role===k.z7.USER||e.role===k.z7.ASSISTANT){if(e.role===k.z7.USER&&Array.isArray(e.content)){let a=[];for(let b of e.content)if(b&&"object"==typeof b){if(b.type===k.R4.TEXT){"string"==typeof b.text&&a.push(b.text||"");continue}if(b.type===k.R4.TOOL_RESULT){let d=b.tool_use_id||"",e=c.get(d)||c.get(ab(d)),f=e?.name||"tool",g=$(b.content);a.push(aa(f,d,g))}}let d=a.filter(Boolean).join("\n");d&&b.push({role:k.z7.USER,content:d});continue}let a=$(e.content);if(e.role===k.z7.ASSISTANT&&e.tool_calls&&e.tool_calls.length>0){let c={role:k.z7.ASSISTANT,content:a||""};c.tool_calls=e.tool_calls.map(a=>{let{index:b,...c}=a||{};return c}),b.push(c)}else if(e.role===k.z7.ASSISTANT&&Array.isArray(e.content)){let c=e.content.filter(a=>a?.type===k.R4.TOOL_USE).map(a=>({id:a.id||"",type:k.x4.FUNCTION,function:{name:a.name||"tool",arguments:JSON.stringify(a.input||{})}})).filter(a=>a.id);c.length>0?b.push({role:k.z7.ASSISTANT,content:a||"",tool_calls:c}):a&&b.push({role:k.z7.ASSISTANT,content:a})}else a&&b.push({role:e.role,content:a})}}return b}(b.messages||[]),{user:f,metadata:g,tool_choice:h,stream_options:i,system:j,...l}=b;return{...l,messages:e,max_tokens:A.eo}},null);var ac=c(62842);function ad(a){return"string"==typeof a?a:Array.isArray(a)&&a.filter(a=>a&&a.type===k.x4.TEXT&&a.text).map(a=>a.text).join("\n")||""}aq(f.h.OPENAI,f.h.OLLAMA,function(a,b,c){let d={model:a,messages:function(a){if(!Array.isArray(a))return a;let b=[],c=new Map;for(let b of a)if(b.role===k.z7.ASSISTANT&&b.tool_calls)for(let a of b.tool_calls)a.id&&a.function?.name&&c.set(a.id,a.function.name);for(let d of a){if(d.role===k.z7.TOOL){let a=ad(d.content);if(!a)continue;let e=c.get(d.tool_call_id)||d.name||"unknown_tool";b.push({role:k.z7.TOOL,tool_name:e,content:a});continue}if(d.role===k.z7.ASSISTANT&&d.tool_calls){let a=ad(d.content)||"",c=d.tool_calls.map(a=>({type:k.x4.FUNCTION,function:{index:a.index||0,name:a.function?.name||"",arguments:"string"==typeof a.function?.arguments?(0,ac.N)(a.function.arguments||"{}",{}):a.function?.arguments||{}}}));b.push({role:k.z7.ASSISTANT,content:a,tool_calls:c});continue}let a=d.role,e=ad(d.content),f=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a){if(!c||c.type!==k.x4.IMAGE_URL)continue;let a="string"==typeof c.image_url?c.image_url:c.image_url?.url;if("string"!=typeof a||!a)continue;let d=(0,s.W$)(a);d&&b.push(d.base64)}return b}(d.content);if(!e&&a!==k.z7.ASSISTANT)continue;let g={role:a,content:e};f.length>0&&(g.images=f),b.push(g)}return b}(b.messages),stream:c};return void 0!==b.temperature&&(d.options=d.options||{},d.options.temperature=b.temperature),void 0!==b.max_tokens&&(d.options=d.options||{},d.options.num_predict=b.max_tokens),void 0!==b.top_p&&(d.options=d.options||{},d.options.top_p=b.top_p),b.tools&&Array.isArray(b.tools)&&(d.tools=b.tools),b.tool_choice&&(d.tool_choice=b.tool_choice),d},null),c(97821),aq(f.h.CLAUDE,f.h.KIRO,function(a,b,c,d){var e;let f=Array.isArray(b.messages)?b.messages:[],g=Array.isArray(b.tools)?b.tools:[],h=b.max_tokens||32e3,i=b.temperature,j=b.top_p,l=(0,K.BB)(a),{upstream:m,agentic:o}=l,p=(0,K.y2)(b,l.thinkingOverride),q=(0,K.P9)(p,d?.rawHeaders,l.model),r=(0,K.yh)(p,m),s=(0,K.cr)(p,m),{specs:t,nameMap:u}=S(g),{history:v,currentMessage:w}=function(a,b){let c=[],d=null,e=[],f=[],g=[],h=[],i=null,j=()=>{if(i===k.z7.USER){let a={userInputMessage:{content:e.join("\n\n").trim()||M(g.length>0),modelId:b}};h.length>0&&(a.userInputMessage.images=h),g.length>0&&(a.userInputMessage.userInputMessageContext={toolResults:g}),c.push(a),d=a,e=[],g=[],h=[]}else if(i===k.z7.ASSISTANT){let a=f.join("\n\n").trim()||"...";c.push({assistantResponseMessage:{content:a}}),f=[]}};for(let b of a){let a=b.role;if(a!==i&&null!==i&&j(),i=a,a===k.z7.USER){if("string"==typeof b.content)e.push(b.content);else if(Array.isArray(b.content)){for(let a of b.content)if(a.type===k.R4.TEXT)e.push(a.text);else if(a.type===k.R4.IMAGE&&a.source?.type==="base64"){let b=a.source.media_type||k.BY,c=b.split("/")[1]||b;h.push({format:c,source:{bytes:a.source.data}})}else if(a.type===k.R4.TOOL_RESULT){let b="";if("string"==typeof a.content)b=a.content;else if(Array.isArray(a.content)){let c=!1;for(let b of a.content)if(b?.type===k.R4.IMAGE&&b.source?.type==="base64"){c=!0;let a=b.source.media_type||k.BY;h.push({format:a.split("/")[1]||a,source:{bytes:b.source.data}})}b=a.content.filter(a=>a.type===k.R4.TEXT).map(a=>a.text).join("\n")||(c?"(image attached)":JSON.stringify(a.content))}else a.content&&(b=JSON.stringify(a.content));g.push({toolUseId:a.tool_use_id,status:a.is_error?"error":"success",content:[{text:b}]})}}}else if(a===k.z7.ASSISTANT){let a="",d=[];if("string"==typeof b.content)a=b.content;else if(Array.isArray(b.content))for(let c of b.content)c.type===k.R4.TEXT?a+=c.text:c.type===k.R4.TOOL_USE&&d.push({toolUseId:c.id,name:c.name,input:c.input||{}});if(a&&f.push(a),d.length>0){j();let a=c[c.length-1];a?.assistantResponseMessage&&(a.assistantResponseMessage.toolUses=d),i=null}}}null!==i&&j();for(let a=c.length-1;a>=0;a--)if(c[a].userInputMessage){d=c.splice(a,1)[0];break}c.forEach(a=>{a.userInputMessage?.userInputMessageContext&&0===Object.keys(a.userInputMessage.userInputMessageContext).length&&delete a.userInputMessage.userInputMessageContext,a.userInputMessage&&!a.userInputMessage.modelId&&(a.userInputMessage.modelId=b)});let l=[];for(let a of c){let b=l[l.length-1];if(a.userInputMessage&&b?.userInputMessage){b.userInputMessage.content+="\n\n"+a.userInputMessage.content;let c=b.userInputMessage.userInputMessageContext,d=a.userInputMessage.userInputMessageContext;d&&(c?(d.toolResults?.length>0&&(c.toolResults=[...c.toolResults||[],...d.toolResults]),d.tools?.length>0&&(c.tools=[...c.tools||[],...d.tools])):b.userInputMessage.userInputMessageContext=d)}else l.push(a)}return d||(d={userInputMessage:{content:"",modelId:b}}),{history:l,currentMessage:d}}(f,m),x=d?.providerSpecificData?.authMethod,y="api_key"===x||"idc"===x||"external_idp"===x?d?.providerSpecificData?.profileArn||"":d?.providerSpecificData?.profileArn||(0,K.We)(x),z=new Date().toISOString(),A=[];null===q||s||A.push((0,K.aZ)(q)),o&&A.push(K.rG);let B=(e=b.system)?"string"==typeof e?e:Array.isArray(e)?e.map(a=>"string"==typeof a?a:a?.text||"").filter(Boolean).join("\n"):"":"";B&&A.push(B);let C=A.filter(Boolean).join("\n\n"),D=`[Context: Current time is ${z}]`,E=[C,D].filter(Boolean).join("\n\n"),F=(0,n.bS)({headers:d?.rawHeaders,body:b,connectionId:d?.connectionId,scope:"kiro"}),G=F.sessionId;(0,n.fd)({sessionId:G,connectionId:d?.connectionId,scope:"kiro",ephemeral:F.ephemeral});let H=I({conversationId:G,connectionId:d?.connectionId,modelId:m,systemPrompt:C,contentPrefix:E,currentContentPrefix:D,history:v,currentMessage:w}),J=Z({history:H.history,currentMessage:H.currentMessage,modelId:m,toolSpecs:t,nameMap:u});if(!J.valid)return console.error(`[Kiro] refusing invalid conversation (claude → kiro): ${(J.errors||[]).join(", ")||"unknown"} | turns=${(J.history||[]).length+1}`),null;let L=J.currentMessage.userInputMessage,N={conversationState:{chatTriggerType:"MANUAL",conversationId:G,currentMessage:{userInputMessage:{content:L.content||"",modelId:m,origin:"AI_EDITOR",...L.userInputMessageContext&&{userInputMessageContext:L.userInputMessageContext},...L.images&&{images:L.images}}},history:J.history}};y&&(N.profileArn=y),r&&(N.additionalModelRequestFields=r),(h||void 0!==i||void 0!==j)&&(N.inferenceConfig={},h&&(N.inferenceConfig.maxTokens=h),void 0!==i&&(N.inferenceConfig.temperature=i),void 0!==j&&(N.inferenceConfig.topP=j)),Object.defineProperty(N,"_kiroUpstreamModel",{value:m,enumerable:!1});let O=new Map;for(let[a,b]of u)a!==b&&O.set(b,a);return O.size&&(N._toolNameMap=O),N},null),c(29675);var ae=c(44236),af=c(44090);let ag="proxy_";function ah(a,b){a.thinkingBlockStarted&&(b.push({type:"content_block_stop",index:a.thinkingBlockIndex}),a.thinkingBlockStarted=!1)}function ai(a,b){a.textBlockStarted&&!a.textBlockClosed&&(a.textBlockClosed=!0,b.push({type:"content_block_stop",index:a.textBlockIndex}),a.textBlockStarted=!1)}aq(f.h.OPENAI,f.h.CLAUDE,null,function(a,b){if(!a||!a.choices?.[0])return null;let c=[],d=a.choices[0],e=d.delta;if(a.usage&&"object"==typeof a.usage){let c="number"==typeof a.usage.prompt_tokens?a.usage.prompt_tokens:0,d="number"==typeof a.usage.completion_tokens?a.usage.completion_tokens:0,e=a.usage.prompt_tokens_details?.cached_tokens,f=a.usage.prompt_tokens_details?.cache_creation_tokens,g="number"==typeof e?e:0,h="number"==typeof f?f:0;b.usage={input_tokens:c-g-h,output_tokens:d},g>0&&(b.usage.cache_read_input_tokens=g),h>0&&(b.usage.cache_creation_input_tokens=h)}b.messageStartSent||(b.messageStartSent=!0,b.messageId=a.id?.replace("chatcmpl-","")||`msg_${Date.now()}`,(!b.messageId||"chat"===b.messageId||b.messageId.length<8)&&(b.messageId=a.extend_fields?.requestId||a.extend_fields?.traceId||`msg_${Date.now()}`),b.model=a.model||k.rP,b.nextBlockIndex=0,c.push({type:"message_start",message:{id:b.messageId,type:"message",role:k.z7.ASSISTANT,model:b.model,content:[],stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0}}}));let f=(0,af.Vi)(e);if(f&&(ai(b,c),b.thinkingBlockStarted||(b.thinkingBlockIndex=b.nextBlockIndex++,b.thinkingBlockStarted=!0,c.push({type:"content_block_start",index:b.thinkingBlockIndex,content_block:{type:k.R4.THINKING,thinking:""}})),c.push({type:"content_block_delta",index:b.thinkingBlockIndex,delta:{type:"thinking_delta",thinking:f}})),e?.content&&(ah(b,c),b.textBlockStarted||(b.textBlockIndex=b.nextBlockIndex++,b.textBlockStarted=!0,b.textBlockClosed=!1,c.push({type:"content_block_start",index:b.textBlockIndex,content_block:{type:k.R4.TEXT,text:""}})),c.push({type:"content_block_delta",index:b.textBlockIndex,delta:{type:"text_delta",text:e.content}})),e?.tool_calls)for(let a of e.tool_calls){let d=a.index??0;if(a.id&&!b.toolCalls.has(d)){ah(b,c),ai(b,c);let e=b.nextBlockIndex++;b.toolCalls.set(d,{id:a.id,name:a.function?.name||"",blockIndex:e});let f=a.function?.name||"";f.startsWith(ag)&&(f=f.slice(ag.length)),c.push({type:"content_block_start",index:e,content_block:{type:k.R4.TOOL_USE,id:a.id,name:f,input:{}}})}a.function?.arguments&&b.toolCalls.get(d)&&(b.toolArgBuffers||(b.toolArgBuffers=new Map),b.toolArgBuffers.set(d,(b.toolArgBuffers.get(d)||"")+a.function.arguments))}if(d.finish_reason){let a;for(let[a,d]of(ah(b,c),ai(b,c),b.toolCalls)){let e=b.toolArgBuffers?.get(a);if(e){let a=function(a,b){try{let c=JSON.parse(b),d=a.startsWith(ag)?a.slice(ag.length):a;return"Read"===d&&function(a){var b,c;"string"==typeof a.limit&&/^\d+$/.test(a.limit)&&(a.limit=Number(a.limit)),"string"==typeof a.offset&&/^-?\d+$/.test(a.offset)&&(a.offset=Number(a.offset)),"number"==typeof a.limit&&(a.limit>2e3&&(a.limit=2e3),a.limit<1&&delete a.limit),"number"==typeof a.offset&&a.offset<0&&(a.offset=0),"pages"in a&&(b=a.file_path,c=a.pages,!("string"==typeof b&&b.toLowerCase().endsWith(".pdf")&&"string"==typeof c&&/^\d+(?:-\d+)?$/.test(c)))&&delete a.pages}(c),JSON.stringify(c)}catch{return b}}(d.name,e);c.push({type:"content_block_delta",index:d.blockIndex,delta:{type:"input_json_delta",partial_json:a}})}c.push({type:"content_block_stop",index:d.blockIndex})}b.finishReason=d.finish_reason;let e=b.usage||{input_tokens:0,output_tokens:0};c.push({type:"message_delta",delta:{stop_reason:(a=d.finish_reason,(0,ae.Q)(a,"claude"))},usage:e}),c.push({type:"message_stop"})}return c.length>0?c:null}),c(32546),aq(f.h.OPENAI,f.h.ANTIGRAVITY,null,function(a,b){if(!a)return null;let c=a.choices?.[0];if(!c)return a.usage&&(b._usage=a.usage),null;let d=c.delta||{},e=c.finish_reason;b._toolCallAccum||(b._toolCallAccum={}),b._responseId||(b._responseId=a.id||`resp_${Date.now()}`),b._modelVersion||(b._modelVersion=a.model||"");let f=[],g=(0,af.Vi)(d);if(g&&f.push({thought:!0,text:g}),d.content&&f.push({text:d.content}),d.tool_calls){for(let a of d.tool_calls){let c=a.index??0;b._toolCallAccum[c]||(b._toolCallAccum[c]={id:"",name:"",arguments:""});let d=b._toolCallAccum[c];a.id&&(d.id=a.id),a.function?.name&&(d.name+=a.function.name),a.function?.arguments&&(d.arguments+=a.function.arguments)}if(0===f.length&&!e)return null}if(e)for(let a of Object.keys(b._toolCallAccum)){let c=b._toolCallAccum[a],d={};try{d=JSON.parse(c.arguments)}catch{}let e=b.toolNameMap?.get(c.name)||c.name;f.push({functionCall:{name:e,args:d}})}if(0===f.length&&!e)return null;0===f.length&&e&&f.push({text:""});let h={content:{role:k.RV.MODEL,parts:f}};e&&(h.finishReason=({[k.bC.STOP]:k.a_.STOP,[k.bC.LENGTH]:k.a_.MAX_TOKENS,[k.bC.TOOL_CALLS]:k.a_.STOP,[k.bC.CONTENT_FILTER]:k.a_.SAFETY})[e]||k.a_.STOP);let i={candidates:[h],modelVersion:b._modelVersion,responseId:b._responseId},j=a.usage||b._usage;return j&&(i.usageMetadata={promptTokenCount:j.prompt_tokens||0,candidatesTokenCount:j.completion_tokens||0,totalTokenCount:j.total_tokens||0},j.completion_tokens_details?.reasoning_tokens&&(i.usageMetadata.thoughtsTokenCount=j.completion_tokens_details.reasoning_tokens),j.prompt_tokens_details?.cached_tokens&&(i.usageMetadata.cachedContentTokenCount=j.prompt_tokens_details.cached_tokens)),{response:i}}),c(4845);var aj=c(32271),ak=c(34097);function al(a){return{id:a.responseId,created:a.created,model:a.model||"kiro"}}function am(a,b){let c=b||"",d=a?.toolNameMap;return d&&"function"==typeof d.get&&d.has(c)?d.get(c):c}function an(a,b){a.thinkingBlockStarted&&(b.push({type:"content_block_stop",index:a.thinkingBlockIndex}),a.thinkingBlockStarted=!1)}function ao(a,b){a.textBlockStarted&&!a.textBlockClosed&&(a.textBlockClosed=!0,b.push({type:"content_block_stop",index:a.textBlockIndex}),a.textBlockStarted=!1)}function ap(a,b){let c=b||"",d=a?.toolNameMap||a?._toolNameMap;return d&&"function"==typeof d.get&&d.has(c)?d.get(c):c}function aq(a,b,c,f){d??=new Map,e??=new Map;let g=`${a}:${b}`;c&&d.set(g,c),f&&e.set(g,f)}aq(f.h.KIRO,f.h.OPENAI,null,function(a,b){if(!a)return null;if("chat.completion.chunk"===a.object&&a.choices)return b?.toolNameMap?.size?{...a,choices:a.choices.map(a=>{let c=a?.delta?.tool_calls;return Array.isArray(c)?{...a,delta:{...a.delta,tool_calls:c.map(a=>a?.function?.name?{...a,function:{...a.function,name:am(b,a.function.name)}}:a)}}:a})}:a;let c=a;if("string"==typeof a){let b=a.split("\n"),d="",e="";for(let a of b)a.startsWith("event:")?d=a.slice(6).trim():a.startsWith(":event-type:")?d=a.slice(12).trim():a.startsWith("data:")?e=a.slice(5).trim():a.startsWith(":content-type:")||a.trim()&&!a.startsWith(":")&&(e=a.trim());if(!e)return null;try{(c=JSON.parse(e))._eventType=d}catch{c={text:e,_eventType:d}}}b.responseId||(b.responseId=`chatcmpl-${Date.now()}`,b.created=Math.floor(Date.now()/1e3),b.chunkIndex=0);let d=c._eventType||c.event||"";if("assistantResponseEvent"===d||c.assistantResponseEvent){let a=c.assistantResponseEvent?.content||c.content||"";if(!a)return null;let d=(0,aj.k)(al(b),{...0===b.chunkIndex?{role:k.z7.ASSISTANT}:{},content:a},null);return b.chunkIndex++,d}if("reasoningContentEvent"===d||c.reasoningContentEvent){let a=c.reasoningContentEvent||c,d="string"==typeof a?a:a.text||a.content||c.content||"";if(!d)return null;let e=(0,aj.k)(al(b),(0,af.B7)(d,0===b.chunkIndex),null);return b.chunkIndex++,e}if("toolUseEvent"===d||c.toolUseEvent){b.hadToolUse=!0;let a=c.toolUseEvent||c,d=a.toolUseId||(0,g.eG)(),e=am(b,a.name),f=a.input||{},h=(0,aj.k)(al(b),{...0===b.chunkIndex?{role:k.z7.ASSISTANT}:{},tool_calls:[{index:0,id:d,type:k.x4.FUNCTION,function:{name:e,arguments:JSON.stringify(f)}}]},null);return b.chunkIndex++,h}if("messageStopEvent"===d||"done"===d||c.messageStopEvent){let a=(0,ae.F)(b.hadToolUse?"tool_use":"stop","kiro");b.finishReason=a;let c=(0,aj.k)(al(b),{},a);return b.usage&&"object"==typeof b.usage&&(c.usage=b.usage),c}if("usageEvent"===d||c.usageEvent){let a=(0,ak.B)(c.usageEvent||c,"kiro");a&&(b.usage=a)}return null}),aq(f.h.CURSOR,f.h.OPENAI,null,function(a,b){return a?("chat.completion.chunk"===a.object&&a.choices||"chat.completion"===a.object&&a.choices,a):null}),c(39551),c(47723);function ar(a,b,c,e,j=!0,o=null,r=null,s=null,t=[],u=null,v=null){let w=e,x=function(a){if(Array.isArray(a?.messages))return a.messages[a.messages.length-1]?.role;let b=Array.isArray(a?.contents)?a.contents:Array.isArray(a?.input)?a.input:null;if(!b)return;let c=b[b.length-1]?.role;return c===q.z.ASSISTANT||c===q.R.MODEL?q.z.ASSISTANT:void 0}(e);!function(a,b=[]){if(!b.length||!a.messages||!Array.isArray(a.messages))return;let c=new Set(["image_url","image"]),d=new Set(["audio_url","input_audio"]),e=a=>c.has(a)?b.includes("image"):!!d.has(a)&&b.includes("audio");for(let b of a.messages)Array.isArray(b.content)&&(b.content=b.content.filter(a=>!e(a.type)),0===b.content.length&&(b.content=""))}(w,t),(0,l.SZ)(w),(0,g.fH)(w),b!==f.h.KIRO&&(0,g.SF)(w);let y=(0,m.NU)(w),z=(0,n.YC)(w,o,u,b);o&&(o._clientSessionId=z);let A={preserveCacheControl:b===f.h.OPENAI&&!!p.xq[r]?.quirks?.preserveCacheControl};if(a!==b){let e=d.get(`${a}:${b}`);if(e)w=e(c,w,j,o,A);else{if(a!==f.h.OPENAI){let b=d.get(`${a}:${f.h.OPENAI}`);b&&(w=b(c,w,j,o,A),s?.logOpenAIRequest?.(w))}if(b!==f.h.OPENAI){let a=d.get(`${f.h.OPENAI}:${b}`);a&&(w=a(c,w,j,o))}}}if((b!==f.h.KIRO||a!==f.h.OPENAI&&a!==f.h.CLAUDE)&&(0,m.z)(b,c,w,r,y),b===f.h.OPENAI&&(w=function(a,b={}){if(!a.messages||!Array.isArray(a.messages))return a;let c=!!b.preserveCacheControl;function d(a){let{signature:b,cache_control:d,...e}=a;return c&&d?{...e,cache_control:d}:e}if(a.messages=a.messages.map(a=>{if(a.role===k.z7.DEVELOPER&&(a={...a,role:k.z7.SYSTEM}),a.role===k.z7.TOOL||a.role===k.z7.ASSISTANT&&a.tool_calls||"string"==typeof a.content)return a;if(Array.isArray(a.content)){let b=[];for(let c of a.content)if(c.type!==k.R4.THINKING&&c.type!==k.R4.REDACTED_THINKING)if(k.m8.includes(c.type))b.push(d(c));else{if(c.type===k.R4.TOOL_USE)continue;c.type===k.R4.TOOL_RESULT&&b.push(d(c))}return 0===b.length&&b.push({type:k.x4.TEXT,text:""}),{...a,content:b}}return a}),a.messages=a.messages.filter(a=>a.role===k.z7.TOOL||a.role===k.z7.ASSISTANT&&!!a.tool_calls||("string"==typeof a.content?""!==a.content.trim():!Array.isArray(a.content)||a.content.some(a=>a.type===k.x4.TEXT&&a.text?.trim()||a.type!==k.x4.TEXT))),a.tools&&Array.isArray(a.tools)&&0===a.tools.length&&delete a.tools,a.tools&&Array.isArray(a.tools)&&a.tools.length>0&&(a.tools=a.tools.map(a=>a.type===k.x4.FUNCTION&&a.function?a:a.name&&(a.input_schema||a.description)?{type:k.x4.FUNCTION,function:{name:a.name,description:String(a.description||""),parameters:a.input_schema||{type:"object",properties:{}}}}:a.functionDeclarations&&Array.isArray(a.functionDeclarations)?a.functionDeclarations.map(a=>({type:k.x4.FUNCTION,function:{name:a.name,description:String(a.description||""),parameters:a.parameters||{type:"object",properties:{}}}})):a).flat()),a.tool_choice&&"object"==typeof a.tool_choice){let b=a.tool_choice;"auto"===b.type?a.tool_choice="auto":"any"===b.type?a.tool_choice="required":"tool"===b.type&&b.name&&(a.tool_choice={type:k.x4.FUNCTION,function:{name:b.name}})}return a}(w,A)),b===f.h.CLAUDE){let a=o?.accessToken||o?.apiKey||null;w=(0,h.Bz)(w,r,a,u,o?.rawHeaders,z),Array.isArray(w?.messages)&&(w.messages=(0,h.HU)(w.messages,x))}if(p.xq[r]?.quirks?.cloakToolsOnOAuth){let a=o?.accessToken||o?.apiKey||null;if(a?.includes("sk-ant-oat")){let{body:a,toolNameMap:b}=(0,i.Az)(w);w=a,b?.size>0&&(w._toolNameMap=b)}}return w}function as(a,b,c,d){if(b===a)return d&&c&&"object"==typeof c&&(d.streamToolCallIds||(d.streamToolCallIds=new Map),(0,o.RW)(c,d.streamToolCallIds)),[(0,j.HR)((0,i.F5)(c,d?.toolNameMap),d?.toolNameMap)];let g=[c],h=null,k=e.get(`${a}:${b}`);if(k){let a=k(c,d),b=a?Array.isArray(a)?a:[a]:[];return(0,j.HR)(b,d?.toolNameMap)}if(a!==f.h.OPENAI){let b=e.get(`${a}:${f.h.OPENAI}`);if(b){g=[];let a=b(c,d);a&&(h=g=Array.isArray(a)?a:[a])}}if(b!==f.h.OPENAI){let a=e.get(`${f.h.OPENAI}:${b}`);if(a){let b=[];for(let c of g){let e=a(c,d);e&&b.push(...Array.isArray(e)?e:[e])}g=b}}return g=(0,j.HR)(g,d?.toolNameMap),h&&b!==f.h.OPENAI&&a!==f.h.OPENAI&&(g._openaiIntermediate=h),g}function at(a,b){return a!==b}function au(a){let b={messageId:null,model:null,textBlockStarted:!1,thinkingBlockStarted:!1,inThinkingBlock:!1,currentBlockIndex:null,toolCalls:new Map,streamToolCallIds:new Map,finishReason:null,finishReasonSent:!1,usage:null,contentBlockIndex:-1};return a===f.h.OPENAI_RESPONSES?{...b,seq:0,responseId:`resp_${Date.now()}`,created:Math.floor(Date.now()/1e3),started:!1,msgTextBuf:{},msgItemAdded:{},msgContentAdded:{},msgItemDone:{},reasoningId:"",reasoningIndex:-1,reasoningBuf:"",reasoningPartAdded:!1,reasoningDone:!1,inThinking:!1,funcArgsBuf:{},funcNames:{},funcCallIds:{},funcItemAdded:{},funcArgsDone:{},funcItemDone:{},customToolNames:new Set,responsesUsage:null,completionPending:!1,completedSent:!1}:b}function av(){}aq(f.h.KIRO,f.h.CLAUDE,null,function(a,b){let c=a;if("string"==typeof a){let b=a.trim();if(!b||"[DONE]"===b)return null;try{c=JSON.parse(b.startsWith("data:")?b.slice(5).trim():b)}catch{return null}}if(!c||!c.choices?.[0])return null;let d=[],e=c.choices[0],f=e.delta||{};if(c.usage&&"object"==typeof c.usage){b.usage={input_tokens:"number"==typeof c.usage.prompt_tokens?c.usage.prompt_tokens:0,output_tokens:"number"==typeof c.usage.completion_tokens?c.usage.completion_tokens:0};let a=c.usage.cache_read_input_tokens??c.usage.prompt_tokens_details?.cached_tokens,d=c.usage.cache_creation_input_tokens??c.usage.prompt_tokens_details?.cache_creation_tokens;"number"==typeof a&&(b.usage.cache_read_input_tokens=a),"number"==typeof d&&(b.usage.cache_creation_input_tokens=d)}b.messageStartSent||(b.messageStartSent=!0,b.messageId="string"==typeof c.id&&c.id.replace("chatcmpl-","")||`msg_${Date.now()}`,b.model=c.model||"kiro",b.nextBlockIndex=0,d.push({type:"message_start",message:{id:b.messageId,type:"message",role:"assistant",model:b.model,content:[],stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0}}}));let g=f.reasoning_content||f.reasoning;if(g&&(ao(b,d),b.thinkingBlockStarted||(b.thinkingBlockIndex=b.nextBlockIndex++,b.thinkingBlockStarted=!0,d.push({type:"content_block_start",index:b.thinkingBlockIndex,content_block:{type:"thinking",thinking:""}})),d.push({type:"content_block_delta",index:b.thinkingBlockIndex,delta:{type:"thinking_delta",thinking:g}})),f.content&&(an(b,d),b.textBlockStarted||(b.textBlockIndex=b.nextBlockIndex++,b.textBlockStarted=!0,b.textBlockClosed=!1,d.push({type:"content_block_start",index:b.textBlockIndex,content_block:{type:"text",text:""}})),d.push({type:"content_block_delta",index:b.textBlockIndex,delta:{type:"text_delta",text:f.content}})),f.tool_calls)for(let a of(b.toolCalls||(b.toolCalls=new Map),b.toolArgBuffers||(b.toolArgBuffers=new Map),f.tool_calls)){let c=a.index??0;if(a.id){an(b,d),ao(b,d);let e=b.nextBlockIndex++;b.toolCalls.set(c,{id:a.id,name:ap(b,a.function?.name),blockIndex:e}),d.push({type:"content_block_start",index:e,content_block:{type:"tool_use",id:a.id,name:ap(b,a.function?.name),input:{}}})}a.function?.arguments&&b.toolCalls.get(c)&&b.toolArgBuffers.set(c,(b.toolArgBuffers.get(c)||"")+a.function.arguments)}if(e.finish_reason){if(an(b,d),ao(b,d),b.toolCalls)for(let[a,c]of b.toolCalls){let e=b.toolArgBuffers?.get(a);e&&d.push({type:"content_block_delta",index:c.blockIndex,delta:{type:"input_json_delta",partial_json:e}}),d.push({type:"content_block_stop",index:c.blockIndex})}b.finishReason=e.finish_reason;let a=b.usage||{input_tokens:0,output_tokens:0};d.push({type:"message_delta",delta:{stop_reason:function(a){switch(a){case"stop":default:return"end_turn";case"length":return"max_tokens";case"tool_calls":return"tool_use"}}(e.finish_reason)},usage:a}),d.push({type:"message_stop"})}return d.length>0?d:null})},95189:(a,b,c)=>{c.d(b,{_W:()=>A,HU:()=>x,ui:()=>w,Bz:()=>B});var d=c(96281),e=c(43698);c(74525);var f=c(55399),g=c(80662);function h(a){let b=function(a){let b=(a||"").trim();if(!b)return"";let c=b.indexOf("#");return c>=0?b.slice(c+1).trim():b}(a);if(!b||b.length>0x2000000)return!1;try{if("E"===b[0]){let a=Buffer.from(b,"base64");return a.length>0&&18===a[0]}if("R"===b[0]){let a=Buffer.from(b,"base64");if(!a.length||69!==a[0])return!1;let c=Buffer.from(a.toString(),"base64");return c.length>0&&18===c[0]}return!1}catch{return!1}}var i=c(26070),j=c(24),k=c(59096),l=c(41004);let m={type:"ephemeral"},n={type:"ephemeral",ttl:"1h"};function o(a){if(!Array.isArray(a))return -1;for(let b=a.length-1;b>=0;b--)if(a[b]?.defer_loading!==!0)return b;return -1}let p=new Set([e.R4.TOOL_USE,e.R4.TOOL_RESULT,e.R4.IMAGE,e.R4.DOCUMENT,e.R4.CONTAINER_UPLOAD]);function q(a){return!!a&&(a.type===e.R4.TEXT?!!a.text?.trim():p.has(a.type))}function r(a){let b=a?.content;return b&&"object"==typeof b&&!Array.isArray(b)&&(delete b.cache_control,a.content=[b]),a}function s(a){let b=0;if(Array.isArray(a?.system))for(let c of a.system)c?.cache_control&&b++;if(Array.isArray(a?.tools))for(let c of a.tools)c?.cache_control&&b++;if(Array.isArray(a?.messages))for(let c of a.messages)if(Array.isArray(c?.content))for(let a of c.content)a?.cache_control&&b++;else c?.content&&"object"==typeof c.content&&c.content.cache_control&&b++;return b}function t(a=""){if(!/haiku/i.test(a))return!1;let b=String(a).match(/haiku[-._]?(\d+)|(?<![\d.])(\d+)(?:[-._]\d+)?[-._]?haiku/i);return!b||5>Number(b[1]||b[2])}function u(a,b=!1){let c={type:e.R4.THINKING,thinking:"."};return"deepseek"===a||b||(c.signature=d.xr),c}let v=/^srvtoolu_[a-zA-Z0-9_]+$/;function w(a,b=""){if(!a||"object"!=typeof a)return a;a.thinking?.type==="adaptive"&&t(b)&&(a.thinking={type:"enabled",budget_tokens:1e4}),t(b)&&a.output_config?.effort!=null&&(delete a.output_config.effort,0===Object.keys(a.output_config).length&&delete a.output_config);let c=Array.isArray(a.messages)?a.messages[a.messages.length-1]?.role:void 0;if(Array.isArray(a.messages))for(let b of a.messages)r(b);if(Array.isArray(a.messages)){let b=[];for(let c of a.messages){if(c.role!==e.z7.SYSTEM){b.push(c);continue}let a="string"==typeof c.content?c.content:Array.isArray(c.content)?c.content.map(a=>"string"==typeof a?a:a?.text||"").join("\n"):"";if(!a.trim())continue;let d={type:e.R4.TEXT,text:a},f=b[b.length-1];if(f?.role===e.z7.USER){let a="string"==typeof f.content?[{type:e.R4.TEXT,text:f.content}]:Array.isArray(f.content)?[...f.content]:[];b[b.length-1]={...f,content:[...a,d]};continue}b.push({role:e.z7.USER,content:[d]})}a.messages=b}let d=a.thinking?.type==="enabled",f=new Set;if(Array.isArray(a.messages))for(let b of a.messages){if(b.role!==e.z7.ASSISTANT||!Array.isArray(b.content))continue;let a=!1,c=!1,g=[];for(let d of b.content){if(d.type===e.R4.THINKING||d.type===e.R4.REDACTED_THINKING){h(d.signature)&&(c=!0,g.push(d));continue}if(d?.type===e.R4.SERVER_TOOL_USE&&!v.test(String(d.id??""))){null!=d.id&&f.add(String(d.id));continue}d.type===e.R4.TOOL_USE&&(a=!0),g.push(d)}b.content=g,d&&!c&&a&&b.content.unshift(u("claude"))}if(f.size>0&&Array.isArray(a.messages))for(let b of a.messages){if(!Array.isArray(b.content))continue;let a=b.content.filter(a=>!((a?.type===e.R4.TOOL_RESULT||a?.type===e.R4.WEB_SEARCH_TOOL_RESULT)&&f.has(String(a.tool_use_id??""))));a.length!==b.content.length&&(b.content=a)}return Array.isArray(a.messages)&&(a.messages=a.messages.filter(a=>"string"==typeof a.content?a.content.trim().length>0:!Array.isArray(a.content)||(a.content=a.content.filter(a=>!(a?.type===e.R4.TEXT&&!String(a.text??"").trim())&&!(a?.type===e.R4.THINKING&&!String(a.thinking??"").trim())),a.content.length>0)),a.messages=x(a.messages,c)),a}function x(a,b){return Array.isArray(a)&&b!==e.z7.ASSISTANT&&a[a.length-1]?.role===e.z7.ASSISTANT?[...a,{role:e.z7.USER,content:[{type:e.R4.TEXT,text:"Continue."}]}]:a}function y(a){if(!Array.isArray(a?.content))return!1;for(let b=a.content.length-1;b>=0;b--){let c=a.content[b];if("object"==typeof c&&null!==c&&c.type!==e.R4.THINKING&&c.type!==e.R4.REDACTED_THINKING)return c.cache_control={...m},!0}return!1}function z(a){let b=a?.messages,c=Array.isArray(b)?b[b.length-1]:null;return!(c?.role!==e.z7.USER||!Array.isArray(c.content)||!c.content.some(a=>a?.type===e.R4.TOOL_RESULT)||c.content.some(a=>a?.cache_control)||s(a)>=4)&&y(c)}function A(a){if(!a||"object"!=typeof a)return a;if(Array.isArray(a.messages))for(let b of a.messages)r(b);if(Array.isArray(a.tools))for(let b of a.tools)b?.defer_loading===!0&&delete b.cache_control;if(Array.isArray(a.system)){let b=a.system.length-1;a.system.forEach((a,c)=>{"object"==typeof a&&null!==a&&(c===b?a.cache_control={...n}:delete a.cache_control)})}if(Array.isArray(a.tools)){let b=o(a.tools);a.tools.forEach((a,c)=>{c===b?a.cache_control={...n}:delete a.cache_control})}if(s(a)>=4)return!function(a){let b=b=>{let c=Array.isArray(a?.system)?a.system:[];if(c.length&&c[c.length-1]===b)return!0;let d=Array.isArray(a?.tools)?a.tools:[],e=o(d);return e>=0&&d[e]===b},c=[];if(Array.isArray(a?.system))for(let b of a.system)b?.cache_control&&c.push(b);if(Array.isArray(a?.tools))for(let b of a.tools)b?.cache_control&&c.push(b);if(Array.isArray(a?.messages)){for(let b of a.messages)if(Array.isArray(b?.content))for(let a of b.content)a?.cache_control&&c.push(a)}let d=c.filter(b),e=c.filter(a=>!b(a)),f=Math.max(0,4-d.length);for(let a of e.slice(0,Math.max(0,e.length-f)))delete a.cache_control}(a),a;if(Array.isArray(a.messages)){let b=null;for(let c=a.messages.length-1;c>=0;c--){let d=a.messages[c];if(Array.isArray(d.content)){for(let a of d.content)delete a.cache_control;b||d.role!==e.z7.ASSISTANT||(b=y(d))}}if(!b)for(let c=a.messages.length-1;c>=0&&!b;c--)b=y(a.messages[c]);z(a)}return a}function B(a,b=null,c=null,m=null,n=null,p=null){i.xq[b]?.quirks?.dropOutputConfig&&delete a.output_config,"claude"===b||b?.startsWith?.("anthropic-compatible-")||delete a.context_management;let s=(0,j.getCapabilitiesForModel)(b,a.model);if(s.thinkingOffType&&a.thinking?.type==="disabled"){a.thinking={type:s.thinkingOffType};let b=a.output_config?.effort;("xhigh"===b||"max"===b)&&(a.output_config.effort="high")}if(!1===s.forcedToolChoice&&(a.tool_choice?.type==="any"||a.tool_choice?.type==="tool")){let{disable_parallel_tool_use:b}=a.tool_choice;a.tool_choice={type:"auto",...void 0!==b?{disable_parallel_tool_use:b}:{}}}if(a.max_tokens){let b=s.maxOutput||l.Uc;a.max_tokens>b&&(a.max_tokens=b),a.thinking?.type==="enabled"&&a.thinking.budget_tokens&&a.thinking.budget_tokens>=a.max_tokens&&(a.max_tokens=Math.min(a.thinking.budget_tokens+1024,b),a.thinking.budget_tokens>=a.max_tokens&&(a.thinking.budget_tokens=Math.max(1024,a.max_tokens-1024)))}if(a.system&&Array.isArray(a.system)&&(a.system=a.system.map((b,c)=>{let{cache_control:d,...e}=b;return c===a.system.length-1?{...e,cache_control:{type:"ephemeral",ttl:"1h"}}:e})),a.messages&&Array.isArray(a.messages)){let c=a.messages.length,f=a.messages[c-1]?.role,g=[];for(let b=0;b<c;b++){let d=a.messages[b];if(r(d),Array.isArray(d.content))for(let a of d.content)delete a.cache_control;(b===c-1&&"assistant"===d.role||"string"==typeof d.content&&d.content.trim()||(d.content&&"object"==typeof d.content&&!Array.isArray(d.content)?q(d.content):!!Array.isArray(d.content)&&d.content.some(q)))&&g.push(d)}g=x(g=function(a){if(a.length<=1)return a;for(let b of a)if(b.role===e.z7.ASSISTANT&&Array.isArray(b.content)&&b.content.some(a=>a.type===e.R4.TOOL_USE)){let a=[],c=!1;for(let d of b.content)d.type===e.R4.TOOL_USE?(c=!0,a.push(d)):d.type===e.R4.THINKING||d.type===e.R4.REDACTED_THINKING?a.push(d):c||a.push(d);b.content=a}let b=[];for(let c of a){let a=b[b.length-1];if(a&&a.role===c.role){let b=Array.isArray(a.content)?a.content:[{type:e.R4.TEXT,text:a.content}],d=Array.isArray(c.content)?c.content:[{type:e.R4.TEXT,text:c.content}];a.content=[...b.filter(a=>a.type===e.R4.TOOL_RESULT),...d.filter(a=>a.type===e.R4.TOOL_RESULT),...b.filter(a=>a.type!==e.R4.TOOL_RESULT),...d.filter(a=>a.type!==e.R4.TOOL_RESULT)]}else{let a=Array.isArray(c.content)?c.content:[{type:e.R4.TEXT,text:c.content}];b.push({role:c.role,content:[...a]})}}return b}(g),f),a.messages=g;let i=g[g.length-1],j=i?.role==="user",l="deepseek"===b||"opencode-go"===b&&(0,k.wR)(a?.model),m=j&&(a.thinking?.type==="enabled"||l&&a.thinking?.type==="adaptive"),n=!1;for(let a=g.length-1;a>=0;a--){let c=g[a];if("assistant"===c.role&&Array.isArray(c.content)){if(!n&&c.content.length>0){for(let a=c.content.length-1;a>=0;a--){let b=c.content[a];if(b.type!==e.R4.THINKING&&b.type!==e.R4.REDACTED_THINKING){b.cache_control={type:"ephemeral"};break}}n=!0}if("claude"===b||b?.startsWith("anthropic-compatible")||"deepseek"===b||l){let a=!1,f=!1,g="claude"===b,i=[];for(let b of c.content){if(b.type===e.R4.THINKING||b.type===e.R4.REDACTED_THINKING){if(!String(b.thinking??"").trim())continue;g?h(b.signature)&&(f=!0,i.push(b)):(l||(b.signature=d.xr),f=!0,i.push(b));continue}b.type===e.R4.TOOL_USE&&(a=!0),i.push(b)}c.content=i,m&&!f&&a&&c.content.unshift(u(b,l))}}}}if(a.tools&&Array.isArray(a.tools)){if("claude"!==b){let c=i.xq[b]?.quirks?.claudeSupportedToolTypes,d=Array.isArray(c);a.tools=a.tools.filter(a=>{let b=a?.type;return!b||"function"===b||!!d&&c.includes(b)}).map(a=>{if(a.function)return{name:a.function.name,description:a.function.description,input_schema:a.function.parameters};if(d)return a;let{type:b,...c}=a;return c})}let c=o(a.tools);a.tools=a.tools.map((a,b)=>{let{cache_control:d,...e}=a;return b===c?{...e,cache_control:{type:"ephemeral",ttl:"1h"}}:e}),0===a.tools.length&&(delete a.tools,delete a.tool_choice)}if("claude"===b||b?.startsWith("anthropic-compatible")||(a=function(a){if(!Array.isArray(a?.messages))return a;let b=!1,c=a.messages.map(a=>{if(a?.role!==e.z7.USER||!Array.isArray(a.content))return a;let c=[],d=a.content.map(a=>{if(a?.type!==e.R4.TOOL_RESULT||!Array.isArray(a.content))return a;let b=a.content.filter(a=>a?.type===e.R4.IMAGE);if(!b.length)return a;let d=a.content.filter(a=>a?.type!==e.R4.IMAGE);return c.push({type:e.R4.TEXT,text:`[Image from tool result ${a.tool_use_id}]`},...b),{...a,content:d.length?d:[{type:e.R4.TEXT,text:"(image attached below)"}]}});return c.length?(b=!0,{...a,content:[...d,...c]}):a});return b?{...a,messages:c}:a}(a)),z(a),("claude"===b||b?.startsWith("anthropic-compatible"))&&c){let b=p||(0,g.oV)({headers:n,body:a,connectionId:m,scope:"claude"});a=(0,f.fO)(a,c,b)}return a}},96281:(a,b,c)=>{c.d(b,{$G:()=>g,bf:()=>e,n6:()=>f,xr:()=>d});let d="EpwGCkYIChgCKkCzVUuRrg7CcglSUWEef4rH6o35g9UYS8ZPe0/VomQTBsFx6sttYNj5l8GqgW6ejuHyYqpFToxIbZl0bw17l5dJEgzCnqDO0Z8fRlMrNgsaDLS1cnCjC53KBqE0CCIwAADQdo1eO+7qPAmo8J4WR3JPmr92S97kmvr5K1iPMiOpkZNj8mEXW8uzBoOJs/9ZKoMFiqHJ3UObwaJDqFOW70E9oCwDoc6jesaWVAEdN5vWfKMpIkjFJjECdjIdkxyJNJ8Ib8yXVal3qwE7uThoPRqSZDdHB5mmwPEjWE/90cSYCbtX2YsJki1265CabBb8/QEkODXg4kgRrL+c8e8rRXz/dr1RswvaPuzEdGKHRNi9UooNUeOK4/ebx1KkP9YZttyohN9GWqlts36kOoW0Cfie/ABDgF9g534BPth/sstxDM6d79QlRmh6NxizyTF74DXJI34u0M4tTRchqE5pAq85SgdJaa+dix1yJPMji8m6nZkwJbscJb9rdc2MKyKWjz8QL2+rTSSuZ2F1k1qSsW0xNcI7qLcI12Vncfn/VqY6YOIZy/saZBR0ezXvN6g+UYbuIdyVg7AyIFZt3nbrO7/kmOEb2VKzygwklHGEIJHfFgMpH3JSrAzbZIowVHOF7VaJ+KXRFDCFin7hHTOiOsdg+1ij1mML9Z/x/9CP4b7OUcaQm1llDZPSHc6rZMNL3DdB+fW5YfmNgKU35S+7AMtA10nVILzDAk1UV4T2K9Do09JlI6rjOs9UuULlIN2Z0eE8YTlANR6uQcw7lMcdfqYE8tke4rDKc2dDiaS5vVe45VewICNpdXGN11yw8QqH7p27CR1HtN30e0tHXOR3bIwWk/Yb6O5fTaKG6Ri8e5ZCPvdD9HqepVi188nM0iTjJqL58F3ni04ECIhcbyaQWnuTes1Kw4CMwiZDLQkk8Hgz7HkUOf1btQTF/0nhD7ry0n0hAEg2PaDM3V6TjOjf4hEldRmeqERcQF1PfgKb6ZM12rlIIfUqKACczWJSzTV158+47HX36o0cgux6nFlv/DE+sEiRVxgB",e="EuwGCukGAXLI2nxwZIq54WWSoL/YN0P3TsDZ7zRnLi8g0S4aVr2HUGxvaHKySuY6HAVzcE0GPGjXrytLIldxthSvfxgUlJh6Qa9Z+Oj5QZBlYdg6HaJ6yuY5R7waE6rdwBsRf7Ft2j3DJ9rMi9qhWFqApewYtPhls3VHtuvND3l8Rm09+lbAXQs6KKWEWrxNLKTBkfpMgXhRERc/TQRMZu1twAablm6/Zk1tsYRvfWKLsNbeKF+CCojJdXJKvnR/8Ouuoa+Y2Ti20hcW7aZIIjZDFYPU//k6Ybmhg69J/imbFai2ckhfLaisqdDkdoIiBJScTOUvYqP6AE9d4MsydSC+UlhIMk4hoP76R8vUSCZRMkjOaDXstf/QoVZKbt94wyRZgAJ1G0BqI8L5ow86kLpA4wJEtxsRGymOE4bKUvApveBakYDNM9APkf+LbtbzWSseGjoZcSlycF9iN8Q2XNYKRrHbv3Lr5Y8JjdH/5y/6SHkNehTEZugaeGnSPSyCTWto1kQgHpxdWmhkLfJGNUGLmue7Mesj4TSms4J33mRpYVhNB/J333FCqIP0hr/E7BkkjEn7yZ4X7SQlh+xKPurapsnHRwiKmtsilmEFrnTE9iQr+pMr6M29qqFNv1tr5yumbaJw8JW9sB15tNsRv+dW6BjNanbsKz7HCgKUBc8tGy+7YuhXzAfViyRefcjK7eZW0Fbyt7AbybJTKz78W8NH7ye6LAwzOebXpeZ4D43fNIt8bKh26qgduSQv/7o+pAflkuqHZ99YWgHQ8h8OkZFi3eOiSYjsjhdZ/czWOdoPI/OnqIldzMPF5YlrKBLFX8VhRKVmqgsmWf5PHGulHhMkVlS+XG2UIseGy69ARa93D78Gsa+1n1kJr7EEB7Rh+27vUMxVYLdz1yMSvE5nalTAlg/ZeG8+XQ0cHuAI3KbQpHW2Q++RdXfm5JzD5WdJZUU+Zn8t8UUn85BH4RxZLeE0qJikgSsKoYVBc6YhiMjhPgkR95ReimY4Z0xCJdRo1gjexOFeODZMpQF6Yxnoic7IrdgsFA3iePTbFnPp3IAM1fAThWhXJUn3QInUOTd5o1qmTmn6REbL15g/JQNl+dqUoPkhleeb2V3kjqp1okmO3wMZbPknR3S1LZNmlS72/iBQUm+n2b/RCn4PjmM2",f="CloBjz1rX5+yg1ILh/Ag+suum5k1f/9m/hI0XDQ33lsQIYnOHLn9KZwN0C7E4jgep5MzZvz5Se1Z1xxYrA1+Iz0Il4tabBhaDfMKNa5dGdEA3KnikfjfIpMlPaAKaQGPPWtf2hodPdBgguiZqDn+Qz2LwGEqHVJ16LVBUpeSx7UnYBLSwio8cyNy0jPijOh5QXKLTeHVdO2tKKcCCrtG2JCW3dOSrW2qA8eyAg40iQUnMNECjbcjkqB1+zrab7jX9ILwg7L9OgqYAQGPPWtfT4nzaPzSkXePAa920abYxPs3fg/RHDlg8PUVFLa+ko6qOjt7nXJTMxN0cpCwUCFX7eHHcMnA6vApyA/rXvJiAABkHZ3HilAktXRtxr/thHU0H8/4H5gT3kzoQcq9aMznrKomd3ct0mFi0ioSKnOEfoY1Mrfj00p/ZWm0tT7Wrjcm3BQXZ+T9Vrb94k+6CjtcEBrGCq8BAY89a1/vTMczqwB1NP3HCCuBdnds2vDXkj6XAYaXjsjmik8tGqwMKHz8R9RAWsx6SO6pkGEpXXpRzAaUx6c+aofsL/z1xOcN7ArCAa6uEeQKEgNngZuCP05p4+9P95epVmgOjFa4KfsPnyg+NKUkEFmpPSDrIRyMT+xERlclVcCI98/u7i8a9+vTbgzl8TRFYryClNH37K1ye5i6kqSGDUcMyiEasjke5BxbUh3i6wqMAgGPPWtfk+A+iY38QAldu117FEkTIkzbYOIt67lk9c6Ou3Y3Ct8TFHFw5QwGfSFc0YWjeTFHdm9UdV5jPK35p6VfhiRSva3w2+JLIHb4jvv5HutZPOJ3yQTt/+hUDj80oMNMbwnxNZvCEdzKS+D9vwmTACAm5H0ZetBSH2gPJXnhhuQo9AegS3wIWVR2a5k643Vx9r4u4pOvij4476lxKswIHvqsjL4jnTzRCvd44G6dn7vD0ENGb1K/i+dMRQMcOBaOxPN0ynk9bKxXWRDbZ+Rhakfr+y74z+6eYCdRPVqO9I7s+riilFuRIfaQ+U6/vuVKGIWEVKCfZZi0z6H5Xgz1xmse0u0AsittDlIKxwEBjz1rX783A0vehvUeabRia+/pX46IsN5efTAxFEBUeUce3jLuXIghkMV2b8KNhUs2G0aZldDDewRQbkluQabBMDT82N5I7reJP0VZgLIKccCL5DoGv1J7YWM2npLMIgZ6aP8aSlT3PFFJ0IXbUZUrzduczmIm6nzAJf9zxmq1aIFYw8YrgW8RjUdy0UvUmRoBEShSGUrvsyaRTl7J//KJW5utIPunFMu53GPWLidCFHzM1QA3Cj1+4zv5UXajP/V92RQayWbzCvYBAY89a1+yzoVSWukUGH7kX71Tg9dx7HA7OyKYwnYaqekG98zJfcUM/3KoiiiotW5t4xYu//ksEl36bSWvUHsRnxGByg+3WYdnZqKg0AtdRB/EXbI5PsjvS5ko96bkjSuFkY3TjHGwAM2B94K6/t6OTE/NBbxCsY9sT4d+1sbFv/iyfmfCnfvJaSzGmC9CDWKy4iqQ/vBNWps9j1JXk0p5uPAYC2BaMkxl5xoTVZqI3zAuRtQF5JLmPPy+PdqOgFxMKcLGNhwp7dbhIFLF68vCYQ9CL0NnK2d3CFk1UFVYxsi1TsolR1xahe/Rxt5HZDz/z65nevrQ",g="CiQBjz1rX/AlslZWMe5RgBt4Tv9j4+YNZTTez+JH2/+5oAlICygKXgGPPWtf7/Sux9eLYap/bmYAdPqFThLXj+l7o0DLu/hdgU98MA9ZrlRDNHXx+T0tuY8AcnjPZbiDyOq2bE11Fjhsk6p5axqayaapC/Pt9GczcgIQf1z15WTxCeKWAPYKYQGPPWtfDYj0nlNFNoTlU39RC91Z16xFKJ2MLEmkm+NvimsoOJ6be3g2BssNPtJ/9BKDXRA5cVs17tBeeW72lH8TMB5999udtxHM2SiUsnWsrHlfVuGSCpNQQ+5REw8HNvEKkgEBjz1rXzBNWrqZGbjun55K+vgYPBhJO2qZ67uRWXUA5/qcU12U/mbi5XoA3swoxYE8LEXfZvFFC9WG/W28QNCA0Qd4Trk/WkWiAwZmB8a84Fs14rkv3wqyxwFavPkJorqurAfd2XzGiFy0sB0ITCOPYi1HzDGV5WfXk6b9k+jT66/RuzGa8EcSOWo/QtC3Bkhgowo4AY89a1/f/tw8A02zjIoK7JVDAbf8W4UfmbApJJhwXIiGtu1M0JItObx7g2reYqT+HHL2Q/R4VDc="},97102:(a,b,c)=>{c.d(b,{m$:()=>p});var d=c(82380),e=c(14170),f=c(96281),g=c(19979),h=c(71782),i=c(26922),j=c(80662),k=c(43698),l=c(24);function m(){return crypto.randomUUID()}function n(a){if(!a)return"_unknown";let b=a.replace(/[^a-zA-Z0-9_.:\-]/g,"_");return/^[a-zA-Z_]/.test(b)||(b="_"+b),b.substring(0,64)}function o(a,b,c,d=f.bf,e=null){let g,j={model:a,contents:[],generationConfig:{},safetySettings:i.fc},m=!(0,l.isGemini4Model)(a);m&&void 0!==b.temperature&&(j.generationConfig.temperature=b.temperature),m&&void 0!==b.top_p&&(j.generationConfig.topP=b.top_p),m&&void 0!==b.top_k&&(j.generationConfig.topK=b.top_k),void 0!==b.max_tokens&&(j.generationConfig.maxOutputTokens=b.max_tokens);let p={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if(a.role===k.z7.ASSISTANT&&a.tool_calls)for(let b of a.tool_calls)b.type===k.x4.FUNCTION&&b.id&&b.function?.name&&(p[b.id]=b.function.name)}let q={};if(b.messages&&Array.isArray(b.messages))for(let a of b.messages)a.role===k.z7.TOOL&&a.tool_call_id&&(q[a.tool_call_id]||=[]).push(a.content);let r={},s=(g=new Set,{next(a){if(!a)return a;if(!g.has(a))return g.add(a),a;let b=2,c=`${a}-${b}`;for(;g.has(c);)c=`${a}-${b++}`;return g.add(c),c}});if(b.messages&&Array.isArray(b.messages))for(let c=0;c<b.messages.length;c++){let f=b.messages[c],g=f.role,l=f.content;if(g===k.z7.SYSTEM&&b.messages.length>1)j.systemInstruction={role:k.RV.USER,parts:[{text:"string"==typeof l?l:(0,i.kU)(l)}]};else if(g===k.z7.USER||g===k.z7.SYSTEM&&1===b.messages.length){let a=(0,i.S6)(l);a.length>0&&j.contents.push({role:k.RV.USER,parts:a})}else if(g===k.z7.ASSISTANT){let g=[];if(f.reasoning_content&&(g.push({thought:!0,text:f.reasoning_content}),g.push({thoughtSignature:d,text:""})),l){let a="string"==typeof l?l:(0,i.kU)(l);a&&g.push({text:a})}if(f.tool_calls&&Array.isArray(f.tool_calls)){let l=[],m=!1;for(let b of f.tool_calls){if(b.type!==k.x4.FUNCTION)continue;let c=(0,i.pT)(b.function?.arguments||"{}"),f=(b.id?(0,h.el)(b.id,e,a):null)||(m?void 0:d);m=!0;let j=s.next(b.id),o={functionCall:{id:j,name:n(b.function.name),args:c}};f&&(o.thoughtSignature=f),g.push(o),l.push({origId:b.id,emitId:j,name:b.function?.name})}g.length>0&&j.contents.push({role:k.RV.MODEL,parts:g});let o=c<b.messages.length-1;if(l.some(({origId:a})=>(r[a]||0)<(q[a]?.length??0))||o){let a=[];for(let{origId:b,emitId:c,name:d}of l){let e,f=q[b],g=r[b]||0;f&&g<f.length?(e=f[g],r[b]=g+1):e="";let h=d||p[b];if(!h){let a=String(b).split("-");h=a.length>2?a.slice(0,-2).join("-"):b}let j=(0,i.pT)(e);null===j?j={result:e}:"object"!=typeof j&&(j={result:j}),a.push({functionResponse:{id:c,name:n(h),response:{result:j}}})}a.length>0&&j.contents.push({role:k.RV.USER,parts:a})}}else g.length>0&&j.contents.push({role:k.RV.MODEL,parts:g})}}if(b.tools&&Array.isArray(b.tools)&&b.tools.length>0){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(structuredClone(c.input_schema||{type:"object",properties:{}}));a.push({name:n(c.name),description:c.description||"",parameters:b})}else if(c.type===k.x4.FUNCTION&&c.function){let b=c.function,d=(0,i.Yr)(structuredClone(b.parameters||{type:"object",properties:{}}));a.push({name:n(b.name),description:b.description||"",parameters:d})}a.length>0&&(j.tools=[{functionDeclarations:a}])}return j.contents=(0,i.$J)(j.contents,a),j}function p(a,b,c,d=null){return o(a,b,c,f.bf,d?._clientSessionId)}function q(a,b,c,d=null){let e=o(a,b,c,f.$G,d?._clientSessionId);if(e.tools?.[0]?.functionDeclarations){for(let a of e.tools[0].functionDeclarations)if(a.parameters){let b=(0,i.Yr)(a.parameters);a.parameters=b}}return e}function r(a,b,c=null,d=!1){let e={project:c?.projectId||(0,i.w_)(),model:a,userAgent:d?"antigravity":"gemini-cli",requestId:d?`agent-${m()}`:(0,i.KZ)(),request:{sessionId:(0,j.E9)(c?._clientSessionId)||(d?(0,j.RF)(c?.email||c?.connectionId):(0,i.f6)()),contents:b.contents,systemInstruction:b.systemInstruction,generationConfig:b.generationConfig,tools:b.tools}};return d||(e.request.safetySettings=b.safetySettings),b.tools?.length>0&&(e.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}}),e}(0,d.kz)(e.h.OPENAI,e.h.GEMINI,p,null),(0,d.kz)(e.h.OPENAI,e.h.GEMINI_CLI,(a,b,c,d)=>r(a,q(a,b,c),d),null),(0,d.kz)(e.h.OPENAI,e.h.ANTIGRAVITY,function(a,b,c,d=null){if(a.toLowerCase().includes("claude")){let e=(0,g.C)(a,b,c);return function(a,b,c=null,d=f.bf){let e={project:c?.projectId||(0,i.w_)(),model:a,userAgent:"antigravity",requestId:`agent-${m()}`,request:{sessionId:(0,j.E9)(c?._clientSessionId)||(0,j.RF)(c?.email||c?.connectionId),contents:[],generationConfig:{temperature:b.temperature||1,maxOutputTokens:b.max_tokens||4096}}},g={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if(Array.isArray(a.content))for(let b of a.content)b.type===k.R4.TOOL_USE&&b.id&&b.name&&(g[b.id]=b.name)}if(b.messages&&Array.isArray(b.messages))for(let f of b.messages){let b=[];if(Array.isArray(f.content)){let e=!1;for(let j of f.content)if(j.type===k.R4.TEXT)b.push({text:j.text});else if(j.type===k.R4.TOOL_USE){let f=(j.id?(0,h.el)(j.id,c?._clientSessionId,a):null)||(e?void 0:d);e=!0;let g={functionCall:{id:j.id,name:n(j.name),args:j.input||{}}};f&&(g.thoughtSignature=f),b.push(g)}else if(j.type===k.R4.TOOL_RESULT){let a=j.content;Array.isArray(a)&&(a=a.map(a=>a.type===k.R4.TEXT?a.text:JSON.stringify(a)).join("\n"));let c=g[j.tool_use_id]?n(g[j.tool_use_id]):"tool";b.push({functionResponse:{id:j.tool_use_id,name:c,response:{result:(0,i.pT)(a)||a}}})}}else"string"==typeof f.content&&b.push({text:f.content});b.length>0&&e.request.contents.push({role:f.role===k.z7.ASSISTANT?k.RV.MODEL:k.RV.USER,parts:b})}if(b.tools&&Array.isArray(b.tools)){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(c.input_schema);a.push({name:n(c.name),description:c.description||"",parameters:b})}a.length>0&&(e.request.tools=[{functionDeclarations:a}],e.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}})}let l=[];if(b.system)if(Array.isArray(b.system))for(let a of b.system)a.text&&l.push({text:a.text});else"string"==typeof b.system&&l.push({text:b.system});return l.length>0&&(e.request.systemInstruction={role:k.RV.USER,parts:l}),e.request.contents=(0,i.$J)(e.request.contents,a),e}(a,e,d)}let e=q(a,b,c);return r(a,e,d,!0)},null)},97821:(a,b,c)=>{c.d(b,{l:()=>j});var d=c(82380),e=c(14170),f=c(43698),g=c(10263);c(41004);var h=c(29463);function i(a){if(null==a)return"";if("string"==typeof a)return a;if(Array.isArray(a)){let b=[];for(let c of a)"string"==typeof c?b.push(c):c&&"object"==typeof c&&"string"==typeof c.text&&b.push(c.text);return b.join("\n")}return String(a)}function j(a,b,c,d){let{messages:e,system:j}=function(a=[]){let b=[],c=[],d=new Map;for(let b of a)if(b?.role===f.z7.ASSISTANT&&Array.isArray(b.tool_calls))for(let a of b.tool_calls){let b=a?.function?.name||a?.name;a?.id&&b&&d.set(a.id,b)}for(let e of a){if(!e)continue;let a=e.role;if(a===f.z7.SYSTEM){let a=i(e.content);a&&c.push(a);continue}if(a===f.z7.TOOL){let a="string"==typeof e.content?e.content:i(e.content),c=!!(e.is_error||"error"===e.status),g=e.name||(e.tool_call_id?d.get(e.tool_call_id):null)||"unknown";b.push({role:f.z7.TOOL,content:[{type:"tool-result",toolCallId:e.tool_call_id||"",toolName:g,output:{type:c?"error-text":"text",value:a}}]});continue}if(a===f.z7.ASSISTANT){let a=[],c=e.reasoning_content||e.thought||e.reasoning;c&&"string"==typeof c&&c.trim()&&a.push({type:"reasoning",text:c});let d=i(e.content);if(d&&a.push({type:f.x4.TEXT,text:d}),Array.isArray(e.tool_calls))for(let b of e.tool_calls){let c=b.function||{},d=c.name||b.name||"";a.push({type:"tool-call",toolCallId:b.id||"",toolName:d,input:function(a){if(null==a)return{};if("string"!=typeof a)return a;let b=a.trim();if(!b)return{};try{let a=JSON.parse(b);if(a&&"object"==typeof a)return a;return{value:a}}catch{return{raw:a}}}(c.arguments??b.input)})}b.push({role:f.z7.ASSISTANT,content:a.length?a:[{type:f.x4.TEXT,text:""}]});continue}b.push({role:f.z7.USER,content:function(a){if(null==a)return[{type:f.x4.TEXT,text:""}];if("string"==typeof a)return[{type:f.x4.TEXT,text:a}];if(Array.isArray(a)){let b=[];for(let c of a)if("string"==typeof c)b.push({type:f.x4.TEXT,text:c});else if(c&&"object"==typeof c)if(c.type===f.x4.TEXT&&"string"==typeof c.text)b.push({type:f.x4.TEXT,text:c.text});else{let a=function(a){if(!a||"object"!=typeof a)return null;if(a.type===f.x4.IMAGE_URL){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=(0,h.W$)(b);return c?{type:f.x4.IMAGE,image:(0,h.$q)(c.mimeType,c.base64),mimeType:c.mimeType,mediaType:c.mimeType}:null}if(a.type===f.x4.IMAGE||a.type===f.R4.IMAGE){if("string"==typeof a.image&&a.image.startsWith("data:")){let b=(0,h.W$)(a.image),c=a.mimeType||b?.mimeType||"image/png";return{type:f.x4.IMAGE,image:a.image,mimeType:c,mediaType:c}}let b=a.source;if(b?.type==="base64"&&"string"==typeof b.data){let a=b.media_type||"image/png";return{type:f.x4.IMAGE,image:(0,h.$q)(a,b.data),mimeType:a,mediaType:a}}}return null}(c);a?b.push(a):"string"==typeof c.text&&b.push({type:f.x4.TEXT,text:c.text})}return b.length?b:[{type:f.x4.TEXT,text:""}]}return[{type:f.x4.TEXT,text:String(a)}]}(e.content)})}return{messages:b,system:c.join("\n\n")}}(b.messages),k={model:a,messages:e,stream:!1!==c,max_tokens:b.max_tokens??b.max_output_tokens??64e3,temperature:b.temperature??.3};j&&(k.system=j);let l=function(a){if(!Array.isArray(a)||0===a.length)return;let b=[];for(let c of a)c&&(c.type===f.x4.FUNCTION&&c.function?b.push({name:c.function.name,description:c.function.description,input_schema:c.function.parameters||{type:"object"}}):c.name&&(c.input_schema||c.parameters)&&b.push({name:c.name,description:c.description,input_schema:c.input_schema||c.parameters}));return b.length?b:void 0}(b.tools);l&&(k.tools=l),null!=b.top_p&&(k.top_p=b.top_p);let m=b.reasoning_effort??b.output_config?.effort??("object"==typeof b.reasoning?b.reasoning?.effort:null);m&&"string"==typeof m&&(k.reasoning_effort=m);let n=new Date().toISOString().slice(0,10);return{threadId:(0,g.VR)(d?._clientSessionId),memory:null,taste:null,skills:null,permissionMode:"standard",config:{workingDir:g.Ie,date:n,environment:process.platform,structure:[],isGitRepo:!1,currentBranch:"",mainBranch:"",gitStatus:"",recentCommits:[]},params:k}}(0,d.kz)(e.h.OPENAI,e.h.COMMANDCODE,j,null)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=1350,exports.ids=[1350],exports.modules={21350:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>Q,GET:()=>O,POST:()=>P});var d=c(49796),e=c(23211),f=c(79748),g=c.n(f),h=c(33873),i=c.n(h),j=c(21820),k=c.n(j),l=c(55511),m=c.n(l),n=c(28286),o=c(30869),p=c(54603),q=c(24424);let r=o.h0.appPort,s=`http://localhost:${r}/api/mcp/`,t=null,u=async()=>(t||(t=await (0,p.Xj)("9r-cli-auth")),t),v=async a=>{let b=await u();for(let c of a)"string"==typeof c?.url&&c.url.startsWith(s)&&(c.headers={...c.headers||{},"x-9r-cli-token":b});return a},w="gateway",x={coworkEgressAllowedHosts:["*"],disabledBuiltinTools:[],isLocalDevMcpEnabled:!0,isDesktopExtensionEnabled:!0,isDesktopExtensionDirectoryEnabled:!0,isDesktopExtensionSignatureRequired:!1,isClaudeCodeForDesktopEnabled:!0,disableEssentialTelemetry:!0,disableNonessentialTelemetry:!0,disableNonessentialServices:!0},y=()=>{if("darwin"===k().platform()){let a=i().join(k().homedir(),"Library","Application Support");return[i().join(a,"Claude-3p"),i().join(a,"Claude")]}if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return[i().join(a,"Claude-3p"),i().join(b,"Claude-3p"),i().join(a,"Claude"),i().join(b,"Claude")]}return[i().join(k().homedir(),".config","Claude-3p"),i().join(k().homedir(),".config","Claude")]},z=async()=>{let a=y();for(let b of a)try{return await g().access(i().join(b,"configLibrary")),b}catch{}return a[0]},A=()=>y()[0],B=async()=>i().join(await z(),"configLibrary"),C=()=>i().join(A(),"configLibrary"),D=async()=>i().join(await B(),"_meta.json"),E=()=>{if("darwin"===k().platform())return i().join(k().homedir(),"Library","Application Support","Claude");if("win32"===k().platform()){let a=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return i().join(a,"Claude")}return i().join(k().homedir(),".config","Claude")},F=()=>i().join(E(),"claude_desktop_config.json"),G=async()=>{try{let a=(await g().readFile(F(),"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(a)||{}}catch(a){return{}}},H=async a=>{await g().mkdir(E(),{recursive:!0}),await g().writeFile(F(),JSON.stringify(a,null,2))},I=async()=>{let a=await G();return"3p"!==a.deploymentMode&&(a.deploymentMode="3p",await H(a),!0)},J=async()=>{let a=await G();if(!a.mcpServers||"object"!=typeof a.mcpServers)return;let b=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name));for(let c of Object.keys(a.mcpServers))b.has(c)&&delete a.mcpServers[c];0===Object.keys(a.mcpServers).length&&delete a.mcpServers,await H(a)},K=async()=>{for(let a of[...y(),...(()=>{if("darwin"===k().platform())return["/Applications/Claude.app",i().join(k().homedir(),"Applications","Claude.app")];if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.ProgramFiles||"C:\\Program Files";return[i().join(a,"AnthropicClaude"),i().join(b,"Claude"),i().join(b,"AnthropicClaude")]}return[]})()])try{return await g().access(a),!0}catch{}return!1},L=async a=>{try{let b=(await g().readFile(a,"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(b)}catch(a){return null}},M=async()=>{let a=i().join(C(),"_meta.json"),b=await L(a);if(!b||!b.appliedId){let c=await L(await D());if(c?.appliedId)b=c;else{let a=m().randomUUID();b={appliedId:a,entries:[{id:a,name:"Default"}]}}await g().mkdir(C(),{recursive:!0}),await g().writeFile(a,JSON.stringify(b,null,2))}return b};async function N(a){let b=i().join(A(),"config.json"),c={};try{c=JSON.parse(await g().readFile(b,"utf-8"))||{}}catch(a){if("ENOENT"!==a.code)return{error:a.code}}let d={};for(let b of a)b?.name&&(d[b.name]=!0);return c.operonSkipMcpApprovals=d,await g().mkdir(A(),{recursive:!0}),await g().writeFile(b,JSON.stringify(c,null,2)),{written:Object.keys(d).length}}async function O(){try{if(!await K())return e.NextResponse.json({installed:!1,config:null,message:"Claude Desktop (Cowork mode) not detected"});let a=await L(await D()),b=a?.appliedId||null,c=await B(),d=b?i().join(c,`${b}.json`):null,f=d?await L(d):null,g=f?.inferenceGatewayBaseUrl||null,h=Array.isArray(f?.inferenceModels)?f.inferenceModels.map(a=>"string"==typeof a?a:a?.name).filter(Boolean):[],j=Array.isArray(f?.managedMcpServers)?f.managedMcpServers:[],k=!!(f?.inferenceProvider===w&&g),l=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name)),m=j.filter(a=>l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>a.name),o=j.filter(a=>a.custom||!l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>({name:a.name,url:a.url,transport:a.transport,custom:!0}));return e.NextResponse.json({installed:!0,config:f,has9Router:k,configPath:d,cowork:{appliedId:b,baseUrl:g,models:h,provider:f?.inferenceProvider||null,plugins:j.filter(a=>!a.custom&&!(l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/"))).map(a=>{let b=a.toolPolicy?Object.keys(a.toolPolicy):[],c=`${a.name}-`,d=new Set;for(let a of b){let b=a;for(;b.startsWith(c);)b=b.slice(c.length);d.add(b)}let e=n.DEFAULT_PLUGINS.find(b=>b.name===a.name),f=e&&Array.isArray(e.toolNames)?e.toolNames:Array.from(d);return{name:a.name,url:a.url,transport:a.transport,oauth:!!a.oauth,toolNames:f}}),localPlugins:m,customPlugins:o},defaultPlugins:n.DEFAULT_PLUGINS,localStdioPlugins:n.LOCAL_STDIO_PLUGINS})}catch(a){return console.log("Error reading cowork settings:",a),e.NextResponse.json({error:"Failed to read cowork settings"},{status:500})}}async function P(a){try{let{baseUrl:b,apiKey:c,models:d,plugins:f,localPlugins:h,customPlugins:j}=await a.json();if(!b||!c)return e.NextResponse.json({error:"baseUrl and apiKey are required"},{status:400});let k=Array.isArray(d)?d.filter(a=>"string"==typeof a&&a.trim()):[];if(0===k.length)return e.NextResponse.json({error:"At least one model is required"},{status:400});let l=Array.isArray(f)?f:n.DEFAULT_PLUGINS,m=Array.isArray(h)?h:[],o=(Array.isArray(j)?j:[]).filter(a=>a?.url),p=await v((a=>{let b=Array.isArray(a)?a:[],c=[];for(let a of b){let b=n.LOCAL_STDIO_PLUGINS.find(b=>b.name===a);if(!b)continue;let d={name:b.name,url:`http://localhost:${r}/api/mcp/${b.name}/sse`,transport:"sse"};if(Array.isArray(b.toolNames)&&b.toolNames.length>0){let a=`${b.name}-`,c={};for(let d of b.toolNames)c[d]="allow",c[`${a}${d}`]="allow";d.toolPolicy=c}c.push(d)}return c})(m)),q=await v((a=>{if(!Array.isArray(a))return[];let b=[];for(let c of a)c?.name&&c?.url&&b.push({name:c.name,url:c.url,transport:c.transport||"sse",custom:!0});return b})(o)),s=[...(0,n.buildManagedMcpServers)(l),...p,...q],t=await I(),u=await M(),y=i().join(C(),`${u.appliedId}.json`),z={...x,inferenceProvider:w,inferenceGatewayBaseUrl:b,inferenceGatewayApiKey:c,inferenceModels:k.map(a=>({name:a}))};s.length>0&&(z.managedMcpServers=s),await g().writeFile(y,JSON.stringify(z,null,2));let A=null;try{A=await N(s)}catch(a){A={error:a.message}}try{await J()}catch{}return e.NextResponse.json({success:!0,bootstrapped:t,message:t?"Cowork enabled (3p mode set). Quit & reopen Claude Desktop.":"Cowork settings applied. Quit & reopen Claude Desktop.",configPath:y,skipApprovals:A,localMcp:{applied:m,via:"3p-sse-bridge"}})}catch(a){return console.log("Error applying cowork settings:",a),e.NextResponse.json({error:"Failed to apply cowork settings"},{status:500})}}async function Q(){try{let a=await L(await D());if(!a?.appliedId)return e.NextResponse.json({success:!0,message:"No active config to reset"});let b=i().join(await B(),`${a.appliedId}.json`);try{await g().writeFile(b,JSON.stringify({},null,2))}catch(a){if("ENOENT"!==a.code)throw a}try{await N([])}catch{}try{await J()}catch{}return e.NextResponse.json({success:!0,message:"Cowork config reset"})}catch(a){return console.log("Error resetting cowork settings:",a),e.NextResponse.json({error:"Failed to reset cowork settings"},{status:500})}}(0,q.D)([O,P,Q]),(0,d.A)(O,"00c7fb28bcc70930c12dc1533e956111ef5ee40a85",null),(0,d.A)(P,"400463cd119f3a29a69cc4cff6ca5d5edcf32abe80",null),(0,d.A)(Q,"000d25e7088ade023275078ac760173cbdf16c0f68",null)},28286:a=>{a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}}};
|
|
1
|
+
"use strict";exports.id=1350,exports.ids=[1350],exports.modules={21350:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>Q,GET:()=>O,POST:()=>P});var d=c(49796),e=c(23211),f=c(79748),g=c.n(f),h=c(33873),i=c.n(h),j=c(21820),k=c.n(j),l=c(55511),m=c.n(l),n=c(28286),o=c(30869),p=c(54603),q=c(24424);let r=o.h0.appPort,s=`http://localhost:${r}/api/mcp/`,t=null,u=async()=>(t||(t=await (0,p.Xj)("9r-cli-auth")),t),v=async a=>{let b=await u();for(let c of a)"string"==typeof c?.url&&c.url.startsWith(s)&&(c.headers={...c.headers||{},"x-9r-cli-token":b});return a},w="gateway",x={coworkEgressAllowedHosts:["*"],disabledBuiltinTools:[],isLocalDevMcpEnabled:!0,isDesktopExtensionEnabled:!0,isDesktopExtensionDirectoryEnabled:!0,isDesktopExtensionSignatureRequired:!1,isClaudeCodeForDesktopEnabled:!0,disableEssentialTelemetry:!0,disableNonessentialTelemetry:!0,disableNonessentialServices:!0},y=()=>{if("darwin"===k().platform()){let a=i().join(k().homedir(),"Library","Application Support");return[i().join(a,"Claude-3p"),i().join(a,"Claude")]}if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return[i().join(a,"Claude-3p"),i().join(b,"Claude-3p"),i().join(a,"Claude"),i().join(b,"Claude")]}return[i().join(k().homedir(),".config","Claude-3p"),i().join(k().homedir(),".config","Claude")]},z=async()=>{let a=y();for(let b of a)try{return await g().access(i().join(b,"configLibrary")),b}catch{}return a[0]},A=()=>y()[0],B=async()=>i().join(await z(),"configLibrary"),C=()=>i().join(A(),"configLibrary"),D=async()=>i().join(await B(),"_meta.json"),E=()=>{if("darwin"===k().platform())return i().join(k().homedir(),"Library","Application Support","Claude");if("win32"===k().platform()){let a=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return i().join(a,"Claude")}return i().join(k().homedir(),".config","Claude")},F=()=>i().join(E(),"claude_desktop_config.json"),G=async()=>{try{let a=(await g().readFile(F(),"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(a)||{}}catch(a){return{}}},H=async a=>{await g().mkdir(E(),{recursive:!0}),await g().writeFile(F(),JSON.stringify(a,null,2))},I=async()=>{let a=await G();return"3p"!==a.deploymentMode&&(a.deploymentMode="3p",await H(a),!0)},J=async()=>{let a=await G();if(!a.mcpServers||"object"!=typeof a.mcpServers)return;let b=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name));for(let c of Object.keys(a.mcpServers))b.has(c)&&delete a.mcpServers[c];0===Object.keys(a.mcpServers).length&&delete a.mcpServers,await H(a)},K=async()=>{for(let a of[...y(),...(()=>{if("darwin"===k().platform())return["/Applications/Claude.app",i().join(k().homedir(),"Applications","Claude.app")];if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.ProgramFiles||"C:\\Program Files";return[i().join(a,"AnthropicClaude"),i().join(b,"Claude"),i().join(b,"AnthropicClaude")]}return[]})()])try{return await g().access(a),!0}catch{}return!1},L=async a=>{try{let b=(await g().readFile(a,"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(b)}catch(a){return null}},M=async()=>{let a=i().join(C(),"_meta.json"),b=await L(a);if(!b||!b.appliedId){let c=await L(await D());if(c?.appliedId)b=c;else{let a=m().randomUUID();b={appliedId:a,entries:[{id:a,name:"Default"}]}}await g().mkdir(C(),{recursive:!0}),await g().writeFile(a,JSON.stringify(b,null,2))}return b};async function N(a){let b=i().join(A(),"config.json"),c={};try{c=JSON.parse(await g().readFile(b,"utf-8"))||{}}catch(a){if("ENOENT"!==a.code)return{error:a.code}}let d={};for(let b of a)b?.name&&(d[b.name]=!0);return c.operonSkipMcpApprovals=d,await g().mkdir(A(),{recursive:!0}),await g().writeFile(b,JSON.stringify(c,null,2)),{written:Object.keys(d).length}}async function O(){try{if(!await K())return e.NextResponse.json({installed:!1,config:null,message:"Claude Desktop (Cowork mode) not detected"});let a=await L(await D()),b=a?.appliedId||null,c=await B(),d=b?i().join(c,`${b}.json`):null,f=d?await L(d):null,g=f?.inferenceGatewayBaseUrl||null,h=Array.isArray(f?.inferenceModels)?f.inferenceModels.map(a=>"string"==typeof a?a:a?.name).filter(Boolean):[],j=Array.isArray(f?.managedMcpServers)?f.managedMcpServers:[],k=!!(f?.inferenceProvider===w&&g),l=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name)),m=j.filter(a=>l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>a.name),o=j.filter(a=>a.custom||!l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>({name:a.name,url:a.url,transport:a.transport,custom:!0}));return e.NextResponse.json({installed:!0,config:f,has9Router:k,configPath:d,cowork:{appliedId:b,baseUrl:g,models:h,provider:f?.inferenceProvider||null,plugins:j.filter(a=>!a.custom&&!(l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/"))).map(a=>{let b=a.toolPolicy?Object.keys(a.toolPolicy):[],c=`${a.name}-`,d=new Set;for(let a of b){let b=a;for(;b.startsWith(c);)b=b.slice(c.length);d.add(b)}let e=n.DEFAULT_PLUGINS.find(b=>b.name===a.name),f=e&&Array.isArray(e.toolNames)?e.toolNames:Array.from(d);return{name:a.name,url:a.url,transport:a.transport,oauth:!!a.oauth,toolNames:f}}),localPlugins:m,customPlugins:o},defaultPlugins:n.DEFAULT_PLUGINS,localStdioPlugins:n.LOCAL_STDIO_PLUGINS})}catch(a){return console.log("Error reading cowork settings:",a),e.NextResponse.json({error:"Failed to read cowork settings"},{status:500})}}async function P(a){try{let{baseUrl:b,apiKey:c,models:d,plugins:f,localPlugins:h,customPlugins:j}=await a.json();if(!b||!c)return e.NextResponse.json({error:"baseUrl and apiKey are required"},{status:400});let k=Array.isArray(d)?d.filter(a=>"string"==typeof a&&a.trim()):[];if(0===k.length)return e.NextResponse.json({error:"At least one model is required"},{status:400});let l=Array.isArray(f)?f:n.DEFAULT_PLUGINS,m=Array.isArray(h)?h:[],o=(Array.isArray(j)?j:[]).filter(a=>a?.url),p=await v((a=>{let b=Array.isArray(a)?a:[],c=[];for(let a of b){let b=n.LOCAL_STDIO_PLUGINS.find(b=>b.name===a);if(!b)continue;let d={name:b.name,url:`http://localhost:${r}/api/mcp/${b.name}/sse`,transport:"sse"};if(Array.isArray(b.toolNames)&&b.toolNames.length>0){let a=`${b.name}-`,c={};for(let d of b.toolNames)c[d]="allow",c[`${a}${d}`]="allow";d.toolPolicy=c}c.push(d)}return c})(m)),q=await v((a=>{if(!Array.isArray(a))return[];let b=[];for(let c of a)c?.name&&c?.url&&b.push({name:c.name,url:c.url,transport:c.transport||"sse",custom:!0});return b})(o)),s=[...(0,n.buildManagedMcpServers)(l),...p,...q],t=await I(),u=await M(),y=i().join(C(),`${u.appliedId}.json`),z={...x,inferenceProvider:w,inferenceGatewayBaseUrl:b,inferenceGatewayApiKey:c,inferenceModels:k.map(a=>({name:a}))};s.length>0&&(z.managedMcpServers=s),await g().writeFile(y,JSON.stringify(z,null,2));let A=null;try{A=await N(s)}catch(a){A={error:a.message}}try{await J()}catch{}return e.NextResponse.json({success:!0,bootstrapped:t,message:t?"Cowork enabled (3p mode set). Quit & reopen Claude Desktop.":"Cowork settings applied. Quit & reopen Claude Desktop.",configPath:y,skipApprovals:A,localMcp:{applied:m,via:"3p-sse-bridge"}})}catch(a){return console.log("Error applying cowork settings:",a),e.NextResponse.json({error:"Failed to apply cowork settings"},{status:500})}}async function Q(){try{let a=await L(await D());if(!a?.appliedId)return e.NextResponse.json({success:!0,message:"No active config to reset"});let b=i().join(await B(),`${a.appliedId}.json`);try{await g().writeFile(b,JSON.stringify({},null,2))}catch(a){if("ENOENT"!==a.code)throw a}try{await N([])}catch{}try{await J()}catch{}return e.NextResponse.json({success:!0,message:"Cowork config reset"})}catch(a){return console.log("Error resetting cowork settings:",a),e.NextResponse.json({error:"Failed to reset cowork settings"},{status:500})}}(0,q.D)([O,P,Q]),(0,d.A)(O,"006a90a59e4c9c763f66c6d5d0bea6e02758b4cca4",null),(0,d.A)(P,"407dc1811464e4766ba2e0cecb16448e58cfbeefd6",null),(0,d.A)(Q,"00b77cb8e0dcac5f914f52674a50daa28b777f0f4b",null)},28286:a=>{a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=1356,exports.ids=[1356,7247],exports.modules={19713:function(a,b,c){a.exports=function(a,b){var d=[function(a,b,c){a.exports=c(34)},function(a,b,c){var d=c(29)("wks"),e=c(33),f=c(2).Symbol,g="function"==typeof f;(a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}).store=d},function(a,b){var c=a.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b,c){var d=c(9);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b,c){a.exports=!c(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(12),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){var c=a.exports={version:"2.4.0"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(14);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports={}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b,c){var d=c(3),e=c(26),f=c(32),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(42),e=c(15);a.exports=function(a){return d(e(a))}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(9),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(12).f,e=c(8),f=c(1)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(29)("keys"),e=c(33);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a*=1)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(11),e=c(1)("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(a){}};a.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(2),e=c(6),f=c(7),g=c(5),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];for(j in n&&(c=b),c)(k=!m&&u&&void 0!==u[j])&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,a.exports=i},function(a,b){a.exports=function(a){try{return!!a()}catch(a){return!0}}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){a.exports=!c(4)&&!c(24)(function(){return 7!=Object.defineProperty(c(16)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){"use strict";var d=c(28),e=c(23),f=c(57),g=c(5),h=c(8),i=c(10),j=c(45),k=c(18),l=c(52),m=c(1)("iterator"),n=!([].keys&&"next"in[].keys()),o="keys",p="values",q=function(){return this};a.exports=function(a,b,c,r,s,t,u){j(c,b,r);var v,w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case o:case p:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=s==p,B=!1,C=a.prototype,D=C[m]||C["@@iterator"]||s&&C[s],E=D||y(s),F=s?A?y("entries"):E:void 0,G="Array"==b&&C.entries||D;if(G&&(x=l(G.call(new a)))!==Object.prototype&&(k(x,z,!0),d||h(x,m)||g(x,m,q)),A&&D&&D.name!==p&&(B=!0,E=function(){return D.call(this)}),(!d||u)&&(n||B||!C[m])&&g(C,m,E),i[b]=E,i[z]=q,s)if(v={values:A?E:y(p),keys:t?E:y(o),entries:F},u)for(w in v)w in C||f(C,w,v[w]);else e(e.P+e.F*(n||B),b,v);return v}},function(a,b){a.exports=!0},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d,e,f,g=c(7),h=c(41),i=c(25),j=c(16),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==c(11)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(f=(e=new o).port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,c){var d=c(20),e=Math.min;a.exports=function(a){return a>0?e(d(a),0x1fffffffffffff):0}},function(a,b,c){var d=c(9);a.exports=function(a,b){var c,e;if(!d(a))return a;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a))||"function"==typeof(c=a.valueOf)&&!d(e=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){"use strict";function d(a){return(0,i.createHash)("sha256").update(a).digest("hex")}function e(a){switch(j){case"darwin":return a.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return a.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return a.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw Error("Unsupported platform: "+process.platform)}}Object.defineProperty(b,"__esModule",{value:!0});var f,g=(f=c(35))&&f.__esModule?f:{default:f};b.machineIdSync=function(a){var b=e((0,h.execSync)(k[j]).toString());return a?b:d(b)},b.machineId=function(a){return new g.default(function(b,c){return(0,h.exec)(k[j],{},function(f,g,h){if(f)return c(Error("Error while obtaining machine id: "+f.stack));var i=e(g.toString());return b(a?i:d(i))})})};var h=c(70),i=c(71),j=process.platform,k={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(a,b,c){a.exports={default:c(36),__esModule:!0}},function(a,b,c){c(66),c(68),c(69),c(67),a.exports=c(6).Promise},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b,c,d){if(!(a instanceof b)||void 0!==d&&d in a)throw TypeError(c+": incorrect invocation!");return a}},function(a,b,c){var d=c(13),e=c(31),f=c(62);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if((h=i[k++])!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(7),e=c(44),f=c(43),g=c(3),h=c(31),i=c(64),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if((q=b?s(g(o=a[t])[0],o[1]):s(a[t]))===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if((q=e(p,s,o.value,b))===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b){a.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},function(a,b,c){var d=c(11);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b,c){var d=c(10),e=c(1)("iterator"),f=Array.prototype;a.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},function(a,b,c){var d=c(3);a.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},function(a,b,c){"use strict";var d=c(49),e=c(17),f=c(18),g={};c(5)(g,c(1)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){var d=c(1)("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){var d=c(2),e=c(30).set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==c(11)(g);a.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},function(a,b,c){var d=c(3),e=c(50),f=c(22),g=c(19)("IE_PROTO"),h=function(){},i="prototype",j=function(){var a,b=c(16)("iframe"),d=f.length;for(b.style.display="none",c(25).appendChild(b),b.src="javascript:",(a=b.contentWindow.document).open(),a.write("<script>document.F=Object<\/script>"),a.close(),j=a.F;d--;)delete j[i][f[d]];return j()};a.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},function(a,b,c){var d=c(12),e=c(3),f=c(54);a.exports=c(4)?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){var d=c(55),e=c(17),f=c(13),g=c(32),h=c(8),i=c(26),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(8),e=c(63),f=c(19)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return d(a=e(a),f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(8),e=c(13),f=c(39)(!1),g=c(19)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(53),e=c(22);a.exports=Object.keys||function(a){return d(a,e)}},function(a,b){b.f=({}).propertyIsEnumerable},function(a,b,c){var d=c(5);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,c){a.exports=c(5)},function(a,b,c){var d=c(9),e=c(3),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,d){try{(d=c(7)(Function.call,c(51).f(Object.prototype,"__proto__").set,2))(a,[]),b=!(a instanceof Array)}catch(a){b=!0}return function(a,c){return f(a,c),b?a.__proto__=c:d(a,c),a}}({},!1):void 0),check:f}},function(a,b,c){"use strict";var d=c(2),e=c(6),f=c(12),g=c(4),h=c(1)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,c){var d=c(3),e=c(14),f=c(1)("species");a.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},function(a,b,c){var d=c(20),e=c(15);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i))<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536}}},function(a,b,c){var d=c(20),e=Math.max,f=Math.min;a.exports=function(a,b){return(a=d(a))<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(15);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(21),e=c(1)("iterator"),f=c(10);a.exports=c(6).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){"use strict";var d=c(37),e=c(47),f=c(10),g=c(13);a.exports=c(27)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){},function(a,b,c){"use strict";var d,e,f,g=c(28),h=c(2),i=c(7),j=c(21),k=c(23),l=c(9),m=(c(3),c(14)),n=c(38),o=c(40),p=(c(58).set,c(60)),q=c(30).set,r=c(48)(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var a=v.resolve(1),b=(a.constructor={})[c(1)("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&a.then(x)instanceof b}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0;c.length>f;)!function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),!0===g?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}}(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if((b=c[d++]).fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,(b=b._w||b)._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},(d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=c(56)(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+!y*k.F,{Promise:v}),c(18)(v,s),c(59)(s),f=c(6)[s],k(k.S+!y*k.F,s,{reject:function(a){var b=B(this);return(0,b.reject)(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this);return(0,b.resolve)(a),b.promise}}),k(k.S+k.F*!(y&&c(46)(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b,c){"use strict";var d=c(61)(!0);c(27)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){c(65);for(var d=c(2),e=c(5),f=c(10),g=c(1)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b){a.exports=c(79646)},function(a,b){a.exports=c(55511)}];function e(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return d[a].call(b.exports,b,b.exports,e),b.loaded=!0,b.exports}var f={};return e.m=d,e.c=f,e.p="",e(0)}(c(79646),c(55511))},57247:(a,b,c)=>{"use strict";c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(8499),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}}};
|
|
1
|
+
exports.id=1356,exports.ids=[1356,7247],exports.modules={19713:function(a,b,c){a.exports=function(a,b){var d=[function(a,b,c){a.exports=c(34)},function(a,b,c){var d=c(29)("wks"),e=c(33),f=c(2).Symbol,g="function"==typeof f;(a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}).store=d},function(a,b){var c=a.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b,c){var d=c(9);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b,c){a.exports=!c(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(12),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){var c=a.exports={version:"2.4.0"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(14);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports={}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b,c){var d=c(3),e=c(26),f=c(32),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(42),e=c(15);a.exports=function(a){return d(e(a))}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(9),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(12).f,e=c(8),f=c(1)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(29)("keys"),e=c(33);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a*=1)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(11),e=c(1)("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(a){}};a.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(2),e=c(6),f=c(7),g=c(5),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];for(j in n&&(c=b),c)(k=!m&&u&&void 0!==u[j])&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,a.exports=i},function(a,b){a.exports=function(a){try{return!!a()}catch(a){return!0}}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){a.exports=!c(4)&&!c(24)(function(){return 7!=Object.defineProperty(c(16)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){"use strict";var d=c(28),e=c(23),f=c(57),g=c(5),h=c(8),i=c(10),j=c(45),k=c(18),l=c(52),m=c(1)("iterator"),n=!([].keys&&"next"in[].keys()),o="keys",p="values",q=function(){return this};a.exports=function(a,b,c,r,s,t,u){j(c,b,r);var v,w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case o:case p:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=s==p,B=!1,C=a.prototype,D=C[m]||C["@@iterator"]||s&&C[s],E=D||y(s),F=s?A?y("entries"):E:void 0,G="Array"==b&&C.entries||D;if(G&&(x=l(G.call(new a)))!==Object.prototype&&(k(x,z,!0),d||h(x,m)||g(x,m,q)),A&&D&&D.name!==p&&(B=!0,E=function(){return D.call(this)}),(!d||u)&&(n||B||!C[m])&&g(C,m,E),i[b]=E,i[z]=q,s)if(v={values:A?E:y(p),keys:t?E:y(o),entries:F},u)for(w in v)w in C||f(C,w,v[w]);else e(e.P+e.F*(n||B),b,v);return v}},function(a,b){a.exports=!0},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d,e,f,g=c(7),h=c(41),i=c(25),j=c(16),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==c(11)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(f=(e=new o).port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,c){var d=c(20),e=Math.min;a.exports=function(a){return a>0?e(d(a),0x1fffffffffffff):0}},function(a,b,c){var d=c(9);a.exports=function(a,b){var c,e;if(!d(a))return a;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a))||"function"==typeof(c=a.valueOf)&&!d(e=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){"use strict";function d(a){return(0,i.createHash)("sha256").update(a).digest("hex")}function e(a){switch(j){case"darwin":return a.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return a.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return a.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw Error("Unsupported platform: "+process.platform)}}Object.defineProperty(b,"__esModule",{value:!0});var f,g=(f=c(35))&&f.__esModule?f:{default:f};b.machineIdSync=function(a){var b=e((0,h.execSync)(k[j]).toString());return a?b:d(b)},b.machineId=function(a){return new g.default(function(b,c){return(0,h.exec)(k[j],{},function(f,g,h){if(f)return c(Error("Error while obtaining machine id: "+f.stack));var i=e(g.toString());return b(a?i:d(i))})})};var h=c(70),i=c(71),j=process.platform,k={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(a,b,c){a.exports={default:c(36),__esModule:!0}},function(a,b,c){c(66),c(68),c(69),c(67),a.exports=c(6).Promise},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b,c,d){if(!(a instanceof b)||void 0!==d&&d in a)throw TypeError(c+": incorrect invocation!");return a}},function(a,b,c){var d=c(13),e=c(31),f=c(62);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if((h=i[k++])!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(7),e=c(44),f=c(43),g=c(3),h=c(31),i=c(64),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if((q=b?s(g(o=a[t])[0],o[1]):s(a[t]))===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if((q=e(p,s,o.value,b))===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b){a.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},function(a,b,c){var d=c(11);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b,c){var d=c(10),e=c(1)("iterator"),f=Array.prototype;a.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},function(a,b,c){var d=c(3);a.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},function(a,b,c){"use strict";var d=c(49),e=c(17),f=c(18),g={};c(5)(g,c(1)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){var d=c(1)("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){var d=c(2),e=c(30).set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==c(11)(g);a.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},function(a,b,c){var d=c(3),e=c(50),f=c(22),g=c(19)("IE_PROTO"),h=function(){},i="prototype",j=function(){var a,b=c(16)("iframe"),d=f.length;for(b.style.display="none",c(25).appendChild(b),b.src="javascript:",(a=b.contentWindow.document).open(),a.write("<script>document.F=Object<\/script>"),a.close(),j=a.F;d--;)delete j[i][f[d]];return j()};a.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},function(a,b,c){var d=c(12),e=c(3),f=c(54);a.exports=c(4)?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){var d=c(55),e=c(17),f=c(13),g=c(32),h=c(8),i=c(26),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(8),e=c(63),f=c(19)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return d(a=e(a),f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(8),e=c(13),f=c(39)(!1),g=c(19)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(53),e=c(22);a.exports=Object.keys||function(a){return d(a,e)}},function(a,b){b.f=({}).propertyIsEnumerable},function(a,b,c){var d=c(5);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,c){a.exports=c(5)},function(a,b,c){var d=c(9),e=c(3),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,d){try{(d=c(7)(Function.call,c(51).f(Object.prototype,"__proto__").set,2))(a,[]),b=!(a instanceof Array)}catch(a){b=!0}return function(a,c){return f(a,c),b?a.__proto__=c:d(a,c),a}}({},!1):void 0),check:f}},function(a,b,c){"use strict";var d=c(2),e=c(6),f=c(12),g=c(4),h=c(1)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,c){var d=c(3),e=c(14),f=c(1)("species");a.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},function(a,b,c){var d=c(20),e=c(15);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i))<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536}}},function(a,b,c){var d=c(20),e=Math.max,f=Math.min;a.exports=function(a,b){return(a=d(a))<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(15);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(21),e=c(1)("iterator"),f=c(10);a.exports=c(6).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){"use strict";var d=c(37),e=c(47),f=c(10),g=c(13);a.exports=c(27)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){},function(a,b,c){"use strict";var d,e,f,g=c(28),h=c(2),i=c(7),j=c(21),k=c(23),l=c(9),m=(c(3),c(14)),n=c(38),o=c(40),p=(c(58).set,c(60)),q=c(30).set,r=c(48)(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var a=v.resolve(1),b=(a.constructor={})[c(1)("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&a.then(x)instanceof b}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0;c.length>f;)!function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),!0===g?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}}(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if((b=c[d++]).fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,(b=b._w||b)._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},(d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=c(56)(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+!y*k.F,{Promise:v}),c(18)(v,s),c(59)(s),f=c(6)[s],k(k.S+!y*k.F,s,{reject:function(a){var b=B(this);return(0,b.reject)(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this);return(0,b.resolve)(a),b.promise}}),k(k.S+k.F*!(y&&c(46)(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b,c){"use strict";var d=c(61)(!0);c(27)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){c(65);for(var d=c(2),e=c(5),f=c(10),g=c(1)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b){a.exports=c(79646)},function(a,b){a.exports=c(55511)}];function e(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return d[a].call(b.exports,b,b.exports,e),b.loaded=!0,b.exports}var f={};return e.m=d,e.c=f,e.p="",e(0)}(c(79646),c(55511))},57247:(a,b,c)=>{"use strict";c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(40866),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=1757,exports.ids=[1757],exports.modules={21757:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>A,GET:()=>x,POST:()=>z});var d=c(49796),e=c(23211),f=c(79646),g=c(28354),h=c(79748),i=c.n(h),j=c(21820),k=c.n(j),l=c(42339),m=c(92182),n=c(24424);let o=(0,g.promisify)(f.exec),p=(a,b)=>{if(!a)return null;try{let c=a.nextUrl||("string"==typeof a.url?new URL(a.url):null);return c?.searchParams?.get(b)||null}catch{return null}},q=a=>!0===a||"true"===a||"1"===a,r=a=>{try{return{home:(0,m.Yc)(a)}}catch(a){return{error:a.message}}},s=async a=>{try{return await i().readFile(a,"utf-8")}catch(a){if("ENOENT"===a.code)return"";throw a}},t=a=>s(a.configPath),u=async(a,b)=>{a.isDefault&&await i().mkdir(a.dir,{recursive:!0}),await i().writeFile(a.configPath,b)},v=async(a,b)=>{if(!b)return;a.isDefault&&await i().mkdir(a.dir,{recursive:!0});let c=(0,l.C1)(await s(a.envPath),"OPENAI_API_KEY",b);await i().writeFile(a.envPath,c)},w=async()=>{try{let a="win32"===k().platform();return await o(a?"where hermes":"which hermes",{windowsHide:!0}),!0}catch{try{return await i().access((0,m.Yc)(null).configPath),!0}catch{return!1}}};async function x(a){try{if(!await w())return e.NextResponse.json({installed:!1,settings:null,message:"Hermes Agent is not installed"});let{home:b,error:c}=r(p(a,"profile"));if(c)return e.NextResponse.json({error:c},{status:400});if(!b.isDefault&&!await (0,m.U1)(b.dir))return e.NextResponse.json({error:`Hermes profile "${b.name}" not found`},{status:404});let d=await t(b),f=(0,l.Gx)(d),g=(0,l.dp)(d),h=(0,l.hh)(d),i=(0,l.EW)(d);return e.NextResponse.json({installed:!0,profile:{name:b.name,dir:b.dir,isDefault:b.isDefault},settings:{model:f,delegation:g,auxiliary:h,stt:i},has9Router:(0,l.DN)(f)||(0,l.DN)(g)||Object.values(h).some(l.DN),has9RouterStt:(0,l.ef)(i),configPath:b.configPath})}catch(a){return console.log("Error checking hermes settings:",a),e.NextResponse.json({error:"Failed to check hermes settings"},{status:500})}}let y=async({normalizedBaseUrl:a,apiKey:b,model:c})=>{let d=await (0,m.Bn)(),f=[];for(let e of d){let d=(0,m.Yc)(e.name);try{let g=await t(d),h=(0,l.Gx)(g);if(h?.default&&(0,l.lP)(h)){g=(0,l.Wy)(g,(0,l.bl)(h.default,a));let c=(0,l.dp)(g);for(let[b,d]of(c?.model&&(0,l.lP)(c)&&(g=(0,l.P5)(g,(0,l.W3)(c.model,a))),Object.entries((0,l.hh)(g))))d?.model&&(0,l.lP)(d)&&(g=(0,l.K)(g,b,(0,l.E3)(b,d.model,a)));await u(d,g),await v(d,b),f.push({profile:e.name,status:"updated",model:h.default})}else h?.default?f.push({profile:e.name,status:"skipped",reason:`main model uses provider "${h.provider||"unknown"}" — configure this profile individually`}):c?(g=(0,l.Wy)(g,(0,l.bl)(c,a)),await u(d,g),await v(d,b),f.push({profile:e.name,status:"updated",model:c})):f.push({profile:e.name,status:"skipped",reason:"no main model configured"})}catch(a){f.push({profile:e.name,status:"failed",reason:a.message})}}let g=f.filter(a=>"updated"===a.status).length;return e.NextResponse.json({success:g>0,bulk:!0,results:f,updated:g,skipped:f.length-g,message:`Updated endpoint on ${g} profile(s)`})};async function z(a){try{let b=await a.json(),{baseUrl:c,apiKey:d,model:f,selections:g,audio:h}=b,i=Array.isArray(g)&&g.some(a=>a?.role&&a?.model)?g.filter(a=>a?.role&&a?.model):f?[{role:"default",model:f}]:[],j=i.find(a=>"default"===a.role);if(!c||!j&&!h)return e.NextResponse.json({error:"baseUrl and model are required"},{status:400});let k=!!h&&q(h.enabled),n="string"==typeof h?.model?h.model.trim():"";if(k&&!n)return e.NextResponse.json({error:"audio.model is required when enabling audio transcription"},{status:400});let o=c.endsWith("/v1")?c:`${c}/v1`;if(q(b.applyToAll??p(a,"applyToAll")))return await y({normalizedBaseUrl:o,apiKey:d,model:j?.model});let{home:s,error:w}=r(b.profile??p(a,"profile"));if(w)return e.NextResponse.json({error:w},{status:400});if(!s.isDefault&&!await (0,m.U1)(s.dir))return e.NextResponse.json({error:`Hermes profile "${s.name}" not found`},{status:404});let x=await t(s);for(let{role:a,model:b}of i)x="default"===a?(0,l.Wy)(x,(0,l.bl)(b,o)):"delegation"===a?(0,l.P5)(x,(0,l.W3)(b,o)):(0,l.K)(x,a,(0,l.E3)(a,b,o));return h&&(k?x=(0,l.V1)(x,n,o):(0,l.ef)((0,l.EW)(x))&&(x=(0,l._g)(x))),await u(s,x),await v(s,d),e.NextResponse.json({success:!0,message:s.isDefault?"Hermes settings applied successfully!":`Hermes settings applied to profile "${s.name}"!`,profile:{name:s.name,dir:s.dir,isDefault:s.isDefault},stt9Router:(0,l.ef)((0,l.EW)(x)),configPath:s.configPath})}catch(a){return console.log("Error updating hermes settings:",a),e.NextResponse.json({error:"Failed to update hermes settings"},{status:500})}}async function A(a){try{let b=null;if(a&&"function"==typeof a.json)try{b=await a.json()}catch{b=null}let{home:c,error:d}=r(b?.profile??p(a,"profile"));if(d)return e.NextResponse.json({error:d},{status:400});if(!c.isDefault&&!await (0,m.U1)(c.dir))return e.NextResponse.json({error:`Hermes profile "${c.name}" not found`},{status:404});let f="";try{f=await i().readFile(c.configPath,"utf-8")}catch(a){if("ENOENT"===a.code)return e.NextResponse.json({success:!0,profile:c.name,message:"No config file to reset"});throw a}let g={model:!1,delegation:!1,auxiliary:[],stt:!1},h=[],j=(0,l.Gx)(f);j&&(0,l.lP)(j)?(f=(0,l.Fj)(f),g.model=!0):j&&h.push("model");let k=(0,l.dp)(f);for(let[a,b]of(k&&(0,l.lP)(k)?(f=(0,l.IP)(f),g.delegation=!0):k&&h.push("delegation"),Object.entries((0,l.hh)(f))))(0,l.lP)(b)&&(f=(0,l.$d)(f,a),g.auxiliary.push(a));let n=(0,l.EW)(f);n&&(0,l.ef)(n)?(f=(0,l._g)(f),g.stt=!0,(0,l.EW)(f)&&h.push("stt")):n&&h.push("stt"),f=f.replace(/^\n+/,""),await u(c,f);let o=c.isDefault?"":` in profile "${c.name}"`;return e.NextResponse.json({success:!0,profile:c.name,removed:g,kept:h,message:`9router model blocks removed${o}`})}catch(a){return console.log("Error resetting hermes settings:",a),e.NextResponse.json({error:"Failed to reset hermes settings"},{status:500})}}(0,n.D)([x,z,A]),(0,d.A)(x,"
|
|
1
|
+
"use strict";exports.id=1757,exports.ids=[1757],exports.modules={21757:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>A,GET:()=>x,POST:()=>z});var d=c(49796),e=c(23211),f=c(79646),g=c(28354),h=c(79748),i=c.n(h),j=c(21820),k=c.n(j),l=c(42339),m=c(92182),n=c(24424);let o=(0,g.promisify)(f.exec),p=(a,b)=>{if(!a)return null;try{let c=a.nextUrl||("string"==typeof a.url?new URL(a.url):null);return c?.searchParams?.get(b)||null}catch{return null}},q=a=>!0===a||"true"===a||"1"===a,r=a=>{try{return{home:(0,m.Yc)(a)}}catch(a){return{error:a.message}}},s=async a=>{try{return await i().readFile(a,"utf-8")}catch(a){if("ENOENT"===a.code)return"";throw a}},t=a=>s(a.configPath),u=async(a,b)=>{a.isDefault&&await i().mkdir(a.dir,{recursive:!0}),await i().writeFile(a.configPath,b)},v=async(a,b)=>{if(!b)return;a.isDefault&&await i().mkdir(a.dir,{recursive:!0});let c=(0,l.C1)(await s(a.envPath),"OPENAI_API_KEY",b);await i().writeFile(a.envPath,c)},w=async()=>{try{let a="win32"===k().platform();return await o(a?"where hermes":"which hermes",{windowsHide:!0}),!0}catch{try{return await i().access((0,m.Yc)(null).configPath),!0}catch{return!1}}};async function x(a){try{if(!await w())return e.NextResponse.json({installed:!1,settings:null,message:"Hermes Agent is not installed"});let{home:b,error:c}=r(p(a,"profile"));if(c)return e.NextResponse.json({error:c},{status:400});if(!b.isDefault&&!await (0,m.U1)(b.dir))return e.NextResponse.json({error:`Hermes profile "${b.name}" not found`},{status:404});let d=await t(b),f=(0,l.Gx)(d),g=(0,l.dp)(d),h=(0,l.hh)(d),i=(0,l.EW)(d);return e.NextResponse.json({installed:!0,profile:{name:b.name,dir:b.dir,isDefault:b.isDefault},settings:{model:f,delegation:g,auxiliary:h,stt:i},has9Router:(0,l.DN)(f)||(0,l.DN)(g)||Object.values(h).some(l.DN),has9RouterStt:(0,l.ef)(i),configPath:b.configPath})}catch(a){return console.log("Error checking hermes settings:",a),e.NextResponse.json({error:"Failed to check hermes settings"},{status:500})}}let y=async({normalizedBaseUrl:a,apiKey:b,model:c})=>{let d=await (0,m.Bn)(),f=[];for(let e of d){let d=(0,m.Yc)(e.name);try{let g=await t(d),h=(0,l.Gx)(g);if(h?.default&&(0,l.lP)(h)){g=(0,l.Wy)(g,(0,l.bl)(h.default,a));let c=(0,l.dp)(g);for(let[b,d]of(c?.model&&(0,l.lP)(c)&&(g=(0,l.P5)(g,(0,l.W3)(c.model,a))),Object.entries((0,l.hh)(g))))d?.model&&(0,l.lP)(d)&&(g=(0,l.K)(g,b,(0,l.E3)(b,d.model,a)));await u(d,g),await v(d,b),f.push({profile:e.name,status:"updated",model:h.default})}else h?.default?f.push({profile:e.name,status:"skipped",reason:`main model uses provider "${h.provider||"unknown"}" — configure this profile individually`}):c?(g=(0,l.Wy)(g,(0,l.bl)(c,a)),await u(d,g),await v(d,b),f.push({profile:e.name,status:"updated",model:c})):f.push({profile:e.name,status:"skipped",reason:"no main model configured"})}catch(a){f.push({profile:e.name,status:"failed",reason:a.message})}}let g=f.filter(a=>"updated"===a.status).length;return e.NextResponse.json({success:g>0,bulk:!0,results:f,updated:g,skipped:f.length-g,message:`Updated endpoint on ${g} profile(s)`})};async function z(a){try{let b=await a.json(),{baseUrl:c,apiKey:d,model:f,selections:g,audio:h}=b,i=Array.isArray(g)&&g.some(a=>a?.role&&a?.model)?g.filter(a=>a?.role&&a?.model):f?[{role:"default",model:f}]:[],j=i.find(a=>"default"===a.role);if(!c||!j&&!h)return e.NextResponse.json({error:"baseUrl and model are required"},{status:400});let k=!!h&&q(h.enabled),n="string"==typeof h?.model?h.model.trim():"";if(k&&!n)return e.NextResponse.json({error:"audio.model is required when enabling audio transcription"},{status:400});let o=c.endsWith("/v1")?c:`${c}/v1`;if(q(b.applyToAll??p(a,"applyToAll")))return await y({normalizedBaseUrl:o,apiKey:d,model:j?.model});let{home:s,error:w}=r(b.profile??p(a,"profile"));if(w)return e.NextResponse.json({error:w},{status:400});if(!s.isDefault&&!await (0,m.U1)(s.dir))return e.NextResponse.json({error:`Hermes profile "${s.name}" not found`},{status:404});let x=await t(s);for(let{role:a,model:b}of i)x="default"===a?(0,l.Wy)(x,(0,l.bl)(b,o)):"delegation"===a?(0,l.P5)(x,(0,l.W3)(b,o)):(0,l.K)(x,a,(0,l.E3)(a,b,o));return h&&(k?x=(0,l.V1)(x,n,o):(0,l.ef)((0,l.EW)(x))&&(x=(0,l._g)(x))),await u(s,x),await v(s,d),e.NextResponse.json({success:!0,message:s.isDefault?"Hermes settings applied successfully!":`Hermes settings applied to profile "${s.name}"!`,profile:{name:s.name,dir:s.dir,isDefault:s.isDefault},stt9Router:(0,l.ef)((0,l.EW)(x)),configPath:s.configPath})}catch(a){return console.log("Error updating hermes settings:",a),e.NextResponse.json({error:"Failed to update hermes settings"},{status:500})}}async function A(a){try{let b=null;if(a&&"function"==typeof a.json)try{b=await a.json()}catch{b=null}let{home:c,error:d}=r(b?.profile??p(a,"profile"));if(d)return e.NextResponse.json({error:d},{status:400});if(!c.isDefault&&!await (0,m.U1)(c.dir))return e.NextResponse.json({error:`Hermes profile "${c.name}" not found`},{status:404});let f="";try{f=await i().readFile(c.configPath,"utf-8")}catch(a){if("ENOENT"===a.code)return e.NextResponse.json({success:!0,profile:c.name,message:"No config file to reset"});throw a}let g={model:!1,delegation:!1,auxiliary:[],stt:!1},h=[],j=(0,l.Gx)(f);j&&(0,l.lP)(j)?(f=(0,l.Fj)(f),g.model=!0):j&&h.push("model");let k=(0,l.dp)(f);for(let[a,b]of(k&&(0,l.lP)(k)?(f=(0,l.IP)(f),g.delegation=!0):k&&h.push("delegation"),Object.entries((0,l.hh)(f))))(0,l.lP)(b)&&(f=(0,l.$d)(f,a),g.auxiliary.push(a));let n=(0,l.EW)(f);n&&(0,l.ef)(n)?(f=(0,l._g)(f),g.stt=!0,(0,l.EW)(f)&&h.push("stt")):n&&h.push("stt"),f=f.replace(/^\n+/,""),await u(c,f);let o=c.isDefault?"":` in profile "${c.name}"`;return e.NextResponse.json({success:!0,profile:c.name,removed:g,kept:h,message:`9router model blocks removed${o}`})}catch(a){return console.log("Error resetting hermes settings:",a),e.NextResponse.json({error:"Failed to reset hermes settings"},{status:500})}}(0,n.D)([x,z,A]),(0,d.A)(x,"40d6fc9cb568ea56e45da8a891b06dd2ee460dad2c",null),(0,d.A)(z,"40abdb8499cb96207d959b798fb5076bd05f116887",null),(0,d.A)(A,"40327897d9f9e39fa7a1675292314cc6826bbfd8fe",null)},42339:(a,b,c)=>{c.d(b,{$d:()=>r,C1:()=>v,DN:()=>w,E3:()=>k,EW:()=>C,Fj:()=>u,Gx:()=>m,IP:()=>p,K:()=>q,P5:()=>o,V1:()=>G,W3:()=>j,Wy:()=>n,_g:()=>H,bl:()=>i,dp:()=>t,ef:()=>D,hh:()=>s,lP:()=>x});let d=/^model:[ \t]*\r?\n((?:[ \t]+.*\r?\n?|[ \t]*\r?\n)*)/m,e=/^model:[ \t]*[^\r\n]*\r?\n?/m,f=/^delegation:[ \t]*\r?\n((?:[ \t]+.*\r?\n?|[ \t]*\r?\n)*)/m,g=/^auxiliary:[ \t]*\r?\n((?:(?:[ \t]+.*\r?\n?)|(?:[ \t]*\r?\n))*)/m,h=a=>RegExp(`^ ${a}:[ \\t]*\\r?\\n(?:(?:[ \\t]{4,}.*\\r?\\n?)|(?:[ \\t]*\\r?\\n))*`,"m"),i=(a,b)=>`model:
|
|
2
2
|
default: "${a}"
|
|
3
3
|
provider: "custom"
|
|
4
4
|
base_url: "${b}"
|