@rabbi696/ezrouter 0.6.38 → 0.6.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +5 -5
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/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 +7 -7
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/ha/resolve/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/ha/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +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/caps/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/caps/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/bulk/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models-dev/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models-dev/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models-dev/refresh/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models-dev/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models-dev/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/opendesign/device/route.js +1 -1
- package/app/.next-cli-build/server/app/api/opendesign/device/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/quota/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/quota/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/quota/custom/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/quota/custom/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/provider-order/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/provider-order/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.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/api/wakeup/route.js +1 -1
- package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/ha.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/ha.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/ha.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/ha.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/models.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/models.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/models.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/models.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/models.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/models.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +5 -5
- package/app/.next-cli-build/server/chunks/1253.js +1 -1
- package/app/.next-cli-build/server/chunks/1522.js +1 -1
- package/app/.next-cli-build/server/chunks/1596.js +244 -0
- package/app/.next-cli-build/server/chunks/1847.js +1 -1
- package/app/.next-cli-build/server/chunks/1923.js +1 -1
- package/app/.next-cli-build/server/chunks/2269.js +1 -1
- package/app/.next-cli-build/server/chunks/2807.js +1 -1
- package/app/.next-cli-build/server/chunks/2898.js +1 -1
- package/app/.next-cli-build/server/chunks/2937.js +1 -1
- package/app/.next-cli-build/server/chunks/2960.js +1 -0
- package/app/.next-cli-build/server/chunks/321.js +2 -2
- package/app/.next-cli-build/server/chunks/3547.js +1 -1
- package/app/.next-cli-build/server/chunks/369.js +31 -29
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4212.js +1 -1
- package/app/.next-cli-build/server/chunks/4646.js +1 -1
- package/app/.next-cli-build/server/chunks/4878.js +1 -1
- package/app/.next-cli-build/server/chunks/5044.js +29 -29
- package/app/.next-cli-build/server/chunks/5095.js +1 -1
- package/app/.next-cli-build/server/chunks/5461.js +1 -1
- package/app/.next-cli-build/server/chunks/5781.js +1 -1
- package/app/.next-cli-build/server/chunks/5941.js +1 -1
- package/app/.next-cli-build/server/chunks/6038.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6172.js +1 -0
- package/app/.next-cli-build/server/chunks/6238.js +1 -0
- package/app/.next-cli-build/server/chunks/6247.js +1 -1
- package/app/.next-cli-build/server/chunks/6328.js +1 -1
- package/app/.next-cli-build/server/chunks/6405.js +1 -1
- package/app/.next-cli-build/server/chunks/6558.js +1 -0
- package/app/.next-cli-build/server/chunks/6643.js +9 -0
- package/app/.next-cli-build/server/chunks/7047.js +5 -0
- package/app/.next-cli-build/server/chunks/7099.js +1 -1
- package/app/.next-cli-build/server/chunks/7302.js +1 -1
- package/app/.next-cli-build/server/chunks/7390.js +1 -0
- package/app/.next-cli-build/server/chunks/7547.js +2 -2
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7791.js +1 -1
- package/app/.next-cli-build/server/chunks/795.js +1 -1
- package/app/.next-cli-build/server/chunks/7972.js +2 -2
- package/app/.next-cli-build/server/chunks/8129.js +1 -1
- package/app/.next-cli-build/server/chunks/8254.js +1 -0
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8595.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/9013.js +1 -0
- package/app/.next-cli-build/server/chunks/9303.js +1 -1
- package/app/.next-cli-build/server/chunks/9485.js +1 -1
- package/app/.next-cli-build/server/chunks/9623.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/1321-eeb375c502dbb3c5.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-1793b8b5349f48f8.js +17 -0
- package/app/.next-cli-build/static/chunks/801-000c65bead05e7c4.js +1 -0
- package/app/.next-cli-build/static/chunks/8105-20580523ec1fe595.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7246616c24ede8fa.js → page-fc51d93ef1fa57e5.js} +12 -12
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-0d946c1eaac6bc33.js → page-61f0f1acf8b46ffe.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e389e3a86bd28ebd.js +1 -0
- package/app/CHANGELOG.md +38 -0
- package/app/package.json +1 -1
- package/app/public/CHANGELOG.md +38 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/1390.js +0 -1
- package/app/.next-cli-build/server/chunks/169.js +0 -1
- package/app/.next-cli-build/server/chunks/3216.js +0 -1
- package/app/.next-cli-build/server/chunks/3378.js +0 -1
- package/app/.next-cli-build/server/chunks/4606.js +0 -1
- package/app/.next-cli-build/server/chunks/5187.js +0 -1
- package/app/.next-cli-build/server/chunks/656.js +0 -5
- package/app/.next-cli-build/server/chunks/7062.js +0 -5
- package/app/.next-cli-build/server/chunks/7225.js +0 -1
- package/app/.next-cli-build/server/chunks/7658.js +0 -248
- package/app/.next-cli-build/static/chunks/1321-ae4013f99085a326.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-4ff55888b5e62f87.js +0 -17
- package/app/.next-cli-build/static/chunks/801-410b498dd92d55c0.js +0 -1
- package/app/.next-cli-build/static/chunks/8105-ced4e60d11786bd4.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-8c02c108699720b2.js +0 -1
- /package/app/.next-cli-build/static/{Rz3JABLEgmSs9rp5DsM9q → fYFaStfzlBB-WDPpZtzdy}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{Rz3JABLEgmSs9rp5DsM9q → fYFaStfzlBB-WDPpZtzdy}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";exports.id=7972,exports.ids=[7972],exports.modules={3894:(a,b,c)=>{c.d(b,{F_:()=>g,Nc:()=>h,Qh:()=>t,Su:()=>q,ag:()=>o,kI:()=>p,rl:()=>u,sy:()=>s});var d=c(79646),e=c(33873),f=c.n(e);let g=["code","ml"],h={code:["tree-sitter","tree-sitter-language-pack"],ml:["torch","huggingface-hub"]},i="win32"===process.platform,j=i?"where":"which",k=i?[`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python314\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python313\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python312\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python311\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python310\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python314\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python313\\Scripts`,"C:\\Python314","C:\\Python313","C:\\Python312","C:\\Python311","C:\\Python310"]:["/usr/local/bin","/opt/homebrew/bin","/Library/Frameworks/Python.framework/Versions/3.13/bin","/Library/Frameworks/Python.framework/Versions/3.12/bin","/Library/Frameworks/Python.framework/Versions/3.11/bin","/Library/Frameworks/Python.framework/Versions/3.10/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],l=[...k,process.env.PATH||""].filter(Boolean).join(f().delimiter),m=["python3.13","python3.12","python3.11","python3.10","python3","python"],n=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]),o=process.env.HEADROOM_URL||"http://localhost:8787";function p(){try{let a=(0,d.execSync)(`${j} headroom`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l},timeout:3e3}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function q(){let a=null;for(let b of function(){let a=[],b=p();if(b){let c=f().dirname(b);for(let b of i?["python.exe","python3.exe"]:["python3","python3.13","python"])a.push(f().join(c,b))}for(let b of k)if(b)for(let c of m)a.push(f().join(b,i?`${c}.exe`:c));return a.push(...m),a}())try{let c=(0,d.execFileSync)(b,["--version"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l},timeout:8e3}).toString().trim().match(/(\d+)\.(\d+)/);if(!c)continue;let[e,f]=[parseInt(c[1],10),parseInt(c[2],10)];if(!(e>3||3===e&&f>=10))continue;a||(a=b);try{return(0,d.execFileSync)(b,["-m","pip","show","headroom-ai"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}),b}catch{}}catch{}return a}async function r(a){if(!a)return!1;let b=String(a).replace(/\/$/,"");try{return(await fetch(`${b}/health`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}function s(a){try{let b=new URL(a);return n.has(b.hostname)}catch{return!1}}async function t(a){let b=p(),c=q(),d=!!b,e=await r(a),f=s(a),g=d?u(c):{installed:!1,version:null,extras:{code:!1,ml:!1}};return{installed:d,path:b,running:e,python:c,localUrl:f,canStart:d&&f,version:g.version,extras:g.extras}}function u(a){let b=a||q();if(!b)return{installed:!1,version:null,extras:{code:!1,ml:!1}};try{let a=(0,d.execFileSync)(b,["-m","pip","list","--format=json","--disable-pip-version-check"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}).toString(),c=JSON.parse(a),e=new Set(c.map(a=>String(a.name||"").toLowerCase()));if(!e.has("headroom-ai"))return{installed:!1,version:null,extras:{code:!1,ml:!1}};let f=c.find(a=>a.name?.toLowerCase()==="headroom-ai")?.version||null,i={};for(let a of g)i[a]=h[a].some(a=>e.has(a));return{installed:!0,version:f,extras:i}}catch{return{installed:!1,version:null,extras:{code:!1,ml:!1}}}}},10858:(a,b,c)=>{c.d(b,{Y:()=>g});var d=c(38522),e=c(57975);let f={gzip:(0,e.promisify)(d.gunzip),br:(0,e.promisify)(d.brotliDecompress),deflate:(0,e.promisify)(d.inflate),zstd:d.zstdDecompress?(0,e.promisify)(d.zstdDecompress):null};async function g(a,b=0x6400000){let c=(a.headers.get("content-encoding")||"identity").trim().toLowerCase();if(!c||"identity"===c)return a.json();let d=Object.hasOwn(f,c)&&f[c];if(!d)throw Error(`Unsupported Content-Encoding: ${c}`);let e=Buffer.from(await a.arrayBuffer());return JSON.parse((await d(e,{maxOutputLength:b})).toString("utf8"))}},24253:(a,b,c)=>{c.d(b,{Mo:()=>h,RG:()=>l,V:()=>i,Y8:()=>k,xl:()=>m});var d=c(1932),e=c(87155);let f=null,g=null;function h(){return f?{loaded:!0,version:f.version,loadedAt:f.loadedAt}:{loaded:!1}}async function i(){return f||g||(g=j().finally(()=>{g=null}))}async function j(){let a=(0,e.S1)();if(!a.installed){let a=Error("PXPIPE is not installed");throw a.code="NOT_INSTALLED",a}let b=`${(0,d.pathToFileURL)((0,e.CG)()).href}?v=${encodeURIComponent(a.version||"0")}`,c=await import(b);if("function"!=typeof c.transformAnthropicMessages)throw Error("installed pxpipe package does not export transformAnthropicMessages");return f={module:c,version:a.version,loadedAt:Date.now()}}function k(){let a=!!f;return f=null,a}async function l({autoLoad:a=!0}={}){try{if(!f&&!a)return null;let{module:b}=await i();return b.transformAnthropicMessages}catch{return null}}async function m(){let a=Date.now(),{module:b}=await i(),c=new TextEncoder().encode(JSON.stringify({model:"claude-fable-5",max_tokens:16,messages:[{role:"user",content:"ping"}]})),d=await b.transformAnthropicMessages({body:c,model:"claude-fable-5"});if(!d||"boolean"!=typeof d.applied||!(d.body instanceof Uint8Array))throw Error("transform returned an unexpected shape");return{ok:!0,reason:d.reason,durationMs:Date.now()-a}}},46984:(a,b,c)=>{c.d(b,{o:()=>p});var d=c(23433),e=c(89718),f=c(38775),g=c(27811),h=c(50711),i=c(85703),j=c(39141),k=c(89865),l=c(60290),m=c(7803),n=c(67828),o=c(47370);async function p(a){let b;try{b=await a.json()}catch{return m.warn("SYSTEMONE","Invalid JSON body"),(0,k.yj)(l.gx.BAD_REQUEST,"Invalid JSON body")}let c=new URL(a.url),f=b.model;m.request("POST",`${c.pathname} | ${f}`);let{apiKey:h,valid:j}=await (0,d.$A)(a);h?m.debug("AUTH",`API Key: ${m.maskKey(h)}`):m.debug("AUTH","No API key provided (local mode)");let n=await (0,e.mt)();if(n.requireApiKey){if(!h)return m.warn("AUTH","Missing API key (requireApiKey=true)"),(0,k.yj)(l.gx.UNAUTHORIZED,"Missing API key");if(!j)return m.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,k.yj)(l.gx.UNAUTHORIZED,"Invalid API key")}if("string"!=typeof f||!f)return m.warn("SYSTEMONE","Missing model"),(0,k.yj)(l.gx.BAD_REQUEST,"Missing model");if(void 0===b.state||null===b.state)return(0,k.yj)(l.gx.BAD_REQUEST,"Missing required field: state");if(!b.questions||"object"!=typeof b.questions||Array.isArray(b.questions))return(0,k.yj)(l.gx.BAD_REQUEST,"Missing required field: questions");let o=await (0,g.cI)(await (0,g.TM)(a),f);if(o)return o;let p=f.includes("/")?null:await (0,e.Dj)(f);if(p){if("systemone"!==p.kind)return m.warn("SYSTEMONE",`Combo "${p.name}" is kind ${p.kind||"llm"}, not systemone`),(0,k.yj)(l.gx.BAD_REQUEST,"Combo does not support System One");let d=p.models;if(void 0!==d&&!Array.isArray(d))return(0,k.yj)(l.gx.BAD_REQUEST,"Invalid model format");if(!Array.isArray(d)||0===d.length)return(0,k.yj)(l.gx.BAD_REQUEST,"System One combo has no models");if(d.some(a=>"string"!=typeof a||!a.trim()))return(0,k.yj)(l.gx.BAD_REQUEST,"Invalid model format");let e=n.comboStrategies?.[p.name]?.fallbackStrategy||n.comboStrategy||"fallback";return m.info("SYSTEMONE",`Combo "${p.name}" with ${d.length} providers (strategy: ${e})`),(0,i.Pr)({body:b,models:d,handleSingleModel:(b,d)=>q(r(b,d,{apiKey:h,endpoint:c.pathname,log:m,request:a})),log:m,comboName:p.name,comboStrategy:"round-robin"===e?"round-robin":"fallback",comboStickyLimit:n.comboStickyRoundRobinLimit,autoSwitch:!1,policy:{triggers:{fatal:{texts:["unsupported question type"]}}}})}return r(b,f,{apiKey:h,endpoint:c.pathname,log:m,request:a})}async function q(a){let b=await a,c=Number(b.headers.get("retry-after"));if(!Number.isFinite(c)||c<=0)return b;let d=new Date(Date.now()+1e3*c).toISOString(),e={error:{message:"Unavailable"}};try{let a=await b.clone().json();a&&"object"==typeof a&&!Array.isArray(a)&&(e=a)}catch{}return new Response(JSON.stringify({...e,retryAfter:d}),{status:b.status,headers:b.headers})}async function r(a,b,{apiKey:c,endpoint:e,log:i,request:m}){if("string"!=typeof b||!b)return(0,k.yj)(l.gx.BAD_REQUEST,"Invalid model format");let p=await (0,f.mA)(b);if(!p.provider)return i.warn("SYSTEMONE","Invalid model format",{model:b}),(0,k.yj)(l.gx.BAD_REQUEST,"Invalid model format");let{provider:q,model:s}=p;if(!j.B$[q]?.systemoneConfig)return i.warn("SYSTEMONE",`Provider ${q} has no System One config`,{model:b}),(0,k.yj)(l.gx.BAD_REQUEST,`Provider '${q}' does not support System One.`);b!==`${q}/${s}`?i.info("ROUTING",`${b} → ${q}/${s}`):i.info("ROUTING",`Provider: ${q}, Model: ${s}`);let t=new Set,u=null,v=null;for(;;){let b=await (0,d.c1)(q,t,s,{allowedConnectionIds:await (0,g.pL)(m,q)});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=u||b.lastError||"Unavailable",c=v||Number(b.lastErrorCode)||l.gx.SERVICE_UNAVAILABLE;return i.warn("SYSTEMONE",`[${q}/${s}] ${a} (${b.retryAfterHuman})`),(0,k.wO)(c,`[${q}/${s}] ${a}`,b.retryAfter,b.retryAfterHuman)}if(0===t.size)return i.error("AUTH",`No credentials for provider: ${q}`),(0,k.yj)(l.gx.BAD_REQUEST,`No credentials for provider: ${q}`);return i.warn("SYSTEMONE","No more accounts available",{provider:q}),(0,k.yj)(v||l.gx.SERVICE_UNAVAILABLE,u||"All accounts unavailable")}i.info("AUTH",`\x1b[32mUsing ${q} account: ${b.connectionName}\x1b[0m`);let f=await (0,n.checkAndRefreshToken)(q,b),j=await (0,h.l)({body:a,modelInfo:{provider:q,model:s},credentials:f,log:i,onRequestSuccess:async()=>{await (0,d.Pt)(b.connectionId,b,s)}});if(j.success)return j.usage&&(0,o.sZ)({provider:q,model:s,connectionId:b.connectionId,apiKey:c,endpoint:e,tokens:{...j.usage,total_tokens:j.usage.prompt_tokens+j.usage.completion_tokens},status:"success"}).catch(()=>{}),j.response;let{shouldFallback:p}=await (0,d.vk)(b.connectionId,j.status,j.error,q,s);if(p){i.warn("AUTH",`Account ${b.connectionName} unavailable (${j.status}), trying fallback`),t.add(b.connectionId),u=j.error,v=j.status;continue}return j.response}}},50711:(a,b,c)=>{c.d(b,{l:()=>j});var d=c(89865),e=c(60290),f=c(39141),g=c(29485),h=c(47062);let i=new Set(["opencode","opencode-zen"]);async function j({body:a,modelInfo:b,credentials:c,log:k,onRequestSuccess:l}){let m,n,{provider:o,model:p}=b,q=f.B$[o]?.systemoneConfig,r=function(a,b){let c=a?.trim();if(!c)return b?.baseUrl;if(!b?.path)return c;let d=c.replace(/\/+$/,""),e=b.path.replace(/\/+$/,"");if(d.endsWith(e))return d;let f=e.slice(0,e.lastIndexOf("/"));return f&&d.endsWith(f)?d+e.slice(f.length):d+e}(c?.providerSpecificData?.baseUrl,q);if(!r)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' does not support System One.`);if(r.includes("{accountId}")){let a=c?.providerSpecificData?.accountId;if(!a)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' requires accountId in providerSpecificData.`);r=r.replace("{accountId}",a)}if(r.includes("{model}")&&(r=r.replace(/\{model\}/g,p)),void 0===a.state||null===a.state)return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: state");if(!a.questions||"object"!=typeof a.questions||Array.isArray(a.questions))return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: questions");let s=c?.apiKey||c?.accessToken,t={"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{},...q.headers||{},...i.has(o)?{"x-opencode-session":(0,h.f6)()}:{}},u={...a,model:(0,g.kt)(o,p)||p};k?.debug?.("SYSTEMONE",`${o.toUpperCase()} | ${p}`);try{m=await fetch(r,{method:"POST",headers:t,body:JSON.stringify(u),..."function"==typeof AbortSignal?.timeout?{signal:AbortSignal.timeout(e.pH)}:{}})}catch(b){let a=(0,d.lR)(b,o,p,e.gx.BAD_GATEWAY);return k?.debug?.("SYSTEMONE",`Fetch error: ${a}`),(0,d.A1)(e.gx.BAD_GATEWAY,a)}if(!m.ok){let{statusCode:a,message:b}=await (0,d.zL)(m),c=(0,d.lR)(Error(b),o,p,a);return k?.debug?.("SYSTEMONE",`Provider error: ${c}`),(0,d.A1)(a,c)}try{n=await m.json()}catch{return(0,d.A1)(e.gx.BAD_GATEWAY,`Invalid JSON response from ${o}`)}n?.result?.answers&&!n.answers&&(n=n.result),l&&await l();let v=n?.usage;return{success:!0,usage:v?{prompt_tokens:v.input_tokens||0,completion_tokens:v.output_tokens||0}:null,response:new Response(JSON.stringify(n),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}},52007:(a,b,c)=>{c.d(b,{Az:()=>l,SP:()=>o,T0:()=>k});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(87155);let i=g().join(h.XF,"events.jsonl"),j=g().join(h.XF,"events.jsonl.1");function k(a){try{e().existsSync(h.XF)||e().mkdirSync(h.XF,{recursive:!0});try{e().statSync(i).size>5242880&&e().renameSync(i,j)}catch{}e().appendFile(i,JSON.stringify({ts:Date.now(),...a})+"\n",()=>{})}catch{}}function l({sinceMs:a=null,limit:b=null}={}){let c=[];for(let b of[j,i])try{if(!e().existsSync(b))continue;for(let d of e().readFileSync(b,"utf8").split("\n"))if(d)try{let b=JSON.parse(d);if(a&&b.ts<a)continue;c.push(b)}catch{}}catch{}return c.sort((a,b)=>a.ts-b.ts),b?c.slice(-b):c}function m(){return{requests:0,compressed:0,bypassed:0,errors:0,tokensBeforeEst:0,tokensAfterEst:0,tokensSavedEst:0,savedPct:0,imagesGenerated:0,compressionTimeMs:0,avgCompressionMs:0}}function n(a,b){a.requests++,b.applied?(a.compressed++,a.tokensBeforeEst+=b.tokensBeforeEst||0,a.tokensAfterEst+=b.tokensAfterEst||0,a.tokensSavedEst+=b.tokensSavedEst||0,a.imagesGenerated+=b.imageCount||0,a.compressionTimeMs+=b.durationMs||0):"transform_error"===b.reason||"timeout"===b.reason?a.errors++:a.bypassed++}function o({timelineDays:a=30,recentLimit:b=100}={}){let c=l(),d=Date.now(),e=new Date(new Date(d).setHours(0,0,0,0)).getTime(),f={all:m(),today:m(),yesterday:m(),last7d:m(),last30d:m()},g=new Map;for(let b=a-1;b>=0;b--){let a=new Date(e-864e5*b);g.set(a.toISOString().slice(0,10),{date:a.toISOString().slice(0,10),tokensSavedEst:0,compressed:0,requests:0})}for(let a of c){n(f.all,a),a.ts>=e?n(f.today,a):a.ts>=e-864e5&&n(f.yesterday,a),a.ts>=d-6048e5&&n(f.last7d,a),a.ts>=d-2592e6&&n(f.last30d,a);let b=new Date(a.ts).toISOString().slice(0,10),c=g.get(b);c&&(c.requests++,a.applied&&(c.compressed++,c.tokensSavedEst+=a.tokensSavedEst||0))}for(let a of Object.values(f))a.savedPct=a.tokensBeforeEst>0?+(a.tokensSavedEst/a.tokensBeforeEst*100).toFixed(2):0,a.avgCompressionMs=a.compressed>0?Math.round(a.compressionTimeMs/a.compressed):0;return{windows:f,timeline:[...g.values()],recent:c.slice(-b).reverse()}}},87155:(a,b,c)=>{c.d(b,{CG:()=>q,ED:()=>u,S1:()=>s,XF:()=>j,_g:()=>t,no:()=>r,sW:()=>w});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(79646),i=c(49120);let j=g().join(i.n,"pxpipe"),k="pxpipe-proxy",l=g().join(j,"install.log"),m="win32"===process.platform,n=[...m?[`${process.env.ProgramFiles||""}\\nodejs`,`${process.env.APPDATA||""}\\npm`]:["/usr/local/bin","/opt/homebrew/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],process.env.PATH||""].filter(Boolean).join(g().delimiter),o=null;function p(){return g().join(j,"node_modules",k)}function q(){return g().join(p(),"dist","core","library.js")}function r(){try{let a=(0,h.execSync)(`${m?"where":"which"} npm`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:n}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function s(){try{let a=g().join(p(),"package.json");if(!e().existsSync(a)||!e().existsSync(q()))return{installed:!1,version:null,path:null};let b=JSON.parse(e().readFileSync(a,"utf8"));return{installed:!0,version:b.version||null,path:p()}}catch{return{installed:!1,version:null,path:null}}}function t(){return null!==o}function u(){return o||(o=v().finally(()=>{o=null}))}async function v(){let a=r();if(!a){let a=Error("npm not found on PATH — Node.js/npm is required to install PXPIPE");throw a.code="NPM_NOT_FOUND",a}e().existsSync(j)||e().mkdirSync(j,{recursive:!0});let b=g().join(j,"package.json");e().existsSync(b)||e().writeFileSync(b,JSON.stringify({name:"9router-pxpipe-host",private:!0},null,2));let c=e().openSync(l,"a");e().writeSync(c,`
|
|
1
|
+
"use strict";exports.id=7972,exports.ids=[7972],exports.modules={3894:(a,b,c)=>{c.d(b,{F_:()=>g,Nc:()=>h,Qh:()=>t,Su:()=>q,ag:()=>o,kI:()=>p,rl:()=>u,sy:()=>s});var d=c(79646),e=c(33873),f=c.n(e);let g=["code","ml"],h={code:["tree-sitter","tree-sitter-language-pack"],ml:["torch","huggingface-hub"]},i="win32"===process.platform,j=i?"where":"which",k=i?[`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python314\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python313\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python312\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python311\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python310\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python314\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python313\\Scripts`,"C:\\Python314","C:\\Python313","C:\\Python312","C:\\Python311","C:\\Python310"]:["/usr/local/bin","/opt/homebrew/bin","/Library/Frameworks/Python.framework/Versions/3.13/bin","/Library/Frameworks/Python.framework/Versions/3.12/bin","/Library/Frameworks/Python.framework/Versions/3.11/bin","/Library/Frameworks/Python.framework/Versions/3.10/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],l=[...k,process.env.PATH||""].filter(Boolean).join(f().delimiter),m=["python3.13","python3.12","python3.11","python3.10","python3","python"],n=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]),o=process.env.HEADROOM_URL||"http://localhost:8787";function p(){try{let a=(0,d.execSync)(`${j} headroom`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l},timeout:3e3}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function q(){let a=null;for(let b of function(){let a=[],b=p();if(b){let c=f().dirname(b);for(let b of i?["python.exe","python3.exe"]:["python3","python3.13","python"])a.push(f().join(c,b))}for(let b of k)if(b)for(let c of m)a.push(f().join(b,i?`${c}.exe`:c));return a.push(...m),a}())try{let c=(0,d.execFileSync)(b,["--version"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l},timeout:8e3}).toString().trim().match(/(\d+)\.(\d+)/);if(!c)continue;let[e,f]=[parseInt(c[1],10),parseInt(c[2],10)];if(!(e>3||3===e&&f>=10))continue;a||(a=b);try{return(0,d.execFileSync)(b,["-m","pip","show","headroom-ai"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}),b}catch{}}catch{}return a}async function r(a){if(!a)return!1;let b=String(a).replace(/\/$/,"");try{return(await fetch(`${b}/health`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}function s(a){try{let b=new URL(a);return n.has(b.hostname)}catch{return!1}}async function t(a){let b=p(),c=q(),d=!!b,e=await r(a),f=s(a),g=d?u(c):{installed:!1,version:null,extras:{code:!1,ml:!1}};return{installed:d,path:b,running:e,python:c,localUrl:f,canStart:d&&f,version:g.version,extras:g.extras}}function u(a){let b=a||q();if(!b)return{installed:!1,version:null,extras:{code:!1,ml:!1}};try{let a=(0,d.execFileSync)(b,["-m","pip","list","--format=json","--disable-pip-version-check"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}).toString(),c=JSON.parse(a),e=new Set(c.map(a=>String(a.name||"").toLowerCase()));if(!e.has("headroom-ai"))return{installed:!1,version:null,extras:{code:!1,ml:!1}};let f=c.find(a=>a.name?.toLowerCase()==="headroom-ai")?.version||null,i={};for(let a of g)i[a]=h[a].some(a=>e.has(a));return{installed:!0,version:f,extras:i}}catch{return{installed:!1,version:null,extras:{code:!1,ml:!1}}}}},10858:(a,b,c)=>{c.d(b,{Y:()=>g});var d=c(38522),e=c(57975);let f={gzip:(0,e.promisify)(d.gunzip),br:(0,e.promisify)(d.brotliDecompress),deflate:(0,e.promisify)(d.inflate),zstd:d.zstdDecompress?(0,e.promisify)(d.zstdDecompress):null};async function g(a,b=0x6400000){let c=(a.headers.get("content-encoding")||"identity").trim().toLowerCase();if(!c||"identity"===c)return a.json();let d=Object.hasOwn(f,c)&&f[c];if(!d)throw Error(`Unsupported Content-Encoding: ${c}`);let e=Buffer.from(await a.arrayBuffer());return JSON.parse((await d(e,{maxOutputLength:b})).toString("utf8"))}},24253:(a,b,c)=>{c.d(b,{Mo:()=>h,RG:()=>l,V:()=>i,Y8:()=>k,xl:()=>m});var d=c(1932),e=c(87155);let f=null,g=null;function h(){return f?{loaded:!0,version:f.version,loadedAt:f.loadedAt}:{loaded:!1}}async function i(){return f||g||(g=j().finally(()=>{g=null}))}async function j(){let a=(0,e.S1)();if(!a.installed){let a=Error("PXPIPE is not installed");throw a.code="NOT_INSTALLED",a}let b=`${(0,d.pathToFileURL)((0,e.CG)()).href}?v=${encodeURIComponent(a.version||"0")}`,c=await import(b);if("function"!=typeof c.transformAnthropicMessages)throw Error("installed pxpipe package does not export transformAnthropicMessages");return f={module:c,version:a.version,loadedAt:Date.now()}}function k(){let a=!!f;return f=null,a}async function l({autoLoad:a=!0}={}){try{if(!f&&!a)return null;let{module:b}=await i();return b.transformAnthropicMessages}catch{return null}}async function m(){let a=Date.now(),{module:b}=await i(),c=new TextEncoder().encode(JSON.stringify({model:"claude-fable-5",max_tokens:16,messages:[{role:"user",content:"ping"}]})),d=await b.transformAnthropicMessages({body:c,model:"claude-fable-5"});if(!d||"boolean"!=typeof d.applied||!(d.body instanceof Uint8Array))throw Error("transform returned an unexpected shape");return{ok:!0,reason:d.reason,durationMs:Date.now()-a}}},46984:(a,b,c)=>{c.d(b,{o:()=>q});var d=c(23433),e=c(89718),f=c(38775),g=c(27811),h=c(50711),i=c(56558),j=c(85703),k=c(39141),l=c(89865),m=c(60290),n=c(7803),o=c(67828),p=c(47370);async function q(a){let b;try{b=await a.json()}catch{return n.warn("SYSTEMONE","Invalid JSON body"),(0,l.yj)(m.gx.BAD_REQUEST,"Invalid JSON body")}let c=new URL(a.url),f=b.model;n.request("POST",`${c.pathname} | ${f}`);let{apiKey:h,valid:i}=await (0,d.$A)(a);h?n.debug("AUTH",`API Key: ${n.maskKey(h)}`):n.debug("AUTH","No API key provided (local mode)");let k=await (0,e.mt)();if(k.requireApiKey){if(!h)return n.warn("AUTH","Missing API key (requireApiKey=true)"),(0,l.yj)(m.gx.UNAUTHORIZED,"Missing API key");if(!i)return n.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,l.yj)(m.gx.UNAUTHORIZED,"Invalid API key")}if("string"!=typeof f||!f)return n.warn("SYSTEMONE","Missing model"),(0,l.yj)(m.gx.BAD_REQUEST,"Missing model");if(void 0===b.state||null===b.state)return(0,l.yj)(m.gx.BAD_REQUEST,"Missing required field: state");let o=await (0,g.cI)(await (0,g.TM)(a),f);if(o)return o;let p=f.includes("/")?null:await (0,e.Dj)(f);if(p){if("systemone"!==p.kind)return n.warn("SYSTEMONE",`Combo "${p.name}" is kind ${p.kind||"llm"}, not systemone`),(0,l.yj)(m.gx.BAD_REQUEST,"Combo does not support System One");let d=p.models;if(void 0!==d&&!Array.isArray(d))return(0,l.yj)(m.gx.BAD_REQUEST,"Invalid model format");if(!Array.isArray(d)||0===d.length)return(0,l.yj)(m.gx.BAD_REQUEST,"System One combo has no models");if(d.some(a=>"string"!=typeof a||!a.trim()))return(0,l.yj)(m.gx.BAD_REQUEST,"Invalid model format");let e=k.comboStrategies?.[p.name]?.fallbackStrategy||k.comboStrategy||"fallback";return n.info("SYSTEMONE",`Combo "${p.name}" with ${d.length} providers (strategy: ${e})`),(0,j.Pr)({body:b,models:d,handleSingleModel:(b,d)=>r(s(b,d,{apiKey:h,endpoint:c.pathname,log:n,request:a})),log:n,comboName:p.name,comboStrategy:"round-robin"===e?"round-robin":"fallback",comboStickyLimit:k.comboStickyRoundRobinLimit,autoSwitch:!1,policy:{triggers:{fatal:{texts:["unsupported question type"]}}}})}return s(b,f,{apiKey:h,endpoint:c.pathname,log:n,request:a})}async function r(a){let b=await a,c=Number(b.headers.get("retry-after"));if(!Number.isFinite(c)||c<=0)return b;let d=new Date(Date.now()+1e3*c).toISOString(),e={error:{message:"Unavailable"}};try{let a=await b.clone().json();a&&"object"==typeof a&&!Array.isArray(a)&&(e=a)}catch{}return new Response(JSON.stringify({...e,retryAfter:d}),{status:b.status,headers:b.headers})}async function s(a,b,{apiKey:c,endpoint:j,log:n,request:q}){if("string"!=typeof b||!b)return(0,l.yj)(m.gx.BAD_REQUEST,"Invalid model format");let r=await (0,f.mA)(b);if(!r.provider)return n.warn("SYSTEMONE","Invalid model format",{model:b}),(0,l.yj)(m.gx.BAD_REQUEST,"Invalid model format");let{provider:t,model:u}=r;if(!k.B$[t]?.systemoneConfig)return n.warn("SYSTEMONE",`Provider ${t} has no System One config`,{model:b}),(0,l.yj)(m.gx.BAD_REQUEST,`Provider '${t}' does not support System One.`);let v=null;try{let a=i.default.find(a=>a.id===t||a.alias===t),b=new Set([t,a?.id,a?.alias,a?.uiAlias,...a?.aliases||[]].filter(Boolean)),c=(await (0,e.uv)()).find(a=>a&&"systemone"===a.type&&b.has(a.providerAlias)&&a.id===u&&"string"==typeof a.upstreamModelId&&a.upstreamModelId.trim());c&&(v=c.upstreamModelId.trim())}catch{}let w=(0,h.QX)(a,t,u);if(w)return(0,l.yj)(m.gx.BAD_REQUEST,w);b!==`${t}/${u}`?n.info("ROUTING",`${b} → ${t}/${u}`):n.info("ROUTING",`Provider: ${t}, Model: ${u}`);let x=new Set,y=null,z=null;for(;;){let b=await (0,d.c1)(t,x,u,{allowedConnectionIds:await (0,g.pL)(q,t)});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=y||b.lastError||"Unavailable",c=z||Number(b.lastErrorCode)||m.gx.SERVICE_UNAVAILABLE;return n.warn("SYSTEMONE",`[${t}/${u}] ${a} (${b.retryAfterHuman})`),(0,l.wO)(c,`[${t}/${u}] ${a}`,b.retryAfter,b.retryAfterHuman)}if(0===x.size)return n.error("AUTH",`No credentials for provider: ${t}`),(0,l.yj)(m.gx.BAD_REQUEST,`No credentials for provider: ${t}`);return n.warn("SYSTEMONE","No more accounts available",{provider:t}),(0,l.yj)(z||m.gx.SERVICE_UNAVAILABLE,y||"All accounts unavailable")}n.info("AUTH",`\x1b[32mUsing ${t} account: ${b.connectionName}\x1b[0m`);let e=await (0,o.checkAndRefreshToken)(t,b),f=await (0,h.lo)({body:a,modelInfo:{provider:t,model:u,...v?{upstreamModelId:v}:{}},credentials:e,log:n,onRequestSuccess:async()=>{await (0,d.Pt)(b.connectionId,b,u)}});if(f.success)return f.usage&&(0,p.sZ)({provider:t,model:u,connectionId:b.connectionId,apiKey:c,endpoint:j,tokens:{...f.usage,total_tokens:f.usage.prompt_tokens+f.usage.completion_tokens},status:"success"}).catch(()=>{}),f.response;let{shouldFallback:i}=await (0,d.vk)(b.connectionId,f.status,f.error,t,u);if(i){n.warn("AUTH",`Account ${b.connectionName} unavailable (${f.status}), trying fallback`),x.add(b.connectionId),y=f.error,z=f.status;continue}return f.response}}},50711:(a,b,c)=>{c.d(b,{QX:()=>k,lo:()=>l});var d=c(89865),e=c(60290),f=c(39141),g=c(29485),h=c(96643);let i=new Set(["opencode","opencode-zen"]);function j(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function k(a,b,c,d=null){if(!a||void 0===a.state||null===a.state)return"Missing required field: state";let e=b&&c?(0,g.V2)(b,c):null,f=d||e?.payloadShape||(e?"questions":null);return"fields"===f?j(a.fields)?null:"Missing required field: fields":"questions"===f?j(a.questions)?null:"Missing required field: questions":j(a.questions)||j(a.fields)?null:"Missing required field: questions"}async function l({body:a,modelInfo:b,credentials:c,log:j,onRequestSuccess:m}){let n,o,{provider:p,model:q,upstreamModelId:r,payloadShape:s}=b,t=f.B$[p]?.systemoneConfig,u=function(a,b){let c=a?.trim();if(!c)return b?.baseUrl;if(!b?.path)return c;let d=c.replace(/\/+$/,""),e=b.path.replace(/\/+$/,"");if(d.endsWith(e))return d;let f=e.slice(0,e.lastIndexOf("/"));return f&&d.endsWith(f)?d+e.slice(f.length):d+e}(c?.providerSpecificData?.baseUrl,t);if(!u)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${p}' does not support System One.`);if(u.includes("{accountId}")){let a=c?.providerSpecificData?.accountId;if(!a)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${p}' requires accountId in providerSpecificData.`);u=u.replace("{accountId}",a)}u.includes("{model}")&&(u=u.replace(/\{model\}/g,q));let v=k(a,p,q,s);if(v)return(0,d.A1)(e.gx.BAD_REQUEST,v);let w=c?.apiKey||c?.accessToken,x={"Content-Type":"application/json",...w?{Authorization:`Bearer ${w}`}:{},...t.headers||{},...i.has(p)?{"x-opencode-session":(0,h.f6)()}:{}},y="string"==typeof r&&r.trim()?r.trim():null,z={...a,model:y||(0,g.kt)(p,q)||q};j?.debug?.("SYSTEMONE",`${p.toUpperCase()} | ${q}`);try{n=await fetch(u,{method:"POST",headers:x,body:JSON.stringify(z),..."function"==typeof AbortSignal?.timeout?{signal:AbortSignal.timeout(e.pH)}:{}})}catch(b){let a=(0,d.lR)(b,p,q,e.gx.BAD_GATEWAY);return j?.debug?.("SYSTEMONE",`Fetch error: ${a}`),(0,d.A1)(e.gx.BAD_GATEWAY,a)}if(!n.ok){let{statusCode:a,message:b}=await (0,d.zL)(n),c=(0,d.lR)(Error(b),p,q,a);return j?.debug?.("SYSTEMONE",`Provider error: ${c}`),(0,d.A1)(a,c)}try{o=await n.json()}catch{return(0,d.A1)(e.gx.BAD_GATEWAY,`Invalid JSON response from ${p}`)}m&&await m();let A=o?.usage;return{success:!0,usage:A?{prompt_tokens:A.input_tokens||0,completion_tokens:A.output_tokens||0}:null,response:new Response(JSON.stringify(o),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}},52007:(a,b,c)=>{c.d(b,{Az:()=>l,SP:()=>o,T0:()=>k});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(87155);let i=g().join(h.XF,"events.jsonl"),j=g().join(h.XF,"events.jsonl.1");function k(a){try{e().existsSync(h.XF)||e().mkdirSync(h.XF,{recursive:!0});try{e().statSync(i).size>5242880&&e().renameSync(i,j)}catch{}e().appendFile(i,JSON.stringify({ts:Date.now(),...a})+"\n",()=>{})}catch{}}function l({sinceMs:a=null,limit:b=null}={}){let c=[];for(let b of[j,i])try{if(!e().existsSync(b))continue;for(let d of e().readFileSync(b,"utf8").split("\n"))if(d)try{let b=JSON.parse(d);if(a&&b.ts<a)continue;c.push(b)}catch{}}catch{}return c.sort((a,b)=>a.ts-b.ts),b?c.slice(-b):c}function m(){return{requests:0,compressed:0,bypassed:0,errors:0,tokensBeforeEst:0,tokensAfterEst:0,tokensSavedEst:0,savedPct:0,imagesGenerated:0,compressionTimeMs:0,avgCompressionMs:0}}function n(a,b){a.requests++,b.applied?(a.compressed++,a.tokensBeforeEst+=b.tokensBeforeEst||0,a.tokensAfterEst+=b.tokensAfterEst||0,a.tokensSavedEst+=b.tokensSavedEst||0,a.imagesGenerated+=b.imageCount||0,a.compressionTimeMs+=b.durationMs||0):"transform_error"===b.reason||"timeout"===b.reason?a.errors++:a.bypassed++}function o({timelineDays:a=30,recentLimit:b=100}={}){let c=l(),d=Date.now(),e=new Date(new Date(d).setHours(0,0,0,0)).getTime(),f={all:m(),today:m(),yesterday:m(),last7d:m(),last30d:m()},g=new Map;for(let b=a-1;b>=0;b--){let a=new Date(e-864e5*b);g.set(a.toISOString().slice(0,10),{date:a.toISOString().slice(0,10),tokensSavedEst:0,compressed:0,requests:0})}for(let a of c){n(f.all,a),a.ts>=e?n(f.today,a):a.ts>=e-864e5&&n(f.yesterday,a),a.ts>=d-6048e5&&n(f.last7d,a),a.ts>=d-2592e6&&n(f.last30d,a);let b=new Date(a.ts).toISOString().slice(0,10),c=g.get(b);c&&(c.requests++,a.applied&&(c.compressed++,c.tokensSavedEst+=a.tokensSavedEst||0))}for(let a of Object.values(f))a.savedPct=a.tokensBeforeEst>0?+(a.tokensSavedEst/a.tokensBeforeEst*100).toFixed(2):0,a.avgCompressionMs=a.compressed>0?Math.round(a.compressionTimeMs/a.compressed):0;return{windows:f,timeline:[...g.values()],recent:c.slice(-b).reverse()}}},87155:(a,b,c)=>{c.d(b,{CG:()=>q,ED:()=>u,S1:()=>s,XF:()=>j,_g:()=>t,no:()=>r,sW:()=>w});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(79646),i=c(49120);let j=g().join(i.n,"pxpipe"),k="pxpipe-proxy",l=g().join(j,"install.log"),m="win32"===process.platform,n=[...m?[`${process.env.ProgramFiles||""}\\nodejs`,`${process.env.APPDATA||""}\\npm`]:["/usr/local/bin","/opt/homebrew/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],process.env.PATH||""].filter(Boolean).join(g().delimiter),o=null;function p(){return g().join(j,"node_modules",k)}function q(){return g().join(p(),"dist","core","library.js")}function r(){try{let a=(0,h.execSync)(`${m?"where":"which"} npm`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:n}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function s(){try{let a=g().join(p(),"package.json");if(!e().existsSync(a)||!e().existsSync(q()))return{installed:!1,version:null,path:null};let b=JSON.parse(e().readFileSync(a,"utf8"));return{installed:!0,version:b.version||null,path:p()}}catch{return{installed:!1,version:null,path:null}}}function t(){return null!==o}function u(){return o||(o=v().finally(()=>{o=null}))}async function v(){let a=r();if(!a){let a=Error("npm not found on PATH — Node.js/npm is required to install PXPIPE");throw a.code="NPM_NOT_FOUND",a}e().existsSync(j)||e().mkdirSync(j,{recursive:!0});let b=g().join(j,"package.json");e().existsSync(b)||e().writeFileSync(b,JSON.stringify({name:"9router-pxpipe-host",private:!0},null,2));let c=e().openSync(l,"a");e().writeSync(c,`
|
|
2
2
|
[${new Date().toISOString()}] npm install ${k}@latest
|
|
3
|
-
`),await new Promise((b,d)=>{let e=(0,h.spawn)(a,["install",`${k}@latest`,"--no-audit","--no-fund","--omit=dev"],{cwd:j,stdio:["ignore",c,c],windowsHide:!0,env:{...process.env,PATH:n}}),f=setTimeout(()=>{e.kill("SIGKILL"),d(Error("npm install timed out after 5 minutes — see install.log"))},3e5);e.once("error",a=>{clearTimeout(f),d(a)}),e.once("exit",a=>{clearTimeout(f),0===a?b():d(Error(`npm install exited with code ${a} — see install.log`))})}).finally(()=>e().closeSync(c));let d=s();if(!d.installed)throw Error("install finished but package is missing — see install.log");return d}function w(a=200){try{if(!e().existsSync(l))return"";return e().readFileSync(l,"utf8").split(/\r?\n/).filter(Boolean).slice(-a).join("\n")}catch{return""}}},92990:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>C,LT:()=>j,MZ:()=>v,Nl:()=>z,Nu:()=>p,OV:()=>h,RY:()=>I,S6:()=>s,SK:()=>F,Td:()=>A,Tx:()=>q,V1:()=>J,WN:()=>t,Ww:()=>L,YT:()=>n,Z2:()=>K,ZL:()=>m,_0:()=>H,aV:()=>u,cD:()=>o,eD:()=>G,f7:()=>y,hF:()=>k,lB:()=>w,oe:()=>E,qp:()=>B,sA:()=>D,t3:()=>l,w1:()=>x});var d=c(21820),e=c(92675),f=c(39141);function g(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]};({...f.sr.qwen});let k={...f.sr.qoder};({...f.sr["qoderwork-cn"]});let l={...f.sr["qoder-cn"]},m={...f.sr.iflow},n={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let p={...f.sr.github},q={...f.sr.kiro},r=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function s(a){if("string"!=typeof a||!r.test(a))throw Error("Invalid region");return a}let t={...f.sr.cursor,tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"}},u={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},v={...f.sr.kilocode},w={...f.sr.cline},x={...f.sr.clinepass},y={...f.sr.gitlab},z={...f.sr["codebuddy-cn"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={...f.sr["codebuddy-intl"]},D={...f.sr.muse},E={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",callbackPath:"/",timeoutMs:3e5},F={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},G={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},H={...f.sr.glm},I={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},J={...f.sr["frontier-for-all"]},K={clientId:"hermes-cli",portalBaseUrl:"https://portal.nousresearch.com",deviceCodeUrl:"https://portal.nousresearch.com/api/oauth/device/code",tokenUrl:"https://portal.nousresearch.com/api/oauth/token",agentKeyUrl:"https://portal.nousresearch.com/api/oauth/agent-key",inferenceBaseUrl:"https://inference-api.nousresearch.com/v1",scope:"inference:invoke inference:mint_agent_key"},L=3e5},96477:(a,b,c)=>{c.d(b,{P:()=>au}),c(30369);var d=c(23433),e=c(14524),f=c(71600),g=c(7547),h=c(45974),i=c(89718),j=c(40615),k=c(38775),l=c(28093),m=c(3894),n=c(24253),o=c(52007),p=c(89865),q=c(62662),r=c(85703),s=c(48644);let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"],u={SIMPLE:"Direct lookups, greetings, single-file extraction, trivial edits, formatting.",MEDIUM:"Localized bug fixes, writing a function, small refactors within one file/module.",COMPLEX:"Multi-file changes, architecture, integration/design decisions, debugging across a system.",REASONING:"Hard algorithmic/mathematical reasoning, subtle concurrency/correctness proofs, deep analysis."},v=new Map;function w(a,b){if(!Array.isArray(a))return"";let c=a=>a?.role==="user"&&!(a&&"object"==typeof a&&("tool"===a.role||"function_call_output"===a.type||(Array.isArray(a.content)&&a.content.length>0?a.content.every(a=>a?.type==="tool_result"):!!Array.isArray(a.parts)&&a.parts.length>0&&a.parts.every(a=>a?.functionResponse)))),d=a.length-1;for(;d>=0;){if(!c(a[d])){d--;continue}let e=[];for(;d>=0&&c(a[d]);d--){let c=b(a[d]);c&&e.unshift(c)}if(e.length)return e.join("\n")}return""}let x=a=>{let b=(0,s.kU)(a?.content);return"string"==typeof b?b.trim():""},y=a=>Array.isArray(a?.parts)?a.parts.map(a=>"string"==typeof a?.text?a.text.trim():"").filter(Boolean).join("\n"):"";function z(a,b,c,d){let e=""===a||null==a?NaN:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}async function A(a={}){var b,c;let d,e,f,{body:g,evaluateSystemone:h,classifierModel:i="oc/jev-1.13-free",log:j={info(){},warn(){},debug(){}},criteria:k=u,instructions:l="Classify the coding task by the least-capable model tier that can complete it well.",breakerEnabled:m=!0,now:n=()=>Date.now(),onSkip:o}=a,p=z(a.timeoutMs,5e3,1,3e4),q=z(a.minConfidence,.5,0,1),r=(a,b)=>(o?.(a,b),null),s=n();if("function"!=typeof h)return j.debug?.("JEV","no System One evaluator — skipping classifier (fail-open)"),r("no-evaluator","no System One evaluator");let B=function(a,b=4e3){return a&&"object"==typeof a?(w(a.messages,x)||w(a.input,x)||w(a.contents||a.request?.contents,y)).slice(0,b):""}(g);if(!B)return j.debug?.("JEV","empty state — skipping classifier (fail-open)"),r("empty-state","no user text found in request");if(m&&(f=v.get(i))&&(s<f.openUntil||f.halfOpen||(f.halfOpen=!0,0)))return j.debug?.("JEV",`circuit breaker open for ${i} — skipping classifier`),r("breaker-open",`${i} paused after a recent failure (cooldown 30000ms)`);try{let a=await (b={state:B,questions:{tier:{type:"choice",instructions:l,criteria:k}}},new Promise(a=>{let c=setTimeout(()=>a({__timeout:!0}),p);Promise.resolve(h(b,i)).then(b=>{clearTimeout(c),a({value:b})}).catch(b=>{clearTimeout(c),a({error:b})})}));if(a?.__timeout)return m&&(c=n(),v.set(i,{openUntil:c+3e4,halfOpen:!1})),j.warn?.("JEV",`${i} classifier timed out — fail-open`),r("timeout",`${i} no answer within ${p}ms`);if(a?.error){let b=a.error?.message||String(a.error);return j.warn?.("JEV",`${i} classifier error — fail-open: ${b}`),r("error",b)}d=a?.value}catch(b){let a=b?.message||String(b);return j.warn?.("JEV",`${i} classifier error — fail-open: ${a}`),r("error",a)}if(!d?.ok)return j.warn?.("JEV",`${i} classifier HTTP ${d?.status} — fail-open`),r("http",`${i} returned HTTP ${d?.status}`);try{e=await d.json()}catch(b){let a=b?.message||String(b);return j.warn?.("JEV",`${i} returned invalid JSON — fail-open: ${a}`),r("invalid-json",a)}let C=e?.answers?.tier,D=C?.choice,E="number"==typeof C?.confidence?C.confidence:null,F=C?.probabilities&&"object"==typeof C.probabilities?C.probabilities:null;if(!D||!t.includes(D))return j.warn?.("JEV",`${i} returned unknown tier "${D}" — fail-open`),r("unknown-tier",`${i} returned tier "${D}"`);if(null==E||E<q)return j.info?.("JEV",`${i} low confidence (${E}) for ${D} — keeping order`),r("low-confidence",`${D} confidence ${null==E?"missing":E.toFixed(3)} < min ${q}`);m&&v.delete(i);let G=n()-s;return j.info?.("JEV",`${i} tier=${D} conf=${E.toFixed(3)} in ${G}ms`),{tier:D,confidence:E,probabilities:F,model:e?.model||i,usage:e?.usage||null,source:"systemone"}}var B=c(46984),C=c(62320),D=c(11847);let E=["vision","pdf","audioInput","videoInput"],F=new Set(E),G="oc/mimo-v2.6-flash-free",H=a=>"oc/mimo-v2.5-free"===a?G:a;function I(a,b){var c;let d=Array.isArray(c=b?.capacityAdapter?.[a])?{enabled:!0,roundRobin:!1,models:c.map(a=>H(a?.model||a)).filter(Boolean)}:c&&"object"==typeof c?{enabled:!1!==c.enabled,roundRobin:!!c.roundRobin,models:Array.isArray(c.models)?c.models.map(H).filter(Boolean):[]}:{enabled:!1,roundRobin:!1,models:[]};return d.enabled&&0===d.models.length?{...d,models:[G]}:d}function J(a,b){let c=a.indexOf("/"),d=c>0?a.slice(0,c):"",e=c>0?a.slice(c+1):a,f=(0,D.getCapabilitiesForModel)(d,e);return b.every(a=>!0===f[a])}function K(a,b,c){let d=[...b||[]].filter(a=>F.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>J(a,d)))return a;let e=(function(a,b=null){let c=b?new Set([...b].filter(a=>F.has(a))):null,d=new Set,e=[];for(let b of E){if(c&&!c.has(b))continue;let{enabled:f,models:g}=I(b,a);if(f)for(let a of g)d.has(a)||(d.add(a),e.push(a))}return e})(c,d).filter(b=>!a.includes(b)&&J(b,d));return 0===e.length?a:[...e,...a]}function L(a){return"string"==typeof a?a.length:Array.isArray(a)?a.reduce((a,b)=>a+("string"==typeof b?.text?b.text.length:50),0):0}function M(a,b){let c=new Set(b);return 0===c.size?a:(b,d,...e)=>{if(c.has(d)){let a=d.indexOf("/"),c=a>0?d.slice(0,a):"",e=a>0?d.slice(a+1):d,{contextWindow:f}=(0,D.getCapabilitiesForModel)(c,e);b=function(a,b){let c=Array.isArray(a.messages)?"messages":Array.isArray(a.input)?"input":Array.isArray(a.contents)?"contents":null;if(!c)return a;let d=a[c];if(!d||0===d.length)return a;let e=a=>"system"===a||"developer"===a,f=d.filter(a=>e(a?.role)),g=d.filter(a=>!e(a?.role));if(0===g.length)return a;let h=a=>"assistant"===a||"model"===a,i=g.length-1;for(;i>=0&&!h(g[i]?.role);)i--;let j=g.slice(i+1),k=g.slice(0,i+1);if(0===k.length)return a;let l=a=>a.content??a.parts,m=.8*(b||2e5)*4,n=k.slice(0,6),o=f.concat(n,j).reduce((a,b)=>a+L(l(b)),0);for(;o>m&&n.length>0;)o-=L(l(n.pop()));return n.length===k.length?a:{...a,[c]:[...f,...n,...j]}}(b,f)}return a(b,d,...e)}}var N=c(2735),O=c(60290),P=c(87252),Q=c(19956),R=c(94454),S=c(7803),T=c(67828),U=c(15186),V=c(58362);let W=/\[1m\]$/i;var X=c(27811);let Y=Object.freeze({hardThreshold:6,longContextChars:24e3,largeToolResultChars:12e3}),Z=["audit","review","investigate","analyze","analyse","assess","diagnose","debug","refactor","redesign","restructure","harden","optimize","optimise","benchmark","profile","trace","reproduce","resolve","rewrite","overhaul","plan","implement","survey"],$=new Set(Z.filter(a=>!["plan","implement","resolve"].includes(a))),_=new Set(["can","could","would","will","please","kindly","you","help","me","with","to","i","we","need","want","like","fully","deeply","thoroughly"]),aa=[{reason:"audit",terms:["fully audit","deep review","deep repository audit"]},{reason:"architecture",terms:["design the architecture","design architecture","repository restructure","rollback procedures","repository-wide","multi-file","cross-component","cross component"]},{reason:"concurrency",terms:["race condition","concurrency","stale-write","stale write"]},{reason:"root-cause",terms:["root cause","debug intermittent","intermittent failing tests","failing tests with unclear cause","failures with unclear causes","unclear failure"]},{reason:"performance",terms:["performance investigation"]}],ab=[{reason:"architecture",terms:["architecture","migration","migrate","rollback"]},{reason:"security",terms:["security","authentication","permissions"]}],ac=new Set([...aa,...ab].flatMap(a=>a.terms).map(a=>a.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean).join(" "))),ad=["text","content","input_text","output_text","arguments","output"],ae=["text","content","input_text"],af=["content","parts","input"],ag=new Set(["image_url","input_image","input_file","file","document","input_audio","input_video"]);function ah(a,b){if(!a||"object"!=typeof a)return;let c=Object.getOwnPropertyDescriptor(a,b);return c&&"value"in c?c.value:void 0}function ai(a){return"tool"===ah(a,"role")||"tool_result"===ah(a,"type")||"function_call_output"===ah(a,"type")}function aj(a,b,c={}){return{level:"hard",score:b.hardThreshold,escalationScore:b.hardThreshold,reasons:[a],metadata:c}}class ak extends Error{constructor(a){super(a),this.name="AutoRouterConfigurationError"}}function al(a,b,c={}){if(b===a)throw new ak(`Auto Router target "${b}" cannot reference its own combo.`);if(c?.[b]?.fallbackStrategy==="auto")throw new ak(`Auto Router target "${b}" is configured with fallbackStrategy "auto"; Auto Router chaining is not supported.`)}var am=c(91576),an=c(50711),ao=c(29952);async function ap({body:a,models:b,routerModel:c=ao.UH,log:e,timeoutMs:f=ao.rc}){if(!Array.isArray(b)||b.length<=1)return null;let g="string"==typeof c&&c.trim()?c.trim():ao.UH,h=(0,ao.nn)(a);if(!h)return e?.debug?.("COMBO","smart-router: empty prompt state, skipping classification"),null;let i=(0,ao.JE)(b);if(0===Object.keys(i).length)return null;try{let a,b,c=await (0,k.mA)(g);if(!c?.provider)return e?.warn?.("COMBO",`smart-router: unrecognized router model "${g}"`),null;let{provider:j,model:l}=c,m=await (0,d.c1)(j,new Set,l);if(!m||m.allRateLimited)return e?.warn?.("COMBO",`smart-router: no credentials available for router provider "${j}"`),null;let n=await (0,T.checkAndRefreshToken)(j,m),o=new Promise((b,c)=>{a=setTimeout(()=>c(Error(`System One router timed out after ${f}ms`)),f)}),p=(0,an.l)({body:{model:l,state:h,questions:{route:{type:"choice",instructions:"Which of these configured models is the most appropriate for this request?",criteria:i}}},modelInfo:{provider:j,model:l},credentials:n,log:e,onRequestSuccess:()=>{}});try{b=await Promise.race([p,o])}finally{clearTimeout(a)}if(!b?.success||!b.response)return e?.warn?.("COMBO",`smart-router: evaluation failed (${b?.status||"error"})`),null;let q=await b.response.json(),r=(0,ao.Kn)(q);if(!r||!r.choice)return e?.warn?.("COMBO","smart-router: response missing valid route choice"),null;return r}catch(a){return e?.warn?.("COMBO",`smart-router: evaluation aborted (${a?.message||String(a)})`),null}}var aq=c(10858);async function ar({body:a,comboName:b,models:c,settings:d,autoRouterPath:e=new Set,handleSelectedTarget:f}){let g;try{if(e.size>0)throw new ak(`Auto Router chaining is not supported (encountered "${b}").`);g=function({body:a,comboName:b,models:c,comboStrategies:d={},classifier:e=function(a,b=Y){let c={...Y,...b};try{if(!a||"object"!=typeof a||Array.isArray(a))return aj("invalid-request",c);let b=function(a){let b={chars:0,systemChars:0,messageCount:0,systemMessages:0,itemCount:0,userContextItems:0,toolCalls:0,toolResults:0,toolResultChars:0,modalities:0,userTexts:[]};if(!a||"object"!=typeof a||Array.isArray(a))return b;for(let{items:c,stringInput:d}of function(a){let b,c=(b=ah(a,"request"))&&"object"==typeof b&&!Array.isArray(b)?b:a,d=ah(c,"messages");if(Array.isArray(d)&&d.length)return[{items:d,stringInput:!1}];let e=ah(c,"input");if(Array.isArray(e)&&e.length)return[{items:e,stringInput:!1}];if("string"==typeof e&&e.trim())return[{items:[e],stringInput:!0}];let f=ah(c,"contents");return Array.isArray(f)&&f.length?[{items:f,stringInput:!1}]:[]}(a))for(let a of c){if(b.itemCount+=1,d){b.messageCount+=1,b.chars+=a.length,b.userTexts.push(a),b.userContextItems+=1;continue}let c=ah(a,"role"),e=function a(b,c,d=new Set,e=!1){if("string"==typeof b)return e&&(c.toolResultChars+=b.length),b.length;if(!b||"object"!=typeof b||d.has(b))return 0;d.add(b);let f=e||ai(b);if(Array.isArray(b))return b.reduce((b,e)=>b+a(e,c,d,f),0);let g=0;for(let a of ad){let d=ah(b,a);"string"==typeof d&&(g+=d.length,(f||"output"===a)&&(c.toolResultChars+=d.length))}for(let e of af){let h=ah(b,e);Array.isArray(h)&&(g+=a(h,c,d,f))}return g}(a,b);"system"===c||"developer"===c?(b.systemMessages+=1,b.systemChars+=e):(b.messageCount+=1,b.chars+=e),function(a,b){let c=ah(a,"role"),d=ah(a,"type");!function a(b,c,d=new Set){if(!b||"object"!=typeof b||d.has(b))return;if(d.add(b),Array.isArray(b)){for(let e of b)a(e,c,d);return}let e=ah(b,"type"),f=ah(b,"tool_calls");for(let g of(ai(b)&&(c.toolResults+=1),Array.isArray(f)?c.toolCalls+=f.length:("function_call"===e||"tool_use"===e||"assistant"===ah(b,"role")&&ah(b,"function_call"))&&(c.toolCalls+=1),af))a(ah(b,g),c,d)}(a,b);let e=function a(b,c=new Set){return!(!b||"object"!=typeof b||c.has(b))&&((c.add(b),Array.isArray(b))?b.some(b=>a(b,c)):!!(ag.has(ah(b,"type"))||[...ag].some(a=>void 0!==ah(b,a)))||af.some(d=>{let e=ah(b,d);return Array.isArray(e)&&a(e,c)}))}(a);if(e&&(b.modalities+=1),"user"===c||"input_text"===d){let c=function a(b,c=new Set){if("string"==typeof b)return b;if(!b||"object"!=typeof b||c.has(b))return"";if(c.add(b),Array.isArray(b))return b.map(b=>a(b,c)).join(" ");let d="";for(let a of ae){let c=ah(b,a);"string"==typeof c&&(d+=` ${c}`)}for(let e of af){let f=ah(b,e);Array.isArray(f)&&(d+=` ${a(f,c)}`)}return d.trim()}(ah(a,"content")??ah(a,"parts")??ah(a,"input")??a);b.userTexts.push(c),(c||e)&&(b.userContextItems+=1)}}(a,b)}return b}(a),d={chars:b.chars,systemChars:b.systemChars,messages:b.messageCount,systemMessages:b.systemMessages,toolCalls:b.toolCalls,toolResults:b.toolResults,toolResultChars:b.toolResultChars,modalities:b.modalities};if(0===b.itemCount)return aj("empty-request",c,d);if(!(b.userContextItems>0))return aj("contextless-request",c,d);let e=0,f=[],g=(a,b)=>{e+=a,f.push(b)};b.chars>=c.longContextChars?g(4,"large-context"):b.chars>=Math.floor(c.longContextChars/3)&&g(2,"medium-context"),b.messageCount>=16?g(3,"long-history"):b.messageCount>=8&&g(1,"multi-turn-history"),b.toolCalls+b.toolResults>=8?g(3,"substantial-tool-history"):b.toolCalls+b.toolResults>=3&&g(2,"repeated-tool-history"),b.toolResultChars>=c.largeToolResultChars?g(4,"large-tool-result-history"):b.toolResultChars>=Math.floor(c.largeToolResultChars/3)&&g(2,"medium-tool-result-history"),b.modalities>=3?g(2,"multiple-modalities"):b.modalities>0&&g(1,"modality-present");let h=(a,b=1)=>{let c,d,e,f,h,i=(c=function(a){let b=[],c="",d=null,e=!1,f=!1,g=()=>{!function(a,b,c){let d=b.toLocaleLowerCase().replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu,"");if(!d)return;if(/[._/\\]/u.test(d)||/\p{Ll}\p{M}*\p{Lu}/u.test(d))return a.push({value:d,quoted:c});let e=d.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean);if(/[^\p{L}\p{N}\p{M}\s]/u.test(d)&&e.length>1&&!ac.has(e.join(" ")))return a.push({value:d,quoted:c});for(let b of e)a.push({value:b,quoted:c})}(b,c,f),c=""};for(let b of a)d?e?(c+=b,e=!1):"\\"===b?e=!0:b===d?(g(),d=null,f=!1):c+=b:'"'===b||"`"===b||"'"===b?(g(),d=b,f=!0):/\s/u.test(b)?g():c+=b;return g(),b}(a),d=function(a){for(let b of a)if(!(b.quoted||_.has(b.value)))return b.value;return null}(c),e=Z.includes(d),f=$.has(d),{strong:(h=(a,b=!1)=>a.filter(a=>a.terms.some(a=>(function(a,b,c=!1){let d=b.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean);return a.some((b,e)=>d.every((b,d)=>a[e+d]?.value===b&&(c||!a[e+d].quoted)))})(c,a,b))).map(a=>a.reason))(aa),complexAction:f,gated:e?h(ab,!0):[]});for(let a of i.strong)g(6*b,a);for(let a of(i.complexAction&&0===i.strong.length&&g(6*b,"complex-action"),i.gated))g(6*b,a)};h(b.userTexts.at(-1)||"");let i=0,j=Math.min(4,Math.max(0,c.hardThreshold-1));for(let a of b.userTexts.slice(0,-1)){let b=e;h(a,1/3);let c=e-b;if(i+c>j&&(e-=i+c-j),(i=Math.min(j,i+c))===j)break}let k=Math.min(e,c.hardThreshold+1);return{level:k>=c.hardThreshold?"hard":"easy",score:k,escalationScore:e,reasons:[...new Set(f)],metadata:d}}catch{return aj("classifier-error",c)}}}){let f,g=function(a){if(!Array.isArray(a)||0===a.length)throw new ak("Auto Router requires one or more usable ordered targets.");let b=a.map(a=>"string"==typeof a&&a.trim()===a&&a?a:null);if(b.some(a=>!a)||new Set(b).size!==b.length)throw new ak("Auto Router requires distinct non-empty ordered targets.");return b}(c);for(let a of g)al(b,a,d);let h=()=>({score:Y.hardThreshold,escalationScore:Y.hardThreshold,reasons:["classifier-error"],metadata:{}});try{f=e(a)}catch{f=h()}f&&"object"==typeof f&&Array.isArray(f.reasons)&&Number.isFinite(f.escalationScore)&&Number.isFinite(f.score)||(f=h());let i=new Set(["invalid-request","empty-request","contextless-request","classifier-error"]),j=Array.isArray(f.reasons)&&f.reasons.some(a=>i.has(a))?g.length-1:function({escalationScore:a,candidateCount:b,hardThreshold:c=Y.hardThreshold}){if(!Number.isSafeInteger(b)||b<1)throw new ak("Auto Router requires one or more usable ordered targets.");if(!Number.isFinite(c)||c<=0)throw new ak("Auto Router has an invalid hard threshold.");if(1===b)return 0;if(!Number.isFinite(a))return b-1;let d=Math.max(0,a);return 2===b?+(d>=c):Math.min(b-1,Math.floor(d/c))}({escalationScore:f.escalationScore,candidateCount:g.length,hardThreshold:Y.hardThreshold}),k=g[j];if(!k)throw new ak("Auto Router selected a missing target.");return al(b,k,d),{target:k,index:j,candidates:g,classification:f}}({body:a,comboName:b,models:c,comboStrategies:d.comboStrategies||{}})}catch(a){if(!(a instanceof ak))throw a;return S.warn("AUTO-ROUTER",`combo=${b} selection failed: ${a.message}`),(0,p.yj)(O.gx.BAD_REQUEST,`Auto Router configuration error: ${a.message}`)}let{target:h,classification:i,index:j,candidates:l}=g,m=await (0,k.d_)(h);if(m&&d.comboStrategies?.[h]?.fallbackStrategy==="auto"){let a=`Auto Router target "${h}" is configured as an Auto Router combo; Auto Router chaining is not supported.`;return S.warn("AUTO-ROUTER",`combo=${b} selection failed: ${a}`),(0,p.yj)(O.gx.BAD_REQUEST,`Auto Router configuration error: ${a}`)}return S.info("AUTO-ROUTER",`combo=${b} rank=${j+1}/${l.length} score=${i.score} target=${h} reasons=${i.reasons.join(",")||"none"}`),S.debug("AUTO-ROUTER",`combo=${b} structural metadata`,i.metadata),f(h,m)}async function as({body:a,modelStr:b,clientRawRequest:c,request:d,apiKey:e,settings:f,keyAccess:g,requiredCapabilities:h,translationCache:i=null,requestedModel:j=null,autoRouterPath:k=new Set}){let l=await (0,X.Ge)(g,K([b],h,f),[b]);if(l.length>1){let g=l.filter(a=>a!==b);return S.info("CHAT",`Capacity adapter for [${[...h].join(",")}] on "${b}" → trying ${l.join(", ")}`),(0,r.Pr)({body:a,models:l,handleSingleModel:M((a,b)=>av(a,b,c,d,e,i,null,k),g),log:S,comboName:b,comboStrategy:function(a,b){for(let c of[...a||[]].filter(a=>F.has(a))){let{enabled:a,models:d}=I(c,b);if(a&&0!==d.length)return function(a,b){let{enabled:c,roundRobin:d}=I(a,b);return c&&d?"round-robin":"fallback"}(c,b)}return"fallback"}(h,f)})}return av(a,b,c,d,e,i,j,k)}function at(a,b,c=null){let d=c?.policy||{},e=a.comboStrategies?.[b]||{},f=d.strategy||e.fallbackStrategy;return"auto"===f?{comboStrategy:"auto",isAutoRouter:!0}:{comboStrategy:f||("auto"===a.comboStrategy?"fallback":a.comboStrategy)||"fallback",isAutoRouter:!1}}async function au(a,b=null,f=null){let g;try{g=await (0,aq.Y)(a)}catch{return S.warn("CHAT","Invalid JSON body"),(0,p.yj)(O.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:g,headers:Object.fromEntries(a.headers.entries())}),(0,e.n)(b.headers),b?.headers&&(b={...b,headers:Object.fromEntries(Object.entries(b.headers).filter(([a])=>!["x-9router-ha-proof","x-ez-ha-proof"].includes(a.toLowerCase())))});let{model:h,contextMarker:j}=function(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(W);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}(g.model);j&&(g.model=h);let l=(0,am.bS)({headers:b?.headers,body:g}),m=l?.sessionId||null,{apiKey:n,valid:o}=await (0,d.$A)(a);n?S.debug("AUTH",`API Key: ${S.maskKey(n)}${o?"":" (not recognized)"}`):S.debug("AUTH","No API key provided (local mode)");let q=await (0,i.mt)();if(q.requireApiKey){if(!n)return S.warn("AUTH","Missing API key (requireApiKey=true)"),(0,p.Il)(b.endpoint,"Missing API key");if(!o)return S.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,p.Il)(b.endpoint,"Invalid API key")}if(!h)return S.warn("CHAT","Missing model"),(0,p.yj)(O.gx.BAD_REQUEST,"Missing model");let s=await (0,X.TM)(a),t=await (0,X.cI)(s,h);if(t)return t;if(process.env.NINEROUTER_HA_CONFIG){let{forwardedTarget:d}=await Promise.all([c.e(4058),c.e(1745)]).then(c.bind(c,51745));try{let c=await d(a,g);if(c)return av(g,c,b,a,n,h)}catch{return(0,p.yj)(O.gx.FORBIDDEN,"Forwarded target is not authorized")}}let u=a?.headers?.get("user-agent")||"",v=(0,N.c)(g,h,u,!!q.ccFilterNaming);if(v)return v.response||v;f||(f=new Map);let w=(0,r.t8)(g),x=await (0,k.pe)(h);if(x&&x.models.length>0){let c=x.models,d=q.comboStrategies||{},{comboStrategy:e,isAutoRouter:i}=at(q,h,x);if(i)return ar({body:g,comboName:h,models:c,settings:q,handleSelectedTarget:(c,d)=>d?av(g,c,b,a,n,f,null,new Set([h])):as({body:g,modelStr:c,clientRawRequest:b,request:a,apiKey:n,settings:q,keyAccess:s,requiredCapabilities:w,translationCache:f,autoRouterPath:new Set([h])})});let j=x.policy||{},l=d[h]||{},o={...j,strategy:e,sticky:j.sticky??q.comboStickyRoundRobinLimit??1},p=x.members||c.map(a=>({id:a,weight:1})),t=await (0,X.Ge)(s,K(c,w,q),c),u=t.filter(a=>!c.includes(a)),v="weighted"===e?K(p.map(a=>a.id),w,q).map(a=>p.find(b=>b.id===a)||{id:a,weight:1}):null;if("fusion"===e){let d=x.fusion||l;return S.info("CHAT",`Combo "${h}" with ${c.length} models (strategy: fusion)`),(0,r.vt)({body:g,models:c,handleSingleModel:(c,d,e)=>{let g=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};g={...b,body:d}}return av(c,d,g,a,n,f)},log:S,comboName:h,judgeModel:d?.judgeModel||x.fusion?.judge,tuning:d?.fusionTuning||d?.tuning||x.fusion?.tuning})}let y=o.sticky??q.comboStickyRoundRobinLimit,z=d[h]||{},D=e;if("smart"===e){let b=z.smartTiers;if(b){let c=z.smartClassifierModel,d=null,e=await A({body:g,log:S,classifierModel:c||void 0,criteria:z.smartCriteria,instructions:z.smartInstructions,minConfidence:z.smartMinConfidence,timeoutMs:z.smartTimeoutMs,onSkip:(a,b)=>{d={reason:a,message:b}},evaluateSystemone:(b,c)=>{let d=new Headers({"Content-Type":"application/json"}),e=a.headers.get("Authorization")||(a.headers.get("x-api-key")?`Bearer ${a.headers.get("x-api-key")}`:null);return e&&d.set("Authorization",e),(0,B.o)(new Request(new URL("/api/v1/systemone",a.url),{method:"POST",headers:d,body:JSON.stringify({...b,model:c})}))}});if(e){let a=(0,r.NS)(t,e.tier,b);a[0]!==t[0]&&S.info("CHAT",`Combo "${h}" smart-routing tier=${e.tier} → ${a[0]}`),t=a}else S.info("CHAT",`Combo "${h}" smart-routing skipped (${d?.reason||"unknown"}: ${d?.message||"no detail"}) — using default order`);D="fallback"}}return S.info("CHAT",`Combo "${h}" with ${t.length} models (strategy: ${e}${D!==e?`→${D}`:""}, sticky: ${y})`),(0,r.Pr)({body:g,models:t,members:v||p,policy:o,handleSingleModel:M((c,d)=>av(c,d,b,a,n,f),u),log:S,comboName:h,comboStrategy:D,comboStickyLimit:y,sessionId:m,smartPolicy:z.smartPolicy||"smart",sessionSticky:!1!==z.sessionSticky,confidenceThreshold:"number"==typeof z.confidenceThreshold?z.confidenceThreshold:.8,resolveSmartChoice:"smart"===D?(a,b)=>ap({body:a,models:b,routerModel:z.routerModel,log:S}):null,resolveModel:k.mA,speedMode:(0,C.BW)(g,b?.headers)})}return as({body:g,modelStr:h,clientRawRequest:b,request:a,apiKey:n,settings:q,keyAccess:s,requiredCapabilities:w,translationCache:f,requestedModel:j?`${h.slice(h.indexOf("/")+1)}[${j}]`:null})}async function av(a,b,e=null,s=null,t=null,u=null,v=null,w=new Set){let x=await (0,k.mA)(b);if(!x.provider){let c=await (0,k.pe)(b);if(c&&c.models.length>0){let d=c.models,f=await (0,i.mt)(),g=f.comboStrategies||{},{comboStrategy:h,isAutoRouter:j}=at(f,b,c);if(j)return ar({body:a,comboName:b,models:d,settings:f,autoRouterPath:w,handleSelectedTarget:async(c,d)=>d?av(a,c,e,s,t,u,null,new Set([...w,b])):as({body:a,modelStr:c,clientRawRequest:e,request:s,apiKey:t,settings:f,keyAccess:await (0,X.TM)(s),requiredCapabilities:(0,r.t8)(a),translationCache:u,autoRouterPath:new Set([...w,b])})});let l=c.policy||{},m=g[b]||{},n={...l,strategy:h,sticky:l.sticky??f.comboStickyRoundRobinLimit??1},o=c.members||d.map(a=>({id:a,weight:1})),p=(0,r.t8)(a),q=await (0,X.TM)(s),v=await (0,X.Ge)(q,K(d,p,f),d),x=v.filter(a=>!d.includes(a)),y="weighted"===h?K(o.map(a=>a.id),p,f).map(a=>o.find(b=>b.id===a)||{id:a,weight:1}):null;if("fusion"===h){let f=c.fusion||m;return S.info("CHAT",`Combo "${b}" with ${d.length} models (strategy: fusion)`),(0,r.vt)({body:a,models:d,handleSingleModel:(a,b,c)=>{let d=e;if(c&&e){let{tools:a,tool_choice:b,...c}=e.body||{};d={...e,body:c}}return av(a,b,d,s,t,u,null,w)},log:S,comboName:b,judgeModel:f?.judgeModel||c.fusion?.judge,tuning:f?.fusionTuning||f?.tuning||c.fusion?.tuning})}let z=n.sticky??f.comboStickyRoundRobinLimit,A=(0,am.bS)({headers:e?.headers,body:a}),B=A?.sessionId||null;return S.info("CHAT",`Combo "${b}" with ${v.length} models (strategy: ${h}, sticky: ${z})`),(0,r.Pr)({body:a,models:v,members:y||o,policy:n,handleSingleModel:M((a,b)=>av(a,b,e,s,t,u,null,w),x),log:S,comboName:b,comboStrategy:h,comboStickyLimit:z,sessionId:B,smartPolicy:c.smartPolicy||"smart",sessionSticky:!1!==c.sessionSticky,confidenceThreshold:"number"==typeof c.confidenceThreshold?c.confidenceThreshold:.8,resolveSmartChoice:"smart"===h?(a,b)=>ap({body:a,models:b,routerModel:c.routerModel,log:S}):null,resolveModel:k.mA,speedMode:(0,C.BW)(a,e?.headers)})}return S.warn("CHAT","Invalid model format",{model:b}),(0,p.yj)(O.gx.BAD_REQUEST,"Invalid model format")}let{provider:y,model:z}=x;try{let a=await (0,g.jw)(y);if(Array.isArray(a)&&a.includes(z))return S.warn("CHAT",`Model "${z}" is disabled for provider "${y}"`),(0,p.yj)(O.gx.NOT_FOUND,`Model "${z}" is disabled`)}catch{}let A=s?.headers?.get("user-agent")||"",B=s?.headers?.get("x-connection-id")||s?.headers?.get("x-ez-connection-id")||s?.headers?.get("x-9r-connection-id")||null,D=await (0,i.mt)(),E=(D.providerThinking||{})[y]||null,F="antigravity"===y?(0,h.mv)(z,(0,R.S_)(a,E)):z,G=new Set,H=new Set,I=null,J=null,L=null,N=await (0,X.pL)(s,y),W=(0,f.G)(a);for(;;){let f,g=await (0,d.c1)(y,G,z,{preferredConnectionId:B,cacheKey:W,requestedModel:v||z,quotaModel:F,excludeProxyPoolIds:H,allowedConnectionIds:N});if(!g||g.allRateLimited){if((process.env.EZROUTER_HA_CONFIG||process.env.NINEROUTER_HA_CONFIG)&&s&&0===G.size){let{maybeForwardChat:d}=await Promise.all([c.e(4058),c.e(1745)]).then(c.bind(c,51745)),f=v||e?.body?.model||a.model,g=await d(s,{...a,model:f},b,!0);if(g)return g}if(g?.allRateLimited){let a=I||g.lastError||"Unavailable",b=[J,g.lastErrorCode].map(a=>"number"==typeof a||"string"==typeof a?Number(a):null).find(a=>Number.isInteger(a)&&a>=400&&a<=599),c=(0,p.fP)(b,a);return S.warn("CHAT",`[${y}/${z}] ${c} | ${a} (${g.retryAfterHuman})`),(0,p.wO)(c,`[${y}/${z}] ${a}`,g.retryAfter,g.retryAfterHuman,L)}if(0===G.size){if((0,j.YI)(y))return S.warn("AUTH",`No active credentials for provider: ${y}${N?" (API key pinned to specific accounts)":""}`),(0,p.yj)(O.gx.NOT_FOUND,N?`No active credentials for provider: ${y} among the accounts this API key is pinned to`:`No active credentials for provider: ${y}. Connect an account for this provider in the dashboard.`,{code:"provider_not_configured"});return S.warn("AUTH",`Unknown provider: ${y}`),(0,p.yj)(O.gx.NOT_FOUND,`Unknown provider "${y}" in model "${y}/${z}". See /v1/models for what this router serves.`)}return S.warn("CHAT","No more accounts available",{provider:y}),(0,p.yj)((0,p.Yg)(J,I),I||"All accounts unavailable",null,L)}let i=await (0,T.checkAndRefreshToken)(y,g);if(("antigravity"===y||"gemini-cli"===y)&&!i.projectId){let a=await (0,U.eG)(g.connectionId,i.accessToken,y);a&&(i.projectId=a,(0,T.vN)(g.connectionId,{projectId:a}).catch(()=>{}))}try{f=await (0,l.wk)({translationCache:u,body:{...structuredClone(a),model:`${y}/${z}`},modelInfo:{provider:y,model:z},credentials:{...i,rawHeaders:e?.headers},log:S,clientRawRequest:e,connectionId:g.connectionId,userAgent:A,apiKey:t,ccFilterNaming:!!D.ccFilterNaming,rtkEnabled:!!D.rtkEnabled,headroomEnabled:!!D.headroomEnabled,headroomUrl:D.headroomUrl||m.ag,headroomCompressUserMessages:!!D.headroomCompressUserMessages,headroomTimeoutMs:D.headroomTimeoutMs,cavemanEnabled:!!D.cavemanEnabled,cavemanLevel:D.cavemanLevel||"full",ponytailEnabled:!!D.ponytailEnabled,ponytailLevel:D.ponytailLevel||"full",customPromptEnabled:!!D.customPromptEnabled||!!D.customSystemPromptEnabled,customPrompt:D.customPrompt||D.customSystemPrompt||"",toolRankEnabled:!!D.toolRankEnabled,pxpipeEnabled:!!D.pxpipeEnabled,pxpipeMinChars:D.pxpipeMinChars,pxpipeTimeoutMs:D.pxpipeTimeoutMs,pxpipeTransform:D.pxpipeEnabled?await (0,n.RG)():null,onPxpipeEvent:o.T0,toolHistoryPruning:D.toolHistoryPruning||{enabled:!1},providerThinking:E,providerOverrides:(D.providerOverrides||{})[y]||null,toolDisclosure:D.toolDisclosureEnabled||D.toolDisclosureFilterEnabled?{disclosureEnabled:!!D.toolDisclosureEnabled,filterEnabled:!!D.toolDisclosureFilterEnabled,maxTools:D.toolDisclosureMaxTools??20}:null,sourceFormatOverride:s?.url?(0,Q.t)(new URL(s.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,T.vN)(g.connectionId,{...a,existingProviderSpecificData:g.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,d.Pt)(g.connectionId,g,F,y),(0,h.vO)(g.connectionId,F)},onEmptyStream:async()=>{await (0,d.vk)(g.connectionId,O.gx.BAD_GATEWAY,`Empty streaming response from ${y}/${z}`,y,F,Date.now()+P.Dp)}})}catch(a){S.error?.("CHAT",`[${y}/${z}] handleChatCore uncaught exception: ${a?.message||a}`),f=(0,p.A1)(O.gx.INTERNAL_SERVER_ERROR,`Chat execution failed: ${a?.message||"Internal error"}`)}if(f instanceof Response||f&&!f.isError&&(f.ok||f.status===O.gx.OK||!f.status)){let a=f instanceof Response?f:f.response||f;return(0,V.xL)({requestedModel:v||b,resolvedModel:`${y}/${z}`},a)}let k=f?.status||O.gx.INTERNAL_SERVER_ERROR,r=f?.error||"Upstream request failed",w="noauth"===g.connectionId?g.providerSpecificData?.connectionProxyPoolId:null,x=null,C=f?.resetsAtMs;if("antigravity"===y&&(409===k||429===k)&&(x=await (0,h.XJ)(g.connectionId,k,F,i.accessToken,g.providerSpecificData,r))&&(C=x),"antigravity"===y&&x||(await (0,d.vk)(g.connectionId,k,r,y,F,C,w)).shouldFallback){S.warn("FALLBACK",`⇄ ACC:${g.connectionName} UNAVAILABLE (${k}) → NEXT ACCOUNT`),G.add(g.connectionId),w&&H.add(w),I=r,J=k,L=(0,q.d)(f?.response?.headers);continue}let K=f instanceof Response?f:f?.response||(0,p.yj)(k,r);return(0,V.xL)({requestedModel:v||b,resolvedModel:`${y}/${z}`},K)}}}};
|
|
3
|
+
`),await new Promise((b,d)=>{let e=(0,h.spawn)(a,["install",`${k}@latest`,"--no-audit","--no-fund","--omit=dev"],{cwd:j,stdio:["ignore",c,c],windowsHide:!0,env:{...process.env,PATH:n}}),f=setTimeout(()=>{e.kill("SIGKILL"),d(Error("npm install timed out after 5 minutes — see install.log"))},3e5);e.once("error",a=>{clearTimeout(f),d(a)}),e.once("exit",a=>{clearTimeout(f),0===a?b():d(Error(`npm install exited with code ${a} — see install.log`))})}).finally(()=>e().closeSync(c));let d=s();if(!d.installed)throw Error("install finished but package is missing — see install.log");return d}function w(a=200){try{if(!e().existsSync(l))return"";return e().readFileSync(l,"utf8").split(/\r?\n/).filter(Boolean).slice(-a).join("\n")}catch{return""}}},92990:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>C,LT:()=>j,MZ:()=>v,Nl:()=>z,Nu:()=>p,OV:()=>h,RY:()=>I,S6:()=>s,SK:()=>F,Td:()=>A,Tx:()=>q,V1:()=>J,WN:()=>t,Ww:()=>L,YT:()=>n,Z2:()=>K,ZL:()=>m,_0:()=>H,aV:()=>u,cD:()=>o,eD:()=>G,f7:()=>y,hF:()=>k,lB:()=>w,oe:()=>E,qp:()=>B,sA:()=>D,t3:()=>l,w1:()=>x});var d=c(21820),e=c(92675),f=c(39141);function g(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]};({...f.sr.qwen});let k={...f.sr.qoder};({...f.sr["qoderwork-cn"]});let l={...f.sr["qoder-cn"]},m={...f.sr.iflow},n={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let p={...f.sr.github},q={...f.sr.kiro},r=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function s(a){if("string"!=typeof a||!r.test(a))throw Error("Invalid region");return a}let t={...f.sr.cursor,tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"}},u={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},v={...f.sr.kilocode},w={...f.sr.cline},x={...f.sr.clinepass},y={...f.sr.gitlab},z={...f.sr["codebuddy-cn"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={...f.sr["codebuddy-intl"]},D={...f.sr.muse},E={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",callbackPath:"/",timeoutMs:3e5},F={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},G={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},H={...f.sr.glm},I={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},J={...f.sr["frontier-for-all"]},K={clientId:"hermes-cli",portalBaseUrl:"https://portal.nousresearch.com",deviceCodeUrl:"https://portal.nousresearch.com/api/oauth/device/code",tokenUrl:"https://portal.nousresearch.com/api/oauth/token",agentKeyUrl:"https://portal.nousresearch.com/api/oauth/agent-key",inferenceBaseUrl:"https://inference-api.nousresearch.com/v1",scope:"inference:invoke inference:mint_agent_key"},L=3e5},96477:(a,b,c)=>{c.d(b,{P:()=>au}),c(30369);var d=c(23433),e=c(14524),f=c(71600),g=c(7547),h=c(45974),i=c(89718),j=c(40615),k=c(38775),l=c(28093),m=c(3894),n=c(24253),o=c(52007),p=c(89865),q=c(62662),r=c(85703),s=c(48644);let t=["SIMPLE","MEDIUM","COMPLEX","REASONING"],u={SIMPLE:"Direct lookups, greetings, single-file extraction, trivial edits, formatting.",MEDIUM:"Localized bug fixes, writing a function, small refactors within one file/module.",COMPLEX:"Multi-file changes, architecture, integration/design decisions, debugging across a system.",REASONING:"Hard algorithmic/mathematical reasoning, subtle concurrency/correctness proofs, deep analysis."},v=new Map;function w(a,b){if(!Array.isArray(a))return"";let c=a=>a?.role==="user"&&!(a&&"object"==typeof a&&("tool"===a.role||"function_call_output"===a.type||(Array.isArray(a.content)&&a.content.length>0?a.content.every(a=>a?.type==="tool_result"):!!Array.isArray(a.parts)&&a.parts.length>0&&a.parts.every(a=>a?.functionResponse)))),d=a.length-1;for(;d>=0;){if(!c(a[d])){d--;continue}let e=[];for(;d>=0&&c(a[d]);d--){let c=b(a[d]);c&&e.unshift(c)}if(e.length)return e.join("\n")}return""}let x=a=>{let b=(0,s.kU)(a?.content);return"string"==typeof b?b.trim():""},y=a=>Array.isArray(a?.parts)?a.parts.map(a=>"string"==typeof a?.text?a.text.trim():"").filter(Boolean).join("\n"):"";function z(a,b,c,d){let e=""===a||null==a?NaN:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}async function A(a={}){var b,c;let d,e,f,{body:g,evaluateSystemone:h,classifierModel:i="oc/jev-1.13-free",log:j={info(){},warn(){},debug(){}},criteria:k=u,instructions:l="Classify the coding task by the least-capable model tier that can complete it well.",breakerEnabled:m=!0,now:n=()=>Date.now(),onSkip:o}=a,p=z(a.timeoutMs,5e3,1,3e4),q=z(a.minConfidence,.5,0,1),r=(a,b)=>(o?.(a,b),null),s=n();if("function"!=typeof h)return j.debug?.("JEV","no System One evaluator — skipping classifier (fail-open)"),r("no-evaluator","no System One evaluator");let B=function(a,b=4e3){return a&&"object"==typeof a?(w(a.messages,x)||w(a.input,x)||w(a.contents||a.request?.contents,y)).slice(0,b):""}(g);if(!B)return j.debug?.("JEV","empty state — skipping classifier (fail-open)"),r("empty-state","no user text found in request");if(m&&(f=v.get(i))&&(s<f.openUntil||f.halfOpen||(f.halfOpen=!0,0)))return j.debug?.("JEV",`circuit breaker open for ${i} — skipping classifier`),r("breaker-open",`${i} paused after a recent failure (cooldown 30000ms)`);try{let a=await (b={state:B,questions:{tier:{type:"choice",instructions:l,criteria:k}}},new Promise(a=>{let c=setTimeout(()=>a({__timeout:!0}),p);Promise.resolve(h(b,i)).then(b=>{clearTimeout(c),a({value:b})}).catch(b=>{clearTimeout(c),a({error:b})})}));if(a?.__timeout)return m&&(c=n(),v.set(i,{openUntil:c+3e4,halfOpen:!1})),j.warn?.("JEV",`${i} classifier timed out — fail-open`),r("timeout",`${i} no answer within ${p}ms`);if(a?.error){let b=a.error?.message||String(a.error);return j.warn?.("JEV",`${i} classifier error — fail-open: ${b}`),r("error",b)}d=a?.value}catch(b){let a=b?.message||String(b);return j.warn?.("JEV",`${i} classifier error — fail-open: ${a}`),r("error",a)}if(!d?.ok)return j.warn?.("JEV",`${i} classifier HTTP ${d?.status} — fail-open`),r("http",`${i} returned HTTP ${d?.status}`);try{e=await d.json()}catch(b){let a=b?.message||String(b);return j.warn?.("JEV",`${i} returned invalid JSON — fail-open: ${a}`),r("invalid-json",a)}let C=e?.answers?.tier,D=C?.choice,E="number"==typeof C?.confidence?C.confidence:null,F=C?.probabilities&&"object"==typeof C.probabilities?C.probabilities:null;if(!D||!t.includes(D))return j.warn?.("JEV",`${i} returned unknown tier "${D}" — fail-open`),r("unknown-tier",`${i} returned tier "${D}"`);if(null==E||E<q)return j.info?.("JEV",`${i} low confidence (${E}) for ${D} — keeping order`),r("low-confidence",`${D} confidence ${null==E?"missing":E.toFixed(3)} < min ${q}`);m&&v.delete(i);let G=n()-s;return j.info?.("JEV",`${i} tier=${D} conf=${E.toFixed(3)} in ${G}ms`),{tier:D,confidence:E,probabilities:F,model:e?.model||i,usage:e?.usage||null,source:"systemone"}}var B=c(46984),C=c(62320);c(29485);var D=c(11847);let E=["vision","pdf","audioInput","videoInput"],F=new Set(E),G="oc/mimo-v2.6-flash-free",H=a=>"oc/mimo-v2.5-free"===a?G:a;function I(a,b){var c;let d=Array.isArray(c=b?.capacityAdapter?.[a])?{enabled:!0,roundRobin:!1,models:c.map(a=>H(a?.model||a)).filter(Boolean)}:c&&"object"==typeof c?{enabled:!1!==c.enabled,roundRobin:!!c.roundRobin,models:Array.isArray(c.models)?c.models.map(H).filter(Boolean):[]}:{enabled:!1,roundRobin:!1,models:[]};return d.enabled&&0===d.models.length?{...d,models:[G]}:d}function J(a,b){let c=a.indexOf("/"),d=c>0?a.slice(0,c):"",e=c>0?a.slice(c+1):a,f=(0,D.getCapabilitiesForModel)(d,e);return b.every(a=>!0===f[a])}function K(a,b,c){let d=[...b||[]].filter(a=>F.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>J(a,d)))return a;let e=(function(a,b=null){let c=b?new Set([...b].filter(a=>F.has(a))):null,d=new Set,e=[];for(let b of E){if(c&&!c.has(b))continue;let{enabled:f,models:g}=I(b,a);if(f)for(let a of g)d.has(a)||(d.add(a),e.push(a))}return e})(c,d).filter(b=>!a.includes(b)&&J(b,d));return 0===e.length?a:[...e,...a]}function L(a){return"string"==typeof a?a.length:Array.isArray(a)?a.reduce((a,b)=>a+("string"==typeof b?.text?b.text.length:50),0):0}function M(a,b){let c=new Set(b);return 0===c.size?a:(b,d,...e)=>{if(c.has(d)){let a=d.indexOf("/"),c=a>0?d.slice(0,a):"",e=a>0?d.slice(a+1):d,{contextWindow:f}=(0,D.getCapabilitiesForModel)(c,e);b=function(a,b){let c=Array.isArray(a.messages)?"messages":Array.isArray(a.input)?"input":Array.isArray(a.contents)?"contents":null;if(!c)return a;let d=a[c];if(!d||0===d.length)return a;let e=a=>"system"===a||"developer"===a,f=d.filter(a=>e(a?.role)),g=d.filter(a=>!e(a?.role));if(0===g.length)return a;let h=a=>"assistant"===a||"model"===a,i=g.length-1;for(;i>=0&&!h(g[i]?.role);)i--;let j=g.slice(i+1),k=g.slice(0,i+1);if(0===k.length)return a;let l=a=>a.content??a.parts,m=.8*(b||2e5)*4,n=k.slice(0,6),o=f.concat(n,j).reduce((a,b)=>a+L(l(b)),0);for(;o>m&&n.length>0;)o-=L(l(n.pop()));return n.length===k.length?a:{...a,[c]:[...f,...n,...j]}}(b,f)}return a(b,d,...e)}}var N=c(2735),O=c(60290),P=c(87252),Q=c(19956),R=c(94454),S=c(7803),T=c(67828),U=c(15186),V=c(58362);let W=/\[1m\]$/i;var X=c(27811);let Y=Object.freeze({hardThreshold:6,longContextChars:24e3,largeToolResultChars:12e3}),Z=["audit","review","investigate","analyze","analyse","assess","diagnose","debug","refactor","redesign","restructure","harden","optimize","optimise","benchmark","profile","trace","reproduce","resolve","rewrite","overhaul","plan","implement","survey"],$=new Set(Z.filter(a=>!["plan","implement","resolve"].includes(a))),_=new Set(["can","could","would","will","please","kindly","you","help","me","with","to","i","we","need","want","like","fully","deeply","thoroughly"]),aa=[{reason:"audit",terms:["fully audit","deep review","deep repository audit"]},{reason:"architecture",terms:["design the architecture","design architecture","repository restructure","rollback procedures","repository-wide","multi-file","cross-component","cross component"]},{reason:"concurrency",terms:["race condition","concurrency","stale-write","stale write"]},{reason:"root-cause",terms:["root cause","debug intermittent","intermittent failing tests","failing tests with unclear cause","failures with unclear causes","unclear failure"]},{reason:"performance",terms:["performance investigation"]}],ab=[{reason:"architecture",terms:["architecture","migration","migrate","rollback"]},{reason:"security",terms:["security","authentication","permissions"]}],ac=new Set([...aa,...ab].flatMap(a=>a.terms).map(a=>a.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean).join(" "))),ad=["text","content","input_text","output_text","arguments","output"],ae=["text","content","input_text"],af=["content","parts","input"],ag=new Set(["image_url","input_image","input_file","file","document","input_audio","input_video"]);function ah(a,b){if(!a||"object"!=typeof a)return;let c=Object.getOwnPropertyDescriptor(a,b);return c&&"value"in c?c.value:void 0}function ai(a){return"tool"===ah(a,"role")||"tool_result"===ah(a,"type")||"function_call_output"===ah(a,"type")}function aj(a,b,c={}){return{level:"hard",score:b.hardThreshold,escalationScore:b.hardThreshold,reasons:[a],metadata:c}}class ak extends Error{constructor(a){super(a),this.name="AutoRouterConfigurationError"}}function al(a,b,c={}){if(b===a)throw new ak(`Auto Router target "${b}" cannot reference its own combo.`);if(c?.[b]?.fallbackStrategy==="auto")throw new ak(`Auto Router target "${b}" is configured with fallbackStrategy "auto"; Auto Router chaining is not supported.`)}var am=c(91576),an=c(50711),ao=c(29952);async function ap({body:a,models:b,routerModel:c=ao.UH,log:e,timeoutMs:f=ao.rc}){if(!Array.isArray(b)||b.length<=1)return null;let g="string"==typeof c&&c.trim()?c.trim():ao.UH,h=(0,ao.nn)(a);if(!h)return e?.debug?.("COMBO","smart-router: empty prompt state, skipping classification"),null;let i=(0,ao.JE)(b);if(0===Object.keys(i).length)return null;try{let a,b,c=await (0,k.mA)(g);if(!c?.provider)return e?.warn?.("COMBO",`smart-router: unrecognized router model "${g}"`),null;let{provider:j,model:l}=c,m=await (0,d.c1)(j,new Set,l);if(!m||m.allRateLimited)return e?.warn?.("COMBO",`smart-router: no credentials available for router provider "${j}"`),null;let n=await (0,T.checkAndRefreshToken)(j,m),o=new Promise((b,c)=>{a=setTimeout(()=>c(Error(`System One router timed out after ${f}ms`)),f)}),p=(0,an.lo)({body:{model:l,state:h,questions:{route:{type:"choice",instructions:"Which of these configured models is the most appropriate for this request?",criteria:i}}},modelInfo:{provider:j,model:l},credentials:n,log:e,onRequestSuccess:()=>{}});try{b=await Promise.race([p,o])}finally{clearTimeout(a)}if(!b?.success||!b.response)return e?.warn?.("COMBO",`smart-router: evaluation failed (${b?.status||"error"})`),null;let q=await b.response.json(),r=(0,ao.Kn)(q);if(!r||!r.choice)return e?.warn?.("COMBO","smart-router: response missing valid route choice"),null;return r}catch(a){return e?.warn?.("COMBO",`smart-router: evaluation aborted (${a?.message||String(a)})`),null}}var aq=c(10858);async function ar({body:a,comboName:b,models:c,settings:d,autoRouterPath:e=new Set,handleSelectedTarget:f}){let g;try{if(e.size>0)throw new ak(`Auto Router chaining is not supported (encountered "${b}").`);g=function({body:a,comboName:b,models:c,comboStrategies:d={},classifier:e=function(a,b=Y){let c={...Y,...b};try{if(!a||"object"!=typeof a||Array.isArray(a))return aj("invalid-request",c);let b=function(a){let b={chars:0,systemChars:0,messageCount:0,systemMessages:0,itemCount:0,userContextItems:0,toolCalls:0,toolResults:0,toolResultChars:0,modalities:0,userTexts:[]};if(!a||"object"!=typeof a||Array.isArray(a))return b;for(let{items:c,stringInput:d}of function(a){let b,c=(b=ah(a,"request"))&&"object"==typeof b&&!Array.isArray(b)?b:a,d=ah(c,"messages");if(Array.isArray(d)&&d.length)return[{items:d,stringInput:!1}];let e=ah(c,"input");if(Array.isArray(e)&&e.length)return[{items:e,stringInput:!1}];if("string"==typeof e&&e.trim())return[{items:[e],stringInput:!0}];let f=ah(c,"contents");return Array.isArray(f)&&f.length?[{items:f,stringInput:!1}]:[]}(a))for(let a of c){if(b.itemCount+=1,d){b.messageCount+=1,b.chars+=a.length,b.userTexts.push(a),b.userContextItems+=1;continue}let c=ah(a,"role"),e=function a(b,c,d=new Set,e=!1){if("string"==typeof b)return e&&(c.toolResultChars+=b.length),b.length;if(!b||"object"!=typeof b||d.has(b))return 0;d.add(b);let f=e||ai(b);if(Array.isArray(b))return b.reduce((b,e)=>b+a(e,c,d,f),0);let g=0;for(let a of ad){let d=ah(b,a);"string"==typeof d&&(g+=d.length,(f||"output"===a)&&(c.toolResultChars+=d.length))}for(let e of af){let h=ah(b,e);Array.isArray(h)&&(g+=a(h,c,d,f))}return g}(a,b);"system"===c||"developer"===c?(b.systemMessages+=1,b.systemChars+=e):(b.messageCount+=1,b.chars+=e),function(a,b){let c=ah(a,"role"),d=ah(a,"type");!function a(b,c,d=new Set){if(!b||"object"!=typeof b||d.has(b))return;if(d.add(b),Array.isArray(b)){for(let e of b)a(e,c,d);return}let e=ah(b,"type"),f=ah(b,"tool_calls");for(let g of(ai(b)&&(c.toolResults+=1),Array.isArray(f)?c.toolCalls+=f.length:("function_call"===e||"tool_use"===e||"assistant"===ah(b,"role")&&ah(b,"function_call"))&&(c.toolCalls+=1),af))a(ah(b,g),c,d)}(a,b);let e=function a(b,c=new Set){return!(!b||"object"!=typeof b||c.has(b))&&((c.add(b),Array.isArray(b))?b.some(b=>a(b,c)):!!(ag.has(ah(b,"type"))||[...ag].some(a=>void 0!==ah(b,a)))||af.some(d=>{let e=ah(b,d);return Array.isArray(e)&&a(e,c)}))}(a);if(e&&(b.modalities+=1),"user"===c||"input_text"===d){let c=function a(b,c=new Set){if("string"==typeof b)return b;if(!b||"object"!=typeof b||c.has(b))return"";if(c.add(b),Array.isArray(b))return b.map(b=>a(b,c)).join(" ");let d="";for(let a of ae){let c=ah(b,a);"string"==typeof c&&(d+=` ${c}`)}for(let e of af){let f=ah(b,e);Array.isArray(f)&&(d+=` ${a(f,c)}`)}return d.trim()}(ah(a,"content")??ah(a,"parts")??ah(a,"input")??a);b.userTexts.push(c),(c||e)&&(b.userContextItems+=1)}}(a,b)}return b}(a),d={chars:b.chars,systemChars:b.systemChars,messages:b.messageCount,systemMessages:b.systemMessages,toolCalls:b.toolCalls,toolResults:b.toolResults,toolResultChars:b.toolResultChars,modalities:b.modalities};if(0===b.itemCount)return aj("empty-request",c,d);if(!(b.userContextItems>0))return aj("contextless-request",c,d);let e=0,f=[],g=(a,b)=>{e+=a,f.push(b)};b.chars>=c.longContextChars?g(4,"large-context"):b.chars>=Math.floor(c.longContextChars/3)&&g(2,"medium-context"),b.messageCount>=16?g(3,"long-history"):b.messageCount>=8&&g(1,"multi-turn-history"),b.toolCalls+b.toolResults>=8?g(3,"substantial-tool-history"):b.toolCalls+b.toolResults>=3&&g(2,"repeated-tool-history"),b.toolResultChars>=c.largeToolResultChars?g(4,"large-tool-result-history"):b.toolResultChars>=Math.floor(c.largeToolResultChars/3)&&g(2,"medium-tool-result-history"),b.modalities>=3?g(2,"multiple-modalities"):b.modalities>0&&g(1,"modality-present");let h=(a,b=1)=>{let c,d,e,f,h,i=(c=function(a){let b=[],c="",d=null,e=!1,f=!1,g=()=>{!function(a,b,c){let d=b.toLocaleLowerCase().replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu,"");if(!d)return;if(/[._/\\]/u.test(d)||/\p{Ll}\p{M}*\p{Lu}/u.test(d))return a.push({value:d,quoted:c});let e=d.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean);if(/[^\p{L}\p{N}\p{M}\s]/u.test(d)&&e.length>1&&!ac.has(e.join(" ")))return a.push({value:d,quoted:c});for(let b of e)a.push({value:b,quoted:c})}(b,c,f),c=""};for(let b of a)d?e?(c+=b,e=!1):"\\"===b?e=!0:b===d?(g(),d=null,f=!1):c+=b:'"'===b||"`"===b||"'"===b?(g(),d=b,f=!0):/\s/u.test(b)?g():c+=b;return g(),b}(a),d=function(a){for(let b of a)if(!(b.quoted||_.has(b.value)))return b.value;return null}(c),e=Z.includes(d),f=$.has(d),{strong:(h=(a,b=!1)=>a.filter(a=>a.terms.some(a=>(function(a,b,c=!1){let d=b.split(/[^\p{L}\p{N}\p{M}]+/u).filter(Boolean);return a.some((b,e)=>d.every((b,d)=>a[e+d]?.value===b&&(c||!a[e+d].quoted)))})(c,a,b))).map(a=>a.reason))(aa),complexAction:f,gated:e?h(ab,!0):[]});for(let a of i.strong)g(6*b,a);for(let a of(i.complexAction&&0===i.strong.length&&g(6*b,"complex-action"),i.gated))g(6*b,a)};h(b.userTexts.at(-1)||"");let i=0,j=Math.min(4,Math.max(0,c.hardThreshold-1));for(let a of b.userTexts.slice(0,-1)){let b=e;h(a,1/3);let c=e-b;if(i+c>j&&(e-=i+c-j),(i=Math.min(j,i+c))===j)break}let k=Math.min(e,c.hardThreshold+1);return{level:k>=c.hardThreshold?"hard":"easy",score:k,escalationScore:e,reasons:[...new Set(f)],metadata:d}}catch{return aj("classifier-error",c)}}}){let f,g=function(a){if(!Array.isArray(a)||0===a.length)throw new ak("Auto Router requires one or more usable ordered targets.");let b=a.map(a=>"string"==typeof a&&a.trim()===a&&a?a:null);if(b.some(a=>!a)||new Set(b).size!==b.length)throw new ak("Auto Router requires distinct non-empty ordered targets.");return b}(c);for(let a of g)al(b,a,d);let h=()=>({score:Y.hardThreshold,escalationScore:Y.hardThreshold,reasons:["classifier-error"],metadata:{}});try{f=e(a)}catch{f=h()}f&&"object"==typeof f&&Array.isArray(f.reasons)&&Number.isFinite(f.escalationScore)&&Number.isFinite(f.score)||(f=h());let i=new Set(["invalid-request","empty-request","contextless-request","classifier-error"]),j=Array.isArray(f.reasons)&&f.reasons.some(a=>i.has(a))?g.length-1:function({escalationScore:a,candidateCount:b,hardThreshold:c=Y.hardThreshold}){if(!Number.isSafeInteger(b)||b<1)throw new ak("Auto Router requires one or more usable ordered targets.");if(!Number.isFinite(c)||c<=0)throw new ak("Auto Router has an invalid hard threshold.");if(1===b)return 0;if(!Number.isFinite(a))return b-1;let d=Math.max(0,a);return 2===b?+(d>=c):Math.min(b-1,Math.floor(d/c))}({escalationScore:f.escalationScore,candidateCount:g.length,hardThreshold:Y.hardThreshold}),k=g[j];if(!k)throw new ak("Auto Router selected a missing target.");return al(b,k,d),{target:k,index:j,candidates:g,classification:f}}({body:a,comboName:b,models:c,comboStrategies:d.comboStrategies||{}})}catch(a){if(!(a instanceof ak))throw a;return S.warn("AUTO-ROUTER",`combo=${b} selection failed: ${a.message}`),(0,p.yj)(O.gx.BAD_REQUEST,`Auto Router configuration error: ${a.message}`)}let{target:h,classification:i,index:j,candidates:l}=g,m=await (0,k.d_)(h);if(m&&d.comboStrategies?.[h]?.fallbackStrategy==="auto"){let a=`Auto Router target "${h}" is configured as an Auto Router combo; Auto Router chaining is not supported.`;return S.warn("AUTO-ROUTER",`combo=${b} selection failed: ${a}`),(0,p.yj)(O.gx.BAD_REQUEST,`Auto Router configuration error: ${a}`)}return S.info("AUTO-ROUTER",`combo=${b} rank=${j+1}/${l.length} score=${i.score} target=${h} reasons=${i.reasons.join(",")||"none"}`),S.debug("AUTO-ROUTER",`combo=${b} structural metadata`,i.metadata),f(h,m)}async function as({body:a,modelStr:b,clientRawRequest:c,request:d,apiKey:e,settings:f,keyAccess:g,requiredCapabilities:h,translationCache:i=null,requestedModel:j=null,autoRouterPath:k=new Set}){let l=await (0,X.Ge)(g,K([b],h,f),[b]);if(l.length>1){let g=l.filter(a=>a!==b);return S.info("CHAT",`Capacity adapter for [${[...h].join(",")}] on "${b}" → trying ${l.join(", ")}`),(0,r.Pr)({body:a,models:l,handleSingleModel:M((a,b)=>av(a,b,c,d,e,i,null,k),g),log:S,comboName:b,comboStrategy:function(a,b){for(let c of[...a||[]].filter(a=>F.has(a))){let{enabled:a,models:d}=I(c,b);if(a&&0!==d.length)return function(a,b){let{enabled:c,roundRobin:d}=I(a,b);return c&&d?"round-robin":"fallback"}(c,b)}return"fallback"}(h,f)})}return av(a,b,c,d,e,i,j,k)}function at(a,b,c=null){let d=c?.policy||{},e=a.comboStrategies?.[b]||{},f=d.strategy||e.fallbackStrategy;return"auto"===f?{comboStrategy:"auto",isAutoRouter:!0}:{comboStrategy:f||("auto"===a.comboStrategy?"fallback":a.comboStrategy)||"fallback",isAutoRouter:!1}}async function au(a,b=null,f=null){let g;try{g=await (0,aq.Y)(a)}catch{return S.warn("CHAT","Invalid JSON body"),(0,p.yj)(O.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:g,headers:Object.fromEntries(a.headers.entries())}),(0,e.n)(b.headers),b?.headers&&(b={...b,headers:Object.fromEntries(Object.entries(b.headers).filter(([a])=>!["x-9router-ha-proof","x-ez-ha-proof"].includes(a.toLowerCase())))});let{model:h,contextMarker:j}=function(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(W);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}(g.model);j&&(g.model=h);let l=(0,am.bS)({headers:b?.headers,body:g}),m=l?.sessionId||null,{apiKey:n,valid:o}=await (0,d.$A)(a);n?S.debug("AUTH",`API Key: ${S.maskKey(n)}${o?"":" (not recognized)"}`):S.debug("AUTH","No API key provided (local mode)");let q=await (0,i.mt)();if(q.requireApiKey){if(!n)return S.warn("AUTH","Missing API key (requireApiKey=true)"),(0,p.Il)(b.endpoint,"Missing API key");if(!o)return S.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,p.Il)(b.endpoint,"Invalid API key")}if(!h)return S.warn("CHAT","Missing model"),(0,p.yj)(O.gx.BAD_REQUEST,"Missing model");let s=await (0,X.TM)(a),t=await (0,X.cI)(s,h);if(t)return t;if(process.env.NINEROUTER_HA_CONFIG){let{forwardedTarget:d}=await Promise.all([c.e(4058),c.e(1745)]).then(c.bind(c,51745));try{let c=await d(a,g);if(c)return av(g,c,b,a,n,h)}catch{return(0,p.yj)(O.gx.FORBIDDEN,"Forwarded target is not authorized")}}let u=a?.headers?.get("user-agent")||"",v=(0,N.c)(g,h,u,!!q.ccFilterNaming);if(v)return v.response||v;f||(f=new Map);let w=(0,r.t8)(g),x=await (0,k.pe)(h);if(x&&x.models.length>0){let c=x.models,d=q.comboStrategies||{},{comboStrategy:e,isAutoRouter:i}=at(q,h,x);if(i)return ar({body:g,comboName:h,models:c,settings:q,handleSelectedTarget:(c,d)=>d?av(g,c,b,a,n,f,null,new Set([h])):as({body:g,modelStr:c,clientRawRequest:b,request:a,apiKey:n,settings:q,keyAccess:s,requiredCapabilities:w,translationCache:f,autoRouterPath:new Set([h])})});let j=x.policy||{},l=d[h]||{},o={...j,strategy:e,sticky:j.sticky??q.comboStickyRoundRobinLimit??1},p=x.members||c.map(a=>({id:a,weight:1})),t=await (0,X.Ge)(s,K(c,w,q),c),u=t.filter(a=>!c.includes(a)),v="weighted"===e?K(p.map(a=>a.id),w,q).map(a=>p.find(b=>b.id===a)||{id:a,weight:1}):null;if("fusion"===e){let d=x.fusion||l;return S.info("CHAT",`Combo "${h}" with ${c.length} models (strategy: fusion)`),(0,r.vt)({body:g,models:c,handleSingleModel:(c,d,e)=>{let g=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};g={...b,body:d}}return av(c,d,g,a,n,f)},log:S,comboName:h,judgeModel:d?.judgeModel||x.fusion?.judge,tuning:d?.fusionTuning||d?.tuning||x.fusion?.tuning})}let y=o.sticky??q.comboStickyRoundRobinLimit,z=d[h]||{},D=e;if("smart"===e){let b=z.smartTiers;if(b){let c=z.smartClassifierModel,d=null,e=await A({body:g,log:S,classifierModel:c||void 0,criteria:z.smartCriteria,instructions:z.smartInstructions,minConfidence:z.smartMinConfidence,timeoutMs:z.smartTimeoutMs,onSkip:(a,b)=>{d={reason:a,message:b}},evaluateSystemone:(b,c)=>{let d=new Headers({"Content-Type":"application/json"}),e=a.headers.get("Authorization")||(a.headers.get("x-api-key")?`Bearer ${a.headers.get("x-api-key")}`:null);return e&&d.set("Authorization",e),(0,B.o)(new Request(new URL("/api/v1/systemone",a.url),{method:"POST",headers:d,body:JSON.stringify({...b,model:c})}))}});if(e){let a=(0,r.NS)(t,e.tier,b);a[0]!==t[0]&&S.info("CHAT",`Combo "${h}" smart-routing tier=${e.tier} → ${a[0]}`),t=a}else S.info("CHAT",`Combo "${h}" smart-routing skipped (${d?.reason||"unknown"}: ${d?.message||"no detail"}) — using default order`);D="fallback"}}return S.info("CHAT",`Combo "${h}" with ${t.length} models (strategy: ${e}${D!==e?`→${D}`:""}, sticky: ${y})`),(0,r.Pr)({body:g,models:t,members:v||p,policy:o,handleSingleModel:M((c,d)=>av(c,d,b,a,n,f),u),log:S,comboName:h,comboStrategy:D,comboStickyLimit:y,sessionId:m,smartPolicy:z.smartPolicy||"smart",sessionSticky:!1!==z.sessionSticky,confidenceThreshold:"number"==typeof z.confidenceThreshold?z.confidenceThreshold:.8,resolveSmartChoice:"smart"===D?(a,b)=>ap({body:a,models:b,routerModel:z.routerModel,log:S}):null,resolveModel:k.mA,speedMode:(0,C.BW)(g,b?.headers)})}return as({body:g,modelStr:h,clientRawRequest:b,request:a,apiKey:n,settings:q,keyAccess:s,requiredCapabilities:w,translationCache:f,requestedModel:j?`${h.slice(h.indexOf("/")+1)}[${j}]`:null})}async function av(a,b,e=null,s=null,t=null,u=null,v=null,w=new Set){let x=await (0,k.mA)(b);if(!x.provider){let c=await (0,k.pe)(b);if(c&&c.models.length>0){let d=c.models,f=await (0,i.mt)(),g=f.comboStrategies||{},{comboStrategy:h,isAutoRouter:j}=at(f,b,c);if(j)return ar({body:a,comboName:b,models:d,settings:f,autoRouterPath:w,handleSelectedTarget:async(c,d)=>d?av(a,c,e,s,t,u,null,new Set([...w,b])):as({body:a,modelStr:c,clientRawRequest:e,request:s,apiKey:t,settings:f,keyAccess:await (0,X.TM)(s),requiredCapabilities:(0,r.t8)(a),translationCache:u,autoRouterPath:new Set([...w,b])})});let l=c.policy||{},m=g[b]||{},n={...l,strategy:h,sticky:l.sticky??f.comboStickyRoundRobinLimit??1},o=c.members||d.map(a=>({id:a,weight:1})),p=(0,r.t8)(a),q=await (0,X.TM)(s),v=await (0,X.Ge)(q,K(d,p,f),d),x=v.filter(a=>!d.includes(a)),y="weighted"===h?K(o.map(a=>a.id),p,f).map(a=>o.find(b=>b.id===a)||{id:a,weight:1}):null;if("fusion"===h){let f=c.fusion||m;return S.info("CHAT",`Combo "${b}" with ${d.length} models (strategy: fusion)`),(0,r.vt)({body:a,models:d,handleSingleModel:(a,b,c)=>{let d=e;if(c&&e){let{tools:a,tool_choice:b,...c}=e.body||{};d={...e,body:c}}return av(a,b,d,s,t,u,null,w)},log:S,comboName:b,judgeModel:f?.judgeModel||c.fusion?.judge,tuning:f?.fusionTuning||f?.tuning||c.fusion?.tuning})}let z=n.sticky??f.comboStickyRoundRobinLimit,A=(0,am.bS)({headers:e?.headers,body:a}),B=A?.sessionId||null;return S.info("CHAT",`Combo "${b}" with ${v.length} models (strategy: ${h}, sticky: ${z})`),(0,r.Pr)({body:a,models:v,members:y||o,policy:n,handleSingleModel:M((a,b)=>av(a,b,e,s,t,u,null,w),x),log:S,comboName:b,comboStrategy:h,comboStickyLimit:z,sessionId:B,smartPolicy:c.smartPolicy||"smart",sessionSticky:!1!==c.sessionSticky,confidenceThreshold:"number"==typeof c.confidenceThreshold?c.confidenceThreshold:.8,resolveSmartChoice:"smart"===h?(a,b)=>ap({body:a,models:b,routerModel:c.routerModel,log:S}):null,resolveModel:k.mA,speedMode:(0,C.BW)(a,e?.headers)})}return S.warn("CHAT","Invalid model format",{model:b}),(0,p.yj)(O.gx.BAD_REQUEST,"Invalid model format")}let{provider:y,model:z}=x;try{let a=await (0,g.jw)(y);if(Array.isArray(a)&&a.includes(z))return S.warn("CHAT",`Model "${z}" is disabled for provider "${y}"`),(0,p.yj)(O.gx.NOT_FOUND,`Model "${z}" is disabled`)}catch{}let A=s?.headers?.get("user-agent")||"",B=s?.headers?.get("x-connection-id")||s?.headers?.get("x-ez-connection-id")||s?.headers?.get("x-9r-connection-id")||null,D=await (0,i.mt)(),E=(D.providerThinking||{})[y]||null,F="antigravity"===y?(0,h.mv)(z,(0,R.S_)(a,E)):z,G=new Set,H=new Set,I=null,J=null,L=null,N=await (0,X.pL)(s,y),W=(0,f.G)(a);for(;;){let f,g=await (0,d.c1)(y,G,z,{preferredConnectionId:B,cacheKey:W,requestedModel:v||z,quotaModel:F,excludeProxyPoolIds:H,allowedConnectionIds:N});if(!g||g.allRateLimited){if((process.env.EZROUTER_HA_CONFIG||process.env.NINEROUTER_HA_CONFIG)&&s&&0===G.size){let{maybeForwardChat:d}=await Promise.all([c.e(4058),c.e(1745)]).then(c.bind(c,51745)),f=v||e?.body?.model||a.model,g=await d(s,{...a,model:f},b,!0);if(g)return g}if(g?.allRateLimited){let a=I||g.lastError||"Unavailable",b=[J,g.lastErrorCode].map(a=>"number"==typeof a||"string"==typeof a?Number(a):null).find(a=>Number.isInteger(a)&&a>=400&&a<=599),c=(0,p.fP)(b,a);return S.warn("CHAT",`[${y}/${z}] ${c} | ${a} (${g.retryAfterHuman})`),(0,p.wO)(c,`[${y}/${z}] ${a}`,g.retryAfter,g.retryAfterHuman,L)}if(0===G.size){if((0,j.YI)(y))return S.warn("AUTH",`No active credentials for provider: ${y}${N?" (API key pinned to specific accounts)":""}`),(0,p.yj)(O.gx.NOT_FOUND,N?`No active credentials for provider: ${y} among the accounts this API key is pinned to`:`No active credentials for provider: ${y}. Connect an account for this provider in the dashboard.`,{code:"provider_not_configured"});return S.warn("AUTH",`Unknown provider: ${y}`),(0,p.yj)(O.gx.NOT_FOUND,`Unknown provider "${y}" in model "${y}/${z}". See /v1/models for what this router serves.`)}return S.warn("CHAT","No more accounts available",{provider:y}),(0,p.yj)((0,p.Yg)(J,I),I||"All accounts unavailable",null,L)}let i=await (0,T.checkAndRefreshToken)(y,g);if(("antigravity"===y||"gemini-cli"===y)&&!i.projectId){let a=await (0,U.eG)(g.connectionId,i.accessToken,y);a&&(i.projectId=a,(0,T.vN)(g.connectionId,{projectId:a}).catch(()=>{}))}try{f=await (0,l.wk)({translationCache:u,body:{...structuredClone(a),model:`${y}/${z}`},modelInfo:{provider:y,model:z},credentials:{...i,rawHeaders:e?.headers},log:S,clientRawRequest:e,connectionId:g.connectionId,userAgent:A,apiKey:t,ccFilterNaming:!!D.ccFilterNaming,rtkEnabled:!!D.rtkEnabled,headroomEnabled:!!D.headroomEnabled,headroomUrl:D.headroomUrl||m.ag,headroomCompressUserMessages:!!D.headroomCompressUserMessages,headroomTimeoutMs:D.headroomTimeoutMs,cavemanEnabled:!!D.cavemanEnabled,cavemanLevel:D.cavemanLevel||"full",ponytailEnabled:!!D.ponytailEnabled,ponytailLevel:D.ponytailLevel||"full",customPromptEnabled:!!D.customPromptEnabled||!!D.customSystemPromptEnabled,customPrompt:D.customPrompt||D.customSystemPrompt||"",toolRankEnabled:!!D.toolRankEnabled,pxpipeEnabled:!!D.pxpipeEnabled,pxpipeMinChars:D.pxpipeMinChars,pxpipeTimeoutMs:D.pxpipeTimeoutMs,pxpipeTransform:D.pxpipeEnabled?await (0,n.RG)():null,onPxpipeEvent:o.T0,toolHistoryPruning:D.toolHistoryPruning||{enabled:!1},providerThinking:E,providerOverrides:(D.providerOverrides||{})[y]||null,toolDisclosure:D.toolDisclosureEnabled||D.toolDisclosureFilterEnabled?{disclosureEnabled:!!D.toolDisclosureEnabled,filterEnabled:!!D.toolDisclosureFilterEnabled,maxTools:D.toolDisclosureMaxTools??20}:null,sourceFormatOverride:s?.url?(0,Q.t)(new URL(s.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,T.vN)(g.connectionId,{...a,existingProviderSpecificData:g.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,d.Pt)(g.connectionId,g,F,y),(0,h.vO)(g.connectionId,F)},onEmptyStream:async()=>{await (0,d.vk)(g.connectionId,O.gx.BAD_GATEWAY,`Empty streaming response from ${y}/${z}`,y,F,Date.now()+P.Dp)}})}catch(a){S.error?.("CHAT",`[${y}/${z}] handleChatCore uncaught exception: ${a?.message||a}`),f=(0,p.A1)(O.gx.INTERNAL_SERVER_ERROR,`Chat execution failed: ${a?.message||"Internal error"}`)}if(f instanceof Response||f&&!f.isError&&(f.ok||f.status===O.gx.OK||!f.status)){let a=f instanceof Response?f:f.response||f;return(0,V.xL)({requestedModel:v||b,resolvedModel:`${y}/${z}`},a)}let k=f?.status||O.gx.INTERNAL_SERVER_ERROR,r=f?.error||"Upstream request failed",w="noauth"===g.connectionId?g.providerSpecificData?.connectionProxyPoolId:null,x=null,C=f?.resetsAtMs;if("antigravity"===y&&(409===k||429===k)&&(x=await (0,h.XJ)(g.connectionId,k,F,i.accessToken,g.providerSpecificData,r))&&(C=x),"antigravity"===y&&x||(await (0,d.vk)(g.connectionId,k,r,y,F,C,w)).shouldFallback){S.warn("FALLBACK",`⇄ ACC:${g.connectionName} UNAVAILABLE (${k}) → NEXT ACCOUNT`),G.add(g.connectionId),w&&H.add(w),I=r,J=k,L=(0,q.d)(f?.response?.headers);continue}let K=f instanceof Response?f:f?.response||(0,p.yj)(k,r);return(0,V.xL)({requestedModel:v||b,resolvedModel:`${y}/${z}`},K)}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=8129,exports.ids=[8129],exports.modules={18080:(a,b,c)=>{c.d(b,{Xj:()=>j,uo:()=>k});var d=c(92990);let e=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function f(a){return"string"==typeof a?a.trim():""}function g(a){let b,c=f(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");let d=b.hostname.toLowerCase();if(!e.has(d))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function h(a){return Array.isArray(a)?a.map(f).filter(Boolean).join(" "):f(a)}function i(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function j(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=f(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let e=f(b.access_token||b.accessToken),j=f(b.refresh_token||b.refreshToken),k=f(b.client_id||b.clientId),l=g(b.token_endpoint||b.tokenEndpoint),m=f(b.profile_arn||b.profileArn),n=f(b.region)||"us-east-1",o=h(b.scopes||b.scope),p=(0,d.S6)(n);if(!e)throw Error("access_token is required");if(!j)throw Error("refresh_token is required");if(!k)throw Error("client_id is required");if(!o)throw Error("scopes is required");if(!m)throw Error("profile_arn is required");let q=i(e),r=b.email||q?.email||q?.preferred_username||q?.upn||q?.sub||null;return{accessToken:e,refreshToken:j,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=i(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:r,providerSpecificData:{profileArn:m,region:p,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:k,tokenEndpoint:l,scope:o}}}function k(a,b={}){let c=f(b.clientId||b.client_id),d=g(b.tokenEndpoint||b.token_endpoint),e=h(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!e)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:e}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:e}}}},18129:(a,b,c)=>{c.d(b,{Dz:()=>j,Vq:()=>m,fp:()=>k,jR:()=>i});var d=c(85640),e=c(39141);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map,h=/^\d+(\.\d+)?$/;function i(a){if(null==a||""===a)return null;if("number"==typeof a||"string"==typeof a&&h.test(a.trim())){let b=Number(a);return Number.isFinite(b)?b<1e12?1e3*b:b:null}let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function j(a,b=Date.now()){let c=i(a?.expiresAt??a?.tokenExpiresAt);if(null!==c)return c;let d=a?.expiresIn;return"number"==typeof d&&d>0?b+1e3*d:null}function k(a,b,c=Date.now()){if(!b)return!1;let g=j(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let h=e.sr[a]?.maxRefreshAgeMs;return!!(h&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=i(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,h))}async function l(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function m(a,b,c){return b?l(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}},21362:(a,b,c)=>{c.d(b,{J1:()=>n,ge:()=>q,Il:()=>p,XB:()=>A,SO:()=>z,Wm:()=>t,jR:()=>y,ZP:()=>G,go:()=>F,EF:()=>x,I9:()=>r,AH:()=>w,ng:()=>o,Ql:()=>v,rE:()=>I,Cw:()=>J,Ms:()=>E,RM:()=>B,p9:()=>D,r_:()=>l,wt:()=>C});var d=c(31024),e=c(4630),f=c(28730),g=c(89843);let h=new Map;async function i(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=h.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;h.delete(e)}let g=(async()=>{try{let a=await c();return h.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw h.delete(e),a}})();return h.set(e,{promise:g}),g}var j=c(18080);let k=null;async function l(a,b){return a?i("xai",a,async()=>{try{k||(k=new(await Promise.all([c.e(2898),c.e(4730)]).then(c.bind(c,84730))).XaiService);let b=await k.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let m={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>f.NA.anthropic.token,dedupKey:"claude"},qwen:{url:()=>f.NA.qwen.token,dedupKey:"qwen",parse:a=>a.resource_url?{providerSpecificData:{resourceUrl:a.resource_url}}:{}},iflow:{url:()=>f.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>f.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,f.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function n(a,b,c,d){let f=e.xq[a],g=m[a]||{},h=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||e.sr[a]?.tokenUrl||null}(a,f,g);return f&&h?b?i(g.dedupKey||a,b,async()=>{try{let e,i,j,{format:k,body:l}=(e=g?.bodyFormat==="json"?"json":"form",i=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(i&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===e)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(h,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...g.parse&&g.parse(o)||{}}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},d):(d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(d?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function o(a,b,c){return n("kimi",a,b,c)}async function p(a,b){return a?i("cline",a,async()=>{try{let c=await fetch(e.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let d=await c.json(),f=d?.data||d;if(!f?.accessToken)return null;let g=f.expiresAt?Math.max(1,Math.floor((new Date(f.expiresAt).getTime()-Date.now())/1e3)):f.expiresIn||f.expires_in||3600;return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:g}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function q(a,b){return n("claude",a,{},b)}async function r(a,b,c,d){return a?i(`google:${b}`,a,async()=>{try{let e=await fetch(f.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!e.ok){let a=await e.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:e.status,error:a}),null}let g=await e.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function s(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}async function t(a,b){return a?i("codex",a,async()=>{try{let c=await fetch(f.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:e.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=s(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,hasIdToken:!!d.id_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,idToken:d.id_token,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function u(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(7774),c.e(4646),c.e(1847),c.e(9865),c.e(9761),c.e(4767),c.e(3378),c.e(7699),c.e(6588),c.e(5187),c.e(7062),c.e(656),c.e(7658),c.e(369),c.e(7099)]).then(c.bind(c,9001));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function v(a,b,c,d=null){return a?i("kiro",a,async()=>{let f=b?.authMethod,h=b?.clientId,i=b?.clientSecret,k=b?.region;if("external_idp"===f){let e;try{e=(0,j.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let f=await (0,g.proxyAwareFetch)(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:e.body},d);if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:f.status,error:a}),null}let h=await f.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:e.providerSpecificData}}if(h&&i){let e="idc"===f&&k?`https://oidc.${k}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,g.proxyAwareFetch)(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await u(b,l.accessToken,l.profileArn)}}let l=await (0,g.proxyAwareFetch)(e.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},d);if(!l.ok){let a=await l.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn,...await u(b,m.accessToken,m.profileArn)}},c):null}async function w(a,b){return n("iflow",a,{},b)}async function x(a,b){return n("github",a,{},b)}async function y(a,b){return a?i("copilot",a,async()=>{try{let c=await fetch(e.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":f.x0.USER_AGENT,"Editor-Version":`vscode/${f.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":f.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function z(a,b){return a?i("codebuddy-cn",a,async()=>{let c=e.sr["codebuddy-cn"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:d.status,error:a}),null}let f=await d.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function A(a,b){return a?i("codebuddy-intl",a,async()=>{let c=e.sr["codebuddy-intl"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:d.status,error:a}),null}let f=await d.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function B(a,b,c){if(!a)return null;let d=e.sr.trae||{},f=d.exchangeTokenUrl||d.tokenUrl;return f?i("trae",a,async()=>{try{let b,e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:d.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:d.clientSecret||"-",UserID:""})});if(!e.ok){let a=await e.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:e.status,error:a}),null}let g=await e.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}function C(){return null}async function D(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function E(a,b="intl",d){return a?i(`qoder:${b||"intl"}`,a,async()=>{try{let e=new(await Promise.all([c.e(4646),c.e(1847),c.e(9761),c.e(4767),c.e(8124)]).then(c.bind(c,91531))).QoderService({profile:b}),f=await e.refreshDeviceToken(a);return d?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder device token",{profile:b,hasNewAccessToken:!!f.accessToken,hasNewRefreshToken:!!f.refreshToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}catch(c){let a=c?.status;if(d?.error?.("TOKEN_REFRESH",`Qoder device refresh failed (${b})`,{error:c?.message||String(c),status:a}),401===a||403===a)return{error:"invalid_grant",message:c?.message||"Qoder refresh rejected"};return null}},d):null}async function F(a,b){return a?i("frontier-for-all",a,async()=>{try{let c=await fetch(f.NA["frontier-for-all"].token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq["frontier-for-all"].clientId})});if(!c.ok){let a=await c.text().catch(()=>""),d=s(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Frontier refresh token rotated or revoked. Re-login required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Frontier token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Frontier token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Frontier token: ${a.message}`),null}},b):null}async function G(a,b){return a?i("cursor",a,async()=>{try{let c=await new d.q().refreshToken(a);return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cursor token",{hasNewAccessToken:!!c.accessToken,hasNewRefreshToken:!!c.refreshToken,expiresIn:c.expiresIn}),c}catch(a){return b?.warn?.("TOKEN_REFRESH",`Cursor refresh failed: ${a?.message||a}`),null}},b):null}let H={"minimax-code":"https://account.minimax.cn/oauth2/token","minimax-code-global":"https://account.minimax.io/oauth2/token"};async function I(a,b,c){let d=H[a];return d&&b?i(a,b,async()=>{try{let e=await fetch(d,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:"mcode-public",scope:"agent.default",audience:"agent-backend"}).toString(),signal:AbortSignal.timeout(3e4)}),f=await e.json().catch(()=>null);if(!e.ok||f&&"string"==typeof f.error&&f.error){let b=f?.error||`HTTP ${e.status}`;if(400===e.status&&f?.error==="invalid_grant")return c?.warn?.("TOKEN_REFRESH",`MiniMax refresh token spent/rejected (${a}) — sign-in gone`),{error:"invalid_grant"};return c?.error?.("TOKEN_REFRESH",`MiniMax token refresh failed (${a})`,{status:e.status,error:b}),null}if(!f?.access_token)return c?.error?.("TOKEN_REFRESH",`MiniMax refresh returned no access_token (${a})`),null;return{accessToken:f.access_token,refreshToken:f.refresh_token||b,expiresIn:f.expires_in}}catch(b){return c?.error?.("TOKEN_REFRESH",`Error refreshing MiniMax token (${a}): ${b.message}`),null}},c):null}async function J(a,b){return a?i("nous",a,async()=>{try{let c=await fetch("https://portal.nousresearch.com/api/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-nous-refresh-token":a},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:"hermes-cli"}),signal:AbortSignal.timeout(3e4)});if(!c.ok){let a=await c.text().catch(()=>"");return b?.error?.("TOKEN_REFRESH","Failed to refresh Nous token",{status:c.status,error:a}),null}let d=await c.json();if(!d?.access_token)return b?.error?.("TOKEN_REFRESH","Nous token refresh returned no access_token"),null;let e=null,f=null,g=null;try{let a=await fetch("https://portal.nousresearch.com/api/oauth/agent-key",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${d.access_token}`},body:JSON.stringify({min_ttl_seconds:7200}),signal:AbortSignal.timeout(15e3)});if(a.ok){let c=await a.json();e=c.api_key||null,f=c.key_id||null,g=c.expires_at||null,b?.info?.("TOKEN_REFRESH","Nous agent key minted successfully")}else{let c=await a.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Failed to mint Nous agent key, falling back to access_token",{error:c})}}catch(a){b?.warn?.("TOKEN_REFRESH",`Nous agent key mint error: ${a?.message||a}`)}return{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in,apiKey:e||d.access_token,agentKey:e,providerSpecificData:{...f?{agentKeyId:f}:{},...g?{agentKeyExpiresAt:g}:{}}}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Nous token: ${a.message}`),null}},b):null}},31024:(a,b,c)=>{c.d(b,{q:()=>h});var d=c(55511),e=c.n(d),f=c(92990);function g(a){let b="string"==typeof a?a.split("."):[];if(3!==b.length||!b[1])return null;try{return JSON.parse(Buffer.from(b[1],"base64url").toString("utf8"))}catch{return null}}class h{constructor(){this.config=f.WN}getAuthorizationData(a="login"){let b=e().randomBytes(32).toString("base64url"),c=e().createHash("sha256").update(b).digest("base64url"),d=e().randomUUID(),f=new URLSearchParams({challenge:c,uuid:d,mode:a,supportsSelectedTeamLogin:"true"});return{authUrl:`${this.config.loginUrl}?${f.toString()}`,uuid:d,verifier:b,expiresIn:300}}async pollToken(a,b,c){if(!a||!b)throw Error("Cursor OAuth session is incomplete");let d=new URLSearchParams({uuid:a,verifier:b}),f=await fetch(`${this.config.pollUrl}?${d.toString()}`,{headers:{Accept:"application/json","User-Agent":"Cursor/3.12.29","x-cursor-client-type":this.config.clientType,"x-ghost-mode":"implicit-false","x-new-onboarding-completed":"false",traceparent:`00-${e().randomBytes(16).toString("hex")}-${e().randomBytes(8).toString("hex")}-01`},signal:c});if(404===f.status)return{success:!1,pending:!0,error:"authorization_pending"};if(!f.ok)throw Error(`Cursor OAuth polling failed with HTTP ${f.status}`);let g=await f.json();if(!g.accessToken||!g.refreshToken)throw Error("Cursor OAuth response was missing tokens");return{success:!0,tokens:g}}async refreshToken(a){let b;if(!a||"string"!=typeof a)throw Error("Cursor refresh token is required");for(let d=0;d<3;d+=1){var c;try{let c=await fetch(this.config.refreshUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:"{}",signal:AbortSignal.timeout(15e3)});if(c.ok){let b=await c.json();if(!b.accessToken)throw Error("Cursor refresh response was missing an access token");return this.mapTokens(b.accessToken,b.refreshToken||a)}if(429!==c.status&&c.status<500){let a=Error(`Cursor token refresh failed with HTTP ${c.status}`);throw a.retryable=!1,a}b=Error(`Cursor token refresh failed with HTTP ${c.status}`)}catch(a){if(!1===a.retryable)throw a;b=a}d<2&&await function(a){return new Promise(b=>setTimeout(b,a))}((c=d,Math.floor(300*2**c*(.8+.4*Math.random()))))}throw b||Error("Cursor token refresh failed")}mapTokens(a,b,c=null,d="oauth"){let e,f=(e=g(a),"number"==typeof e?.exp?1e3*e.exp-3e5:Date.now()+36e5),h=this.extractUserInfo(a);return{accessToken:a,refreshToken:b,...c?{machineId:c}:{},expiresAt:new Date(f).toISOString(),expiresIn:Math.max(1,Math.floor((f-Date.now())/1e3)),email:h?.email||null,providerSpecificData:{authMethod:d,...c?{machineId:c}:{},...h?.userId?{userId:h.userId}:{}}}}async validateImportToken(a,b){if(!a||"string"!=typeof a)throw Error("Access token is required");if(!b||"string"!=typeof b)throw Error("Machine ID is required");if(a.length<50)throw Error("Invalid token format. Token appears too short.");if(!/^[a-f0-9-]{32,}$/i.test(b.replace(/-/g,"")))throw Error("Invalid machine ID format. Expected UUID format.");return this.mapTokens(a,null,b,"imported")}extractUserInfo(a){let b=g(a);return b?{email:"string"==typeof b.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.email)?b.email:null,userId:b.sub||b.user_id||null}:null}getTokenStorageInstructions(){return{title:"How to import your existing Cursor session",steps:["Open Cursor IDE and make sure you're logged in",`Linux: ${this.config.tokenStoragePaths.linux}`,`macOS: ${this.config.tokenStoragePaths.macos}`,`Windows: ${this.config.tokenStoragePaths.windows}`,"Read cursorAuth/accessToken and storage.serviceMachineId from itemTable"]}}}},85640:(a,b,c)=>{c.d(b,{$B:()=>o,I9:()=>f.I9,Og:()=>i,Ql:()=>f.Ql,Sc:()=>j,Wm:()=>f.Wm,go:()=>f.go,jR:()=>f.jR,jT:()=>h,oD:()=>g,pb:()=>l,qZ:()=>p,rE:()=>f.rE});var d=c(4630),e=c(28730),f=c(21362);let g=3e5;function h(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function i(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:g}function j(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let k=new Map;async function l(a,b){let d=a.client_email,f=k.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await Promise.all([c.e(9095),c.e(1455)]).then(c.bind(c,71455));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),l=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:j})});if(!l.ok){let a=await l.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:m,expires_in:n}=await l.json(),o=Date.now()+(n??3600)*1e3;return k.set(d,{token:m,expiresAt:o}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:m,expiresAt:o}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function m(a,b){let c=j(a.apiKey);return c?l(c,b):null}let n={"frontier-for-all":(a,b)=>(0,f.go)(a.refreshToken,b),"gemini-cli":(a,b)=>(0,f.I9)(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>(0,f.I9)(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>(0,f.ge)(a.refreshToken,b),codex:(a,b)=>(0,f.Wm)(a.refreshToken,b),iflow:(a,b)=>(0,f.AH)(a.refreshToken,b),github:(a,b)=>(0,f.EF)(a.refreshToken,b),kiro:(a,b)=>(0,f.Ql)(a.refreshToken,a.providerSpecificData,b),cursor:(a,b)=>(0,f.ZP)(a.refreshToken,b),xai:(a,b)=>(0,f.r_)(a.refreshToken,b),"grok-cli":(a,b)=>(0,f.r_)(a.refreshToken,b),gcli:(a,b)=>(0,f.r_)(a.refreshToken,b),"codebuddy-cn":(a,b)=>(0,f.SO)(a.refreshToken,b),"codebuddy-intl":(a,b)=>(0,f.XB)(a.refreshToken,b),trae:(a,b)=>(0,f.RM)(a.refreshToken,a,b),cline:(a,b)=>(0,f.Il)(a.refreshToken,b),clinepass:(a,b)=>(0,f.Il)(a.refreshToken,b),zed:()=>(0,f.wt)(),windsurf:(a,b)=>(0,f.p9)(a,b),kimi:(a,b)=>(0,f.ng)(a.refreshToken,a,b),"kimi-coding":(a,b)=>(0,f.ng)(a.refreshToken,a,b),"minimax-code":(a,b)=>(0,f.rE)("minimax-code",a.refreshToken,b),"minimax-code-global":(a,b)=>(0,f.rE)("minimax-code-global",a.refreshToken,b),nous:(a,b)=>(0,f.Cw)(a.refreshToken,b),vertex:m,"vertex-partner":m};async function o(a,b,c){let d=b.refreshToken||b.providerSpecificData?.refreshToken;if(!d)return null;let e=d!==b.refreshToken?{...b,refreshToken:d}:b,g=n[a];return g?g(e,c):(0,f.J1)(a,d,e,c)}async function p(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}}};
|
|
1
|
+
"use strict";exports.id=8129,exports.ids=[8129],exports.modules={18080:(a,b,c)=>{c.d(b,{Xj:()=>j,uo:()=>k});var d=c(92990);let e=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function f(a){return"string"==typeof a?a.trim():""}function g(a){let b,c=f(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");let d=b.hostname.toLowerCase();if(!e.has(d))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function h(a){return Array.isArray(a)?a.map(f).filter(Boolean).join(" "):f(a)}function i(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function j(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=f(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let e=f(b.access_token||b.accessToken),j=f(b.refresh_token||b.refreshToken),k=f(b.client_id||b.clientId),l=g(b.token_endpoint||b.tokenEndpoint),m=f(b.profile_arn||b.profileArn),n=f(b.region)||"us-east-1",o=h(b.scopes||b.scope),p=(0,d.S6)(n);if(!e)throw Error("access_token is required");if(!j)throw Error("refresh_token is required");if(!k)throw Error("client_id is required");if(!o)throw Error("scopes is required");if(!m)throw Error("profile_arn is required");let q=i(e),r=b.email||q?.email||q?.preferred_username||q?.upn||q?.sub||null;return{accessToken:e,refreshToken:j,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=i(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:r,providerSpecificData:{profileArn:m,region:p,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:k,tokenEndpoint:l,scope:o}}}function k(a,b={}){let c=f(b.clientId||b.client_id),d=g(b.tokenEndpoint||b.token_endpoint),e=h(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!e)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:e}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:e}}}},18129:(a,b,c)=>{c.d(b,{Dz:()=>j,Vq:()=>m,fp:()=>k,jR:()=>i});var d=c(85640),e=c(39141);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map,h=/^\d+(\.\d+)?$/;function i(a){if(null==a||""===a)return null;if("number"==typeof a||"string"==typeof a&&h.test(a.trim())){let b=Number(a);return Number.isFinite(b)?b<1e12?1e3*b:b:null}let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function j(a,b=Date.now()){let c=i(a?.expiresAt??a?.tokenExpiresAt);if(null!==c)return c;let d=a?.expiresIn;return"number"==typeof d&&d>0?b+1e3*d:null}function k(a,b,c=Date.now()){if(!b)return!1;let g=j(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let h=e.sr[a]?.maxRefreshAgeMs;return!!(h&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=i(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,h))}async function l(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function m(a,b,c){return b?l(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}},21362:(a,b,c)=>{c.d(b,{J1:()=>n,ge:()=>q,Il:()=>p,XB:()=>A,SO:()=>z,Wm:()=>t,jR:()=>y,ZP:()=>G,go:()=>F,EF:()=>x,I9:()=>r,AH:()=>w,ng:()=>o,Ql:()=>v,rE:()=>I,Cw:()=>J,Ms:()=>E,RM:()=>B,p9:()=>D,r_:()=>l,wt:()=>C});var d=c(31024),e=c(4630),f=c(28730),g=c(89843);let h=new Map;async function i(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=h.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;h.delete(e)}let g=(async()=>{try{let a=await c();return h.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw h.delete(e),a}})();return h.set(e,{promise:g}),g}var j=c(18080);let k=null;async function l(a,b){return a?i("xai",a,async()=>{try{k||(k=new(await Promise.all([c.e(2898),c.e(4730)]).then(c.bind(c,84730))).XaiService);let b=await k.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let m={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>f.NA.anthropic.token,dedupKey:"claude"},qwen:{url:()=>f.NA.qwen.token,dedupKey:"qwen",parse:a=>a.resource_url?{providerSpecificData:{resourceUrl:a.resource_url}}:{}},iflow:{url:()=>f.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>f.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,f.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function n(a,b,c,d){let f=e.xq[a],g=m[a]||{},h=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||e.sr[a]?.tokenUrl||null}(a,f,g);return f&&h?b?i(g.dedupKey||a,b,async()=>{try{let e,i,j,{format:k,body:l}=(e=g?.bodyFormat==="json"?"json":"form",i=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(i&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===e)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(h,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...g.parse&&g.parse(o)||{}}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},d):(d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(d?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function o(a,b,c){return n("kimi",a,b,c)}async function p(a,b){return a?i("cline",a,async()=>{try{let c=await fetch(e.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let d=await c.json(),f=d?.data||d;if(!f?.accessToken)return null;let g=f.expiresAt?Math.max(1,Math.floor((new Date(f.expiresAt).getTime()-Date.now())/1e3)):f.expiresIn||f.expires_in||3600;return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:g}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function q(a,b){return n("claude",a,{},b)}async function r(a,b,c,d){return a?i(`google:${b}`,a,async()=>{try{let e=await fetch(f.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!e.ok){let a=await e.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:e.status,error:a}),null}let g=await e.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function s(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}async function t(a,b){return a?i("codex",a,async()=>{try{let c=await fetch(f.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:e.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=s(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,hasIdToken:!!d.id_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,idToken:d.id_token,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function u(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(7774),c.e(4646),c.e(1847),c.e(9865),c.e(9761),c.e(4767),c.e(9013),c.e(7699),c.e(6588),c.e(2960),c.e(6643),c.e(7047),c.e(1596),c.e(369),c.e(7099)]).then(c.bind(c,9001));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function v(a,b,c,d=null){return a?i("kiro",a,async()=>{let f=b?.authMethod,h=b?.clientId,i=b?.clientSecret,k=b?.region;if("external_idp"===f){let e;try{e=(0,j.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let f=await (0,g.proxyAwareFetch)(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:e.body},d);if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:f.status,error:a}),null}let h=await f.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:e.providerSpecificData}}if(h&&i){let e="idc"===f&&k?`https://oidc.${k}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,g.proxyAwareFetch)(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await u(b,l.accessToken,l.profileArn)}}let l=await (0,g.proxyAwareFetch)(e.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},d);if(!l.ok){let a=await l.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn,...await u(b,m.accessToken,m.profileArn)}},c):null}async function w(a,b){return n("iflow",a,{},b)}async function x(a,b){return n("github",a,{},b)}async function y(a,b){return a?i("copilot",a,async()=>{try{let c=await fetch(e.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":f.x0.USER_AGENT,"Editor-Version":`vscode/${f.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":f.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function z(a,b){return a?i("codebuddy-cn",a,async()=>{let c=e.sr["codebuddy-cn"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:d.status,error:a}),null}let f=await d.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function A(a,b){return a?i("codebuddy-intl",a,async()=>{let c=e.sr["codebuddy-intl"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:d.status,error:a}),null}let f=await d.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function B(a,b,c){if(!a)return null;let d=e.sr.trae||{},f=d.exchangeTokenUrl||d.tokenUrl;return f?i("trae",a,async()=>{try{let b,e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:d.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:d.clientSecret||"-",UserID:""})});if(!e.ok){let a=await e.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:e.status,error:a}),null}let g=await e.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}function C(){return null}async function D(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function E(a,b="intl",d){return a?i(`qoder:${b||"intl"}`,a,async()=>{try{let e=new(await Promise.all([c.e(4646),c.e(1847),c.e(9761),c.e(4767),c.e(8124)]).then(c.bind(c,91531))).QoderService({profile:b}),f=await e.refreshDeviceToken(a);return d?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder device token",{profile:b,hasNewAccessToken:!!f.accessToken,hasNewRefreshToken:!!f.refreshToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}catch(c){let a=c?.status;if(d?.error?.("TOKEN_REFRESH",`Qoder device refresh failed (${b})`,{error:c?.message||String(c),status:a}),401===a||403===a)return{error:"invalid_grant",message:c?.message||"Qoder refresh rejected"};return null}},d):null}async function F(a,b){return a?i("frontier-for-all",a,async()=>{try{let c=await fetch(f.NA["frontier-for-all"].token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq["frontier-for-all"].clientId})});if(!c.ok){let a=await c.text().catch(()=>""),d=s(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Frontier refresh token rotated or revoked. Re-login required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Frontier token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Frontier token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Frontier token: ${a.message}`),null}},b):null}async function G(a,b){return a?i("cursor",a,async()=>{try{let c=await new d.q().refreshToken(a);return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cursor token",{hasNewAccessToken:!!c.accessToken,hasNewRefreshToken:!!c.refreshToken,expiresIn:c.expiresIn}),c}catch(a){return b?.warn?.("TOKEN_REFRESH",`Cursor refresh failed: ${a?.message||a}`),null}},b):null}let H={"minimax-code":"https://account.minimax.cn/oauth2/token","minimax-code-global":"https://account.minimax.io/oauth2/token"};async function I(a,b,c){let d=H[a];return d&&b?i(a,b,async()=>{try{let e=await fetch(d,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:"mcode-public",scope:"agent.default",audience:"agent-backend"}).toString(),signal:AbortSignal.timeout(3e4)}),f=await e.json().catch(()=>null);if(!e.ok||f&&"string"==typeof f.error&&f.error){let b=f?.error||`HTTP ${e.status}`;if(400===e.status&&f?.error==="invalid_grant")return c?.warn?.("TOKEN_REFRESH",`MiniMax refresh token spent/rejected (${a}) — sign-in gone`),{error:"invalid_grant"};return c?.error?.("TOKEN_REFRESH",`MiniMax token refresh failed (${a})`,{status:e.status,error:b}),null}if(!f?.access_token)return c?.error?.("TOKEN_REFRESH",`MiniMax refresh returned no access_token (${a})`),null;return{accessToken:f.access_token,refreshToken:f.refresh_token||b,expiresIn:f.expires_in}}catch(b){return c?.error?.("TOKEN_REFRESH",`Error refreshing MiniMax token (${a}): ${b.message}`),null}},c):null}async function J(a,b){return a?i("nous",a,async()=>{try{let c=await fetch("https://portal.nousresearch.com/api/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-nous-refresh-token":a},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:"hermes-cli"}),signal:AbortSignal.timeout(3e4)});if(!c.ok){let a=await c.text().catch(()=>"");return b?.error?.("TOKEN_REFRESH","Failed to refresh Nous token",{status:c.status,error:a}),null}let d=await c.json();if(!d?.access_token)return b?.error?.("TOKEN_REFRESH","Nous token refresh returned no access_token"),null;let e=null,f=null,g=null;try{let a=await fetch("https://portal.nousresearch.com/api/oauth/agent-key",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${d.access_token}`},body:JSON.stringify({min_ttl_seconds:7200}),signal:AbortSignal.timeout(15e3)});if(a.ok){let c=await a.json();e=c.api_key||null,f=c.key_id||null,g=c.expires_at||null,b?.info?.("TOKEN_REFRESH","Nous agent key minted successfully")}else{let c=await a.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Failed to mint Nous agent key, falling back to access_token",{error:c})}}catch(a){b?.warn?.("TOKEN_REFRESH",`Nous agent key mint error: ${a?.message||a}`)}return{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in,apiKey:e||d.access_token,agentKey:e,providerSpecificData:{...f?{agentKeyId:f}:{},...g?{agentKeyExpiresAt:g}:{}}}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Nous token: ${a.message}`),null}},b):null}},31024:(a,b,c)=>{c.d(b,{q:()=>h});var d=c(55511),e=c.n(d),f=c(92990);function g(a){let b="string"==typeof a?a.split("."):[];if(3!==b.length||!b[1])return null;try{return JSON.parse(Buffer.from(b[1],"base64url").toString("utf8"))}catch{return null}}class h{constructor(){this.config=f.WN}getAuthorizationData(a="login"){let b=e().randomBytes(32).toString("base64url"),c=e().createHash("sha256").update(b).digest("base64url"),d=e().randomUUID(),f=new URLSearchParams({challenge:c,uuid:d,mode:a,supportsSelectedTeamLogin:"true"});return{authUrl:`${this.config.loginUrl}?${f.toString()}`,uuid:d,verifier:b,expiresIn:300}}async pollToken(a,b,c){if(!a||!b)throw Error("Cursor OAuth session is incomplete");let d=new URLSearchParams({uuid:a,verifier:b}),f=await fetch(`${this.config.pollUrl}?${d.toString()}`,{headers:{Accept:"application/json","User-Agent":"Cursor/3.12.29","x-cursor-client-type":this.config.clientType,"x-ghost-mode":"implicit-false","x-new-onboarding-completed":"false",traceparent:`00-${e().randomBytes(16).toString("hex")}-${e().randomBytes(8).toString("hex")}-01`},signal:c});if(404===f.status)return{success:!1,pending:!0,error:"authorization_pending"};if(!f.ok)throw Error(`Cursor OAuth polling failed with HTTP ${f.status}`);let g=await f.json();if(!g.accessToken||!g.refreshToken)throw Error("Cursor OAuth response was missing tokens");return{success:!0,tokens:g}}async refreshToken(a){let b;if(!a||"string"!=typeof a)throw Error("Cursor refresh token is required");for(let d=0;d<3;d+=1){var c;try{let c=await fetch(this.config.refreshUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:"{}",signal:AbortSignal.timeout(15e3)});if(c.ok){let b=await c.json();if(!b.accessToken)throw Error("Cursor refresh response was missing an access token");return this.mapTokens(b.accessToken,b.refreshToken||a)}if(429!==c.status&&c.status<500){let a=Error(`Cursor token refresh failed with HTTP ${c.status}`);throw a.retryable=!1,a}b=Error(`Cursor token refresh failed with HTTP ${c.status}`)}catch(a){if(!1===a.retryable)throw a;b=a}d<2&&await function(a){return new Promise(b=>setTimeout(b,a))}((c=d,Math.floor(300*2**c*(.8+.4*Math.random()))))}throw b||Error("Cursor token refresh failed")}mapTokens(a,b,c=null,d="oauth"){let e,f=(e=g(a),"number"==typeof e?.exp?1e3*e.exp-3e5:Date.now()+36e5),h=this.extractUserInfo(a);return{accessToken:a,refreshToken:b,...c?{machineId:c}:{},expiresAt:new Date(f).toISOString(),expiresIn:Math.max(1,Math.floor((f-Date.now())/1e3)),email:h?.email||null,providerSpecificData:{authMethod:d,...c?{machineId:c}:{},...h?.userId?{userId:h.userId}:{}}}}async validateImportToken(a,b){if(!a||"string"!=typeof a)throw Error("Access token is required");if(!b||"string"!=typeof b)throw Error("Machine ID is required");if(a.length<50)throw Error("Invalid token format. Token appears too short.");if(!/^[a-f0-9-]{32,}$/i.test(b.replace(/-/g,"")))throw Error("Invalid machine ID format. Expected UUID format.");return this.mapTokens(a,null,b,"imported")}extractUserInfo(a){let b=g(a);return b?{email:"string"==typeof b.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.email)?b.email:null,userId:b.sub||b.user_id||null}:null}getTokenStorageInstructions(){return{title:"How to import your existing Cursor session",steps:["Open Cursor IDE and make sure you're logged in",`Linux: ${this.config.tokenStoragePaths.linux}`,`macOS: ${this.config.tokenStoragePaths.macos}`,`Windows: ${this.config.tokenStoragePaths.windows}`,"Read cursorAuth/accessToken and storage.serviceMachineId from itemTable"]}}}},85640:(a,b,c)=>{c.d(b,{$B:()=>o,I9:()=>f.I9,Og:()=>i,Ql:()=>f.Ql,Sc:()=>j,Wm:()=>f.Wm,go:()=>f.go,jR:()=>f.jR,jT:()=>h,oD:()=>g,pb:()=>l,qZ:()=>p,rE:()=>f.rE});var d=c(4630),e=c(28730),f=c(21362);let g=3e5;function h(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function i(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:g}function j(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let k=new Map;async function l(a,b){let d=a.client_email,f=k.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await Promise.all([c.e(9095),c.e(1455)]).then(c.bind(c,71455));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),l=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:j})});if(!l.ok){let a=await l.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:m,expires_in:n}=await l.json(),o=Date.now()+(n??3600)*1e3;return k.set(d,{token:m,expiresAt:o}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:m,expiresAt:o}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function m(a,b){let c=j(a.apiKey);return c?l(c,b):null}let n={"frontier-for-all":(a,b)=>(0,f.go)(a.refreshToken,b),"gemini-cli":(a,b)=>(0,f.I9)(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>(0,f.I9)(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>(0,f.ge)(a.refreshToken,b),codex:(a,b)=>(0,f.Wm)(a.refreshToken,b),iflow:(a,b)=>(0,f.AH)(a.refreshToken,b),github:(a,b)=>(0,f.EF)(a.refreshToken,b),kiro:(a,b)=>(0,f.Ql)(a.refreshToken,a.providerSpecificData,b),cursor:(a,b)=>(0,f.ZP)(a.refreshToken,b),xai:(a,b)=>(0,f.r_)(a.refreshToken,b),"grok-cli":(a,b)=>(0,f.r_)(a.refreshToken,b),gcli:(a,b)=>(0,f.r_)(a.refreshToken,b),"codebuddy-cn":(a,b)=>(0,f.SO)(a.refreshToken,b),"codebuddy-intl":(a,b)=>(0,f.XB)(a.refreshToken,b),trae:(a,b)=>(0,f.RM)(a.refreshToken,a,b),cline:(a,b)=>(0,f.Il)(a.refreshToken,b),clinepass:(a,b)=>(0,f.Il)(a.refreshToken,b),zed:()=>(0,f.wt)(),windsurf:(a,b)=>(0,f.p9)(a,b),kimi:(a,b)=>(0,f.ng)(a.refreshToken,a,b),"kimi-coding":(a,b)=>(0,f.ng)(a.refreshToken,a,b),"minimax-code":(a,b)=>(0,f.rE)("minimax-code",a.refreshToken,b),"minimax-code-global":(a,b)=>(0,f.rE)("minimax-code-global",a.refreshToken,b),nous:(a,b)=>(0,f.Cw)(a.refreshToken,b),vertex:m,"vertex-partner":m};async function o(a,b,c){let d=b.refreshToken||b.providerSpecificData?.refreshToken;if(!d)return null;let e=d!==b.refreshToken?{...b,refreshToken:d}:b,g=n[a];return g?g(e,c):(0,f.J1)(a,d,e,c)}async function p(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=8254,exports.ids=[8254,8944],exports.modules={12652:(a,b,c)=>{c.d(b,{SB:()=>p,qt:()=>o,ZW:()=>q,bo:()=>l,io:()=>m,kX:()=>i,z1:()=>n});let d=["openai-compatible-","anthropic-compatible-"],e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,f="••••••••",g=new Set(["host","content-length","content-type","transfer-encoding","connection","upgrade","te","trailer","keep-alive","proxy-authorization","proxy-connection","expect","http2-settings"]),h=/[\r\n\0]|[^\u0000-\u00ff]/;function i(a){return"string"==typeof a&&d.some(b=>a.startsWith(b))}function j(a,b){return"string"==typeof a&&a?a.length>256?"Header name too long (max 256)":e.test(a)?g.has(String(a).toLowerCase())?`Header ${a} cannot be set`:"string"!=typeof b?`Invalid value for header ${a}`:b.length>4096?`Header ${a} value too long (max 4096)`:h.test(b)?`Invalid value for header ${a} (no line breaks, NUL or non-Latin-1 characters)`:null:`Invalid header name: ${a}`:"Header name is required"}function k(a){return Array.isArray(a)?a.map(a=>a&&"object"==typeof a?{name:a.name,value:a.value}:{name:a,value:void 0}):a&&"object"==typeof a?Object.entries(a).map(([a,b])=>({name:a,value:b})):null}function l(a){if(null==a||""===a)return{headers:[]};let b=k(a);if(!b)return{error:"customHeaders must be a list of { name, value }"};let c=[],d=new Set;for(let a of b){let b="string"==typeof a.name?a.name.trim():a.name;if(""===b||null==b)continue;let e=void 0===a.value||null===a.value?"":"string"==typeof a.value?a.value.trim():a.value,f=j(b,e);if(f)return{error:f};let g=b.toLowerCase();if(d.has(g))return{error:`Duplicate header name: ${b}`};d.add(g),c.push({name:b,value:e})}return c.length>20?{error:"Too many custom headers (max 20)"}:{headers:c}}function m(a,b=[]){if(void 0===a)return{headers:Array.isArray(b)?b:[]};let c=k(a);if(!c)return l(a);let d=new Map((Array.isArray(b)?b:[]).filter(a=>a&&"string"==typeof a.name).map(a=>[a.name.toLowerCase(),a.value])),e=[];for(let a of c)if(a.value===f){let b="string"==typeof a.name?a.name.trim():"";if(!b)continue;let c=d.get(b.toLowerCase());if("string"!=typeof c)return{error:`Re-enter the value for header ${b}`};e.push({name:b,value:c})}else e.push(a);return l(e)}function n(a){var b;return a&&Array.isArray(a.customHeaders)?{...a,customHeaders:Array.isArray(b=a.customHeaders)?b.filter(a=>a&&"string"==typeof a.name).map(a=>({name:a.name,value:a.value?f:""})):[]}:a}function o(a,b,c){if(!a||!Array.isArray(b)||0===b.length)return a;let d=c?.apiKey||c?.accessToken||"",e=0;for(let c of b){if(e>=20)break;if(!c||"string"!=typeof c.name)continue;let b=c.name.trim();if(j(b,c.value))continue;let f=c.value.split("{{API_KEY}}").join(d).trim();!h.test(f)&&(e++,function(a,b){let c=b.toLowerCase();for(let b of Object.keys(a))b.toLowerCase()===c&&delete a[b]}(a,b),f&&(a[b]=f))}return a}function p(a,b,c,d){return i(d)?o(a,b,c):a}function q(a,b){if(!a||!Array.isArray(b)||0===b.length)return a;let c=new Set(b.filter(a=>a&&"string"==typeof a.name).map(a=>a.name.trim().toLowerCase())),d={...a};for(let a of Object.keys(d))c.has(a.toLowerCase())&&(d[a]=f);return d}},29360:(a,b,c)=>{c.d(b,{$:()=>d});let d="claude-haiku-4-5-20251001"},38944:(a,b,c)=>{c.d(b,{S$:()=>h,Z_:()=>e,e:()=>f,s5:()=>g});let d=new(c(16698)).AsyncLocalStorage;function e(a){let b=a?.providerSpecificData||{};return{connectionProxyEnabled:!0===b.connectionProxyEnabled,connectionProxyUrl:b.connectionProxyUrl||"",connectionNoProxy:b.connectionNoProxy||"",vercelRelayUrl:b.vercelRelayUrl||"",proxyPoolId:b.connectionProxyPoolId||null,strictProxy:!0===b.strictProxy}}function f(a,b){return a?d.run(a,b):b()}function g(){return d.getStore()||null}async function h(){await c.e(9843).then(c.bind(c,89843))}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,mt:()=>d.mt,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv,xN:()=>d.xN});var d=c(89718)},88556:(a,b,c)=>{c.d(b,{PA:()=>q,er:()=>s,hX:()=>r});var d=c(40610),e=c.n(d);let f=new Set(["localhost","ip6-localhost","ip6-loopback"]),g=[".internal",".local",".localhost"];function h(a){let b=a.split(".");if(4!==b.length)return null;let c=0;for(let a of b){if(!/^\d{1,3}$/.test(a))return null;let b=Number(a);if(b>255)return null;c=256*c+b}return c>>>0}let i=[[h("0.0.0.0"),8],[h("10.0.0.0"),8],[h("100.64.0.0"),10],[h("127.0.0.0"),8],[h("169.254.0.0"),16],[h("172.16.0.0"),12],[h("192.168.0.0"),16]];function j(a){return i.some(([b,c])=>{let d=0===c?0:0xffffffff<<32-c>>>0;return(a&d)==(b&d)})}function k(a){let b=h(a);return null!==b&&j(b)}function l(a){if(""===a)return[];let b=a.split(":"),c=[];for(let a of b){if(!/^[0-9a-f]{1,4}$/.test(a))return null;c.push(parseInt(a,16))}return c}function m(a){let b,c=a.toLowerCase(),d=c.match(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/),e=null;if(d){let a=h(d[1]);if(null===a)return null;e=[a>>>16&65535,65535&a],(c=c.slice(0,c.length-d[1].length)).endsWith("::")||c.endsWith(":")&&(c=c.slice(0,-1))}let f=c.split("::");if(f.length>2)return null;if(2===f.length){let a=l(f[0]),c=l(f[1]);if(null===a||null===c)return null;let d=e?e.length:0,g=8-a.length-c.length-d;if(g<0)return null;b=[...a,...Array(g).fill(0),...c,...e||[]]}else{let a=l(c);if(null===a)return null;b=[...a,...e||[]]}return 8===b.length?b:null}function n(a){let b=b=>0===a[b];if([0,1,2,3,4,5,6].every(b)&&1===a[7]||a.every(a=>0===a)||(65472&a[0])==65152||(65024&a[0])==64512)return!0;let c=(a[6]<<16|a[7])>>>0;return!!([0,1,2,3,4].every(b)&&65535===a[5]||100===a[0]&&65435===a[1]&&[2,3,4,5].every(b)||[0,1,2,3,4,5].every(b)&&0!==c&&1!==c)&&j(c)}function o(a){return a.toLowerCase().replace(/\.+$/,"")}function p(a){if(f.has(a)||g.some(b=>a.endsWith(b))||k(a))return!0;if(a.includes(":")){let b=m(a.replace(/^\[|\]$/g,""));if(b&&n(b))return!0}return!1}function q(a){if(p(o(new URL(a).hostname)))throw Error("Blocked URL: internal host")}async function r(a){let b,c=o(new URL(a).hostname);if(p(c))throw Error("Blocked URL: internal host");let d=c.replace(/^\[|\]$/g,"");if(!(null!==h(d)||d.includes(":"))){try{b=await e().promises.lookup(c,{all:!0,verbatim:!0})}catch{return}for(let{address:a,family:c}of b)if(4===c?k(a):n(m(a)||[]))throw Error("Blocked URL: hostname resolves to an internal host")}}async function s(a,b={},{maxRedirects:c=5}={}){await r(a);let d=a;for(let a=0;;a++){let e=await fetch(d,{...b,redirect:"manual"}),f=e.status>=300&&e.status<400?e.headers.get("location"):null;if(!f)return e;if(a>=c)throw Error("Blocked URL: too many redirects");let g=new URL(f,d).toString();await r(g),d=g}}},93216:(a,b,c)=>{c.d(b,{CG:()=>n,c2:()=>f});var d=c(88556);function e(a){return a?.length?{includes:a.filter(a=>!a.startsWith("-")),excludes:a.filter(a=>a.startsWith("-")).map(a=>a.slice(1))}:{includes:[],excludes:[]}}function f(a,b){let c=a.providerOptions?.[b];if("string"==typeof c&&c.trim().length>0)return c.trim();let d=a.providerSpecificData?.[b];if("string"==typeof d&&d.trim().length>0)return d.trim()}function g(a,b){let c=a.providerOptions?.[b];return c&&"object"==typeof c&&!Array.isArray(c)?c:{}}function h(a,b,c,d){if(!b)return a;for(let e of c){let c=b[e];void 0!==c&&(!d||d(c))&&(a[e]=c)}return a}function i(a,b){if(!a||"any"===a)return{};let c={day:1,week:7,month:31,year:365}[a];return c&&b(new Date(Date.now()-24*c*36e5))||{}}function j(a,b){let c=f(b,"baseUrl");if(c){let a;try{a=new URL(c)}catch{throw Error(`Invalid baseUrl: ${c}`)}if("http:"!==a.protocol&&"https:"!==a.protocol)throw Error(`Invalid baseUrl protocol: ${a.protocol}`);(0,d.PA)(c)}return(c||a.baseUrl).replace(/\/+$/,"")}function k(a,b){if("number"==typeof a&&!(a<=0)&&!(b<=0))return Math.floor(a/b)+1}let l=new Set(["turbo","fast","basic","advanced"]),m={serper:function(a,b){let c="news"===b.searchType?"/news":"/search",d={q:b.query,num:b.maxResults};return b.country&&(d.gl=b.country.toLowerCase()),b.language&&(d.hl=b.language),{url:`${j(a,b)}${c}`,init:{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":b.token},body:JSON.stringify(d)}}},"brave-search":function(a,b){let c="news"===b.searchType?"/news/search":"/web/search",d=new URLSearchParams({q:b.query,count:String(b.maxResults)});return b.country&&d.set("country",b.country),b.language&&d.set("search_lang",b.language),{url:`${j(a,b)}${c}?${d}`,init:{method:"GET",headers:{Accept:"application/json","X-Subscription-Token":b.token}}}},perplexity:function(a,b){let c={query:b.query,max_results:b.maxResults};return b.country&&(c.country=b.country),b.language&&(c.search_language_filter=[b.language]),b.domainFilter?.length&&(c.search_domain_filter=b.domainFilter),{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b.token}`},body:JSON.stringify(c)}}},exa:function(a,b){let{includes:c,excludes:d}=e(b.domainFilter),f=g(b,"exa"),k={query:b.query,numResults:b.maxResults,type:"string"==typeof f.type?f.type:"auto",contents:{text:!0,highlights:!0}};return h(k.contents,f.contents,["text","highlights","summary","extras","subpages","subpageTarget","livecrawlTimeout","maxAgeHours"]),c.length&&(k.includeDomains=c),d.length&&(k.excludeDomains=d),"news"===b.searchType&&(k.category="news"),Object.assign(k,i(b.timeRange,a=>({startPublishedDate:a.toISOString()}))),h(k,f,["type","category","userLocation","moderation","additionalQueries","objective","systemPrompt","compliance","startPublishedDate","endPublishedDate"]),{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json","x-api-key":b.token},body:JSON.stringify(k)}}},parallel:function(a,b){if(b.searchType&&"web"!==b.searchType)throw Error("Unsupported Parallel search type");if(b.query.length>5e3)throw Error("Parallel query must not exceed 5000 characters");if(!Number.isInteger(b.maxResults)||b.maxResults<1||b.maxResults>20)throw Error("Parallel max_results must be an integer from 1 to 20");if(b.domainFilter&&(!Array.isArray(b.domainFilter)||b.domainFilter.length>200||b.domainFilter.some(a=>"string"!=typeof a)))throw Error("Parallel domain_filter must contain at most 200 domains");let{includes:c,excludes:d}=e(b.domainFilter),g=a=>a.map(a=>{let b=new URL(`https://${a.replace(/^https?:\/\//i,"")}`);if(!b.hostname)throw Error("Invalid Parallel domain filter");return`${b.hostname}${b.pathname.replace(/\/$/,"")}`}),h=f(b,"mode"),i=h&&l.has(h)?h:"fast",j=f(b,"objective")||(b.query.length>200?b.query:void 0);if(j?.length>5e3)throw Error("Parallel objective must not exceed 5000 characters");let k={search_queries:[b.query.length>200?b.query.slice(0,200).replace(/\s+\S*$/,"").trim()||b.query.slice(0,200):b.query],...j?{objective:j}:{},mode:i,advanced_settings:{max_results:b.maxResults}};if((c.length||d.length)&&(k.advanced_settings.source_policy={...c.length?{include_domains:g(c)}:{},...d.length?{exclude_domains:g(d)}:{}}),"turbo"===i&&[...k.advanced_settings.source_policy?.include_domains||[],...k.advanced_settings.source_policy?.exclude_domains||[]].some(a=>a.includes("/")))throw Error("Parallel turbo mode does not support path-prefix filters");let m=b.contentOptions?.max_characters;if(void 0!==m){if(!Number.isInteger(m)||m<1)throw Error("Parallel max_characters must be a positive integer");k.advanced_settings.excerpt_settings={max_chars_per_result:m}}let n=function(a){if(!a||"any"===a)return;let b=new Date;if("day"===a)b.setUTCDate(b.getUTCDate()-1);else if("week"===a)b.setUTCDate(b.getUTCDate()-7);else{if("month"!==a&&"year"!==a)return;let c=b.getUTCDate();b.setUTCDate(1),"month"===a?b.setUTCMonth(b.getUTCMonth()-1):b.setUTCFullYear(b.getUTCFullYear()-1);let d=new Date(Date.UTC(b.getUTCFullYear(),b.getUTCMonth()+1,0)).getUTCDate();b.setUTCDate(Math.min(c,d))}return b.toISOString().slice(0,10)}(b.timeRange);if(n&&(k.advanced_settings.source_policy={...k.advanced_settings.source_policy||{},after_date:n}),b.country){let a=b.country.toLowerCase();k.advanced_settings.location="uk"===a?"gb":a}let o=f(b,"session_id");if(o?.length>1e3)throw Error("Parallel session_id must not exceed 1000 characters");return o&&(k.session_id=o),{url:a.baseUrl,init:{method:"POST",headers:{"Content-Type":"application/json","x-api-key":b.token},body:JSON.stringify(k)}}},tavily:function(a,b){let{includes:c,excludes:d}=e(b.domainFilter),f=g(b,"tavily"),k={query:b.query,max_results:b.maxResults,topic:"string"==typeof f.topic?f.topic:b.searchType};return c.length&&(k.include_domains=c),d.length&&(k.exclude_domains=d),b.country&&(k.country=b.country),Object.assign(k,i(b.timeRange,a=>({start_date:a.toISOString().slice(0,10)}))),h(k,f,["search_depth","chunks_per_source","time_range","start_date","end_date","include_published_date","filter_by_published_date","include_answer","include_raw_content","include_images","include_image_descriptions","include_favicon","include_domains_mode","language","filter_by_language","auto_parameters","exact_match","include_usage","safe_search"]),{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b.token}`},body:JSON.stringify(k)}}},"google-pse":function(a,b){let c=b.token,d=f(b,"cx");if(!c||!d)throw Error("Google Programmable Search requires both apiKey and cx");let e=new URLSearchParams({key:c,cx:d,q:b.query,num:String(Math.min(b.maxResults,10))});if(b.country&&e.set("gl",b.country.toLowerCase()),b.language&&e.set("hl",b.language),b.timeRange&&"any"!==b.timeRange){let a={day:"d1",week:"w1",month:"m1",year:"y1"}[b.timeRange];a&&e.set("dateRestrict",a)}return"number"==typeof b.offset&&b.offset>0&&e.set("start",String(Math.min(b.offset+1,91))),{url:`${j(a,b)}?${e}`,init:{method:"GET",headers:{Accept:"application/json"}}}},linkup:function(a,b){let c=b.token;if(!c)throw Error("Linkup Search requires an API key");let{includes:d,excludes:g}=e(b.domainFilter),h=f(b,"depth"),i=h&&["fast","standard","deep"].includes(h)?h:"standard",k={q:b.query,depth:i,outputType:"searchResults",maxResults:b.maxResults};if(d.length&&(k.includeDomains=d),g.length&&(k.excludeDomains=g),b.timeRange&&"any"!==b.timeRange){let a=new Date,c=a.toISOString().slice(0,10),d=new Date(a);"day"===b.timeRange&&d.setUTCDate(d.getUTCDate()-1),"week"===b.timeRange&&d.setUTCDate(d.getUTCDate()-7),"month"===b.timeRange&&d.setUTCMonth(d.getUTCMonth()-1),"year"===b.timeRange&&d.setUTCFullYear(d.getUTCFullYear()-1),k.fromDate=d.toISOString().slice(0,10),k.toDate=c}return{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${c}`},body:JSON.stringify(k)}}},searchapi:function(a,b){let c=b.token;if(!c)throw Error("SearchAPI requires an API key");let d=new URLSearchParams({engine:"news"===b.searchType?"google_news":"google",q:b.query,api_key:c});b.country&&d.set("gl",b.country.toLowerCase()),b.language&&d.set("hl",b.language);let e=k(b.offset,b.maxResults);return e&&d.set("page",String(e)),{url:`${j(a,b)}?${d}`,init:{method:"GET",headers:{Accept:"application/json"}}}},youcom:function(a,b){let c=b.token;if(!c)throw Error("You.com Search requires an API key");let{includes:d,excludes:f}=e(b.domainFilter),g=new URLSearchParams({query:b.query,count:String(Math.min(b.maxResults,100))});return b.timeRange&&"any"!==b.timeRange&&g.set("freshness",b.timeRange),"number"==typeof b.offset&&b.offset>0&&b.maxResults>0&&g.set("offset",String(Math.min(Math.floor(b.offset/b.maxResults),9))),b.country&&g.set("country",b.country),b.language&&g.set("language",b.language),d.length&&g.set("include_domains",d.join(",")),f.length&&g.set("exclude_domains",f.join(",")),b.contentOptions?.full_page&&(g.set("livecrawl","news"===b.searchType?"news":"web"),g.append("livecrawl_formats","markdown"===b.contentOptions.format?"markdown":"html")),{url:`${j(a,b)}?${g}`,init:{method:"GET",headers:{Accept:"application/json","X-API-Key":c}}}},searxng:function(a,b){let c=j(a,b),d=c.endsWith("/search")?c:`${c}/search`,e=new URLSearchParams({q:b.query,format:"json",categories:"news"===b.searchType?"news":"general"});b.language&&e.set("language",b.language),b.timeRange&&"any"!==b.timeRange&&e.set("time_range",b.timeRange);let f=k(b.offset,b.maxResults);return f&&e.set("pageno",String(f)),{url:`${d}?${e}`,init:{method:"GET",headers:{Accept:"application/json"}}}},xquik:function(a,b){let c=b.token;if(!c)throw Error("Xquik requires an API key");let d=f(b,"queryType");if(d&&!["Latest","Top"].includes(d))throw Error("Xquik queryType must be Latest or Top");let e=new URLSearchParams({q:b.query,limit:String(b.maxResults)}),g=f(b,"cursor");return g&&e.set("cursor",g),d&&e.set("queryType",d),b.language&&e.set("language",b.language),{url:`${j(a,b)}?${e}`,init:{method:"GET",headers:{Accept:"application/json","x-api-key":c}}}},tinyfish:function(a,b){if(b.searchType&&!["web","news","research_paper"].includes(b.searchType))throw Error("Unsupported TinyFish search type");let c=new URLSearchParams({query:b.query});b.searchType&&"web"!==b.searchType&&c.set("domain_type",b.searchType),b.country&&c.set("location",b.country),b.language&&c.set("language",b.language);let{includes:d,excludes:f}=e(b.domainFilter);if(d.length&&c.set("include_domains",d.join(",")),f.length&&c.set("exclude_domains",f.join(",")),Number.isInteger(b.offset)&&b.offset>0){if(b.offset>=110)throw Error("TinyFish search offset exceeds available pages");if(b.offset%10+b.maxResults>10)throw Error("TinyFish search offset and max_results must fit within one page");c.set("page",String(Math.floor(b.offset/10)))}return{url:`${a.baseUrl}?${c}`,init:{method:"GET",headers:{Accept:"application/json","X-API-Key":b.token}}}},"ollama-search":function(a,b){let c={query:b.query,max_results:b.maxResults};return b.country&&(c.country=b.country),b.language&&(c.language=b.language),{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json",...b.token?{Authorization:`Bearer ${b.token}`}:{}},body:JSON.stringify(c)}}},glm:function(a,b){let c={jsonrpc:"2.0",id:`9r-${Date.now()}`,method:"tools/call",params:{name:"web_search_prime",arguments:{search_query:b.query,count:b.maxResults}}};return{url:j(a,b),init:{method:"POST",headers:{"Content-Type":"application/json",...b.token?{Authorization:`Bearer ${b.token}`}:{}},body:JSON.stringify(c)}}}};function n(a,b){let c=m[a.id];return c?c(a,b):{url:j(a,b),init:{method:a.method||"POST",headers:{"Content-Type":"application/json",...b.token?{Authorization:`Bearer ${b.token}`}:{}},body:JSON.stringify({query:b.query,max_results:b.maxResults,search_type:b.searchType})}}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=8306,exports.ids=[869,8306,9718],exports.modules={21148:(a,b,c)=>{"use strict";c.d(b,{x:()=>e});var d=c(39141);function e(a,b){if(!b||!d.xq[b]?.quirks?.clineEnvelope)return a;let{success:c,data:e}=a||{};return!0!==c||!e||"object"!=typeof e||Array.isArray(e)?a:e}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,hO:()=>h,oc:()=>j});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126};function h(){let a=Number.parseInt(process.env.PORT,10);return Number.isFinite(a)&&a>0?a:g.appPort}let i={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,catchUpWindowMs:18e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.6-terra",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"},antigravity:{settingsKey:"antigravityAutoPing",quotaKey:"gemini_session",minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gemini-3.8-flash-low",pingText:"hi",pingMaxTokens:1}}}},38238:(a,b,c)=>{"use strict";c.d(b,{P:()=>j});var d=c(89718),e=c(40615),f=c(21148),g=c(30869),h=c(54603);async function i(a=null){let b=null;try{let a=(await (0,d.PX)()).filter(a=>!1!==a.isActive);b=(a.find(a=>!a.access?.restricted)||a[0])?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-9r-cli-token"]=await (0,h.Xj)("9r-cli-auth"),a&&(c["x-9r-connection-id"]=a),c}async function j(a,b="llm",c=`http://127.0.0.1:${process.env.PORT||g.h0.appPort}`,d=null){let h,k=d&&"object"==typeof d,l=k?d.customPrompt:d,m=k?d.connectionId:null,n=k&&"number"==typeof d.timeoutMs?d.timeoutMs:6e4,o=await i(m),p=Date.now();if("embedding"===b){let b,d="string"==typeof l&&l.trim()?l.trim():"test";try{b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:o,body:JSON.stringify({model:a,input:d}),signal:AbortSignal.timeout(n)})}catch(b){let a=Date.now()-p;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(n/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Embedding request failed"}}let e=Date.now()-p,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0&&Array.isArray(g.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status,preview:`Embedding [${g.data[0].embedding.length} dims]`}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b,d="string"==typeof l&&l.trim()?l.trim():"test";try{b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:o,body:JSON.stringify({model:a,prompt:d}),signal:AbortSignal.timeout(n)})}catch(b){let a=Date.now()-p;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(n/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Image generation request failed"}}let e=Date.now()-p,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.msg||g?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status,preview:"Image generated successfully"}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,f,g,h=new FormData,i=(f=new DataView(e=new ArrayBuffer(44+(d=2*Math.max(1,Math.floor(4e3))))),(g=(a,b)=>{for(let c=0;c<b.length;c+=1)f.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),f.setUint32(4,36+d,!0),g(8,"WAVE"),g(12,"fmt "),f.setUint32(16,16,!0),f.setUint16(20,1,!0),f.setUint16(22,1,!0),f.setUint32(24,16e3,!0),f.setUint32(28,32e3,!0),f.setUint16(32,2,!0),f.setUint16(34,16,!0),g(36,"data"),f.setUint32(40,d,!0),new Blob([e],{type:"audio/wav"}));h.append("file",i,"test.wav"),h.append("model",a);try{b=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(o).filter(([a])=>"content-type"!==a.toLowerCase())),body:h,signal:AbortSignal.timeout(n)})}catch(b){let a=Date.now()-p;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(n/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"STT request failed"}}let j=Date.now()-p,k=await b.text().catch(()=>""),l=null;try{l=k?JSON.parse(k):null}catch{}if(!b.ok){let a=l?.error?.message||l?.msg||l?.message||l?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}let m="string"==typeof l?.text?l.text:"";return m.trim()?{ok:!0,latencyMs:j,error:null,status:b.status,preview:m}:{ok:!1,latencyMs:j,status:b.status,error:"Provider returned no transcription text for this model"}}if("tts"===b){let b=await fetch(`${c}/api/v1/audio/speech`,{method:"POST",headers:{...o,"content-type":"application/json"},body:JSON.stringify({model:a,input:"Test.",response_format:"mp3"}),signal:AbortSignal.timeout(3e4)}),d=Date.now()-p,e=new Uint8Array(await b.arrayBuffer().catch(()=>new ArrayBuffer(0))),f=e.length>512&&123!==e[0];if(!b.ok||!f){let a=new TextDecoder().decode(e.slice(0,240)),c=a;try{c=JSON.parse(a)?.error?.message||a}catch{}return{ok:!1,latencyMs:d,status:b.status,error:`HTTP ${b.status}${c?`: ${String(c).slice(0,240)}`:""}`}}return{ok:!0,latencyMs:d,error:null,status:b.status}}if("systemone"===b){let b;try{b=await fetch(`${c}/api/v1/systemone`,{method:"POST",headers:o,body:JSON.stringify({model:a,state:"Customer: I was charged twice for my order this morning.",questions:{probe:{type:"noul",instructions:"Is the customer reporting a billing problem?"}}}),signal:AbortSignal.timeout(15e3)})}catch(b){let a=Date.now()-p;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:"HTTP 504: Request timed out (15s)"};return{ok:!1,latencyMs:a,status:500,error:b.message||"System One request failed"}}let d=Date.now()-p,e=await b.text().catch(()=>""),f=null;try{f=e?JSON.parse(e):null}catch{}if(!b.ok){let a=f?.error?.message||f?.msg||f?.message||f?.error||e;return{ok:!1,latencyMs:d,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}if(!(f?.answers&&"object"==typeof f.answers&&Object.keys(f.answers).length>0))return{ok:!1,latencyMs:d,status:b.status,error:"Provider returned no answers for this model"};let g=JSON.stringify(f.answers);return{ok:!0,latencyMs:d,error:null,status:b.status,preview:g}}let q="string"==typeof l&&l.trim()?l.trim():"hi";try{h=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:o,body:JSON.stringify({model:a,max_tokens:1024,stream:!1,messages:[{role:"user",content:q}]}),signal:AbortSignal.timeout(n)})}catch(b){let a=Date.now()-p;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(n/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Chat completion request failed"}}let r=Date.now()-p,s=await h.text().catch(()=>""),t=null;try{t=s?JSON.parse(s):null}catch{}let u=(0,e.rs)(String(a).split("/")[0]);if(t=(0,f.x)(t,u),!h.ok){let a=t?.error?.message||t?.msg||t?.message||t?.error||s;return{ok:!1,latencyMs:r,error:`HTTP ${h.status}${a?`: ${String(a).slice(0,500)}`:""}`,status:h.status}}let v=t?.status,w=t?.msg||t?.message;if(null!=v&&"200"!==String(v)&&"0"!==String(v)&&w)return{ok:!1,latencyMs:r,status:h.status,error:`Provider status ${v}: ${String(w).slice(0,240)}`};if(t?.error){let a=t?.error?.message||t?.error||"Provider returned an error";return{ok:!1,latencyMs:r,status:h.status,error:String(a).slice(0,240)}}let x=Array.isArray(t?.choices)&&t.choices.length>0,y=t?.choices?.[0]||{},z=y.message?.reasoning||y.message?.reasoning_content||y.message?.thinking||y.message?.thinking_content,A=!String(y.message?.content||"").trim();if(x&&"length"===y.finish_reason&&A&&z)return{ok:!0,latencyMs:r,error:null,status:h.status,note:"reasoning-only response (length-limited)"};if(!x)return{ok:!1,latencyMs:r,status:h.status,error:"Provider returned no completion choices for this model"};let B=t?.choices?.[0]?.message?.content||t?.choices?.[0]?.text||null;return{ok:!0,latencyMs:r,error:null,status:h.status,preview:B}}},39006:a=>{"use strict";a.exports={rE:"0.6.38"}},54603:(a,b,c)=>{"use strict";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)}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,KC:()=>d.KC,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},89718:(a,b,c)=>{"use strict";c.d(b,{$e:()=>d.$e,Br:()=>d.Br,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(7547)},96487:()=>{}};
|
|
1
|
+
exports.id=8306,exports.ids=[869,8306,9718],exports.modules={21148:(a,b,c)=>{"use strict";c.d(b,{x:()=>e});var d=c(39141);function e(a,b){if(!b||!d.xq[b]?.quirks?.clineEnvelope)return a;let{success:c,data:e}=a||{};return!0!==c||!e||"object"!=typeof e||Array.isArray(e)?a:e}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,hO:()=>h,oc:()=>j});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126};function h(){let a=Number.parseInt(process.env.PORT,10);return Number.isFinite(a)&&a>0?a:g.appPort}let i={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,catchUpWindowMs:18e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.6-terra",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"},antigravity:{settingsKey:"antigravityAutoPing",quotaKey:"gemini_session",minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gemini-3.8-flash-low",pingText:"hi",pingMaxTokens:1}}}},38238:(a,b,c)=>{"use strict";c.d(b,{P:()=>k});var d=c(89718),e=c(40615),f=c(29485),g=c(21148),h=c(30869),i=c(54603);async function j(a=null){let b=null;try{let a=(await (0,d.PX)()).filter(a=>!1!==a.isActive);b=(a.find(a=>!a.access?.restricted)||a[0])?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-9r-cli-token"]=await (0,i.Xj)("9r-cli-auth"),a&&(c["x-9r-connection-id"]=a),c}async function k(a,b="llm",c=`http://127.0.0.1:${process.env.PORT||h.h0.appPort}`,d=null){let i,l=d&&"object"==typeof d,m=l?d.customPrompt:d,n=l?d.connectionId:null,o=l&&"number"==typeof d.timeoutMs?d.timeoutMs:6e4,p=await j(n),q=Date.now();if("embedding"===b){let b,d="string"==typeof m&&m.trim()?m.trim():"test";try{b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:p,body:JSON.stringify({model:a,input:d}),signal:AbortSignal.timeout(o)})}catch(b){let a=Date.now()-q;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(o/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Embedding request failed"}}let e=Date.now()-q,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0&&Array.isArray(g.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status,preview:`Embedding [${g.data[0].embedding.length} dims]`}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b,d="string"==typeof m&&m.trim()?m.trim():"test";try{b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:p,body:JSON.stringify({model:a,prompt:d}),signal:AbortSignal.timeout(o)})}catch(b){let a=Date.now()-q;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(o/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Image generation request failed"}}let e=Date.now()-q,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.msg||g?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status,preview:"Image generated successfully"}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,f,g,h=new FormData,i=(f=new DataView(e=new ArrayBuffer(44+(d=2*Math.max(1,Math.floor(4e3))))),(g=(a,b)=>{for(let c=0;c<b.length;c+=1)f.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),f.setUint32(4,36+d,!0),g(8,"WAVE"),g(12,"fmt "),f.setUint32(16,16,!0),f.setUint16(20,1,!0),f.setUint16(22,1,!0),f.setUint32(24,16e3,!0),f.setUint32(28,32e3,!0),f.setUint16(32,2,!0),f.setUint16(34,16,!0),g(36,"data"),f.setUint32(40,d,!0),new Blob([e],{type:"audio/wav"}));h.append("file",i,"test.wav"),h.append("model",a);try{b=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(p).filter(([a])=>"content-type"!==a.toLowerCase())),body:h,signal:AbortSignal.timeout(o)})}catch(b){let a=Date.now()-q;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(o/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"STT request failed"}}let j=Date.now()-q,k=await b.text().catch(()=>""),l=null;try{l=k?JSON.parse(k):null}catch{}if(!b.ok){let a=l?.error?.message||l?.msg||l?.message||l?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}let m="string"==typeof l?.text?l.text:"";return m.trim()?{ok:!0,latencyMs:j,error:null,status:b.status,preview:m}:{ok:!1,latencyMs:j,status:b.status,error:"Provider returned no transcription text for this model"}}if("tts"===b){let b=await fetch(`${c}/api/v1/audio/speech`,{method:"POST",headers:{...p,"content-type":"application/json"},body:JSON.stringify({model:a,input:"Test.",response_format:"mp3"}),signal:AbortSignal.timeout(3e4)}),d=Date.now()-q,e=new Uint8Array(await b.arrayBuffer().catch(()=>new ArrayBuffer(0))),f=e.length>512&&123!==e[0];if(!b.ok||!f){let a=new TextDecoder().decode(e.slice(0,240)),c=a;try{c=JSON.parse(a)?.error?.message||a}catch{}return{ok:!1,latencyMs:d,status:b.status,error:`HTTP ${b.status}${c?`: ${String(c).slice(0,240)}`:""}`}}return{ok:!0,latencyMs:d,error:null,status:b.status}}if("systemone"===b){let b,d="string"==typeof a?a.indexOf("/"):-1,g=d>0?a.slice(0,d):"",h=d>0?a.slice(d+1):a,i=g?(0,e.rs)(g)||g:"",j=i?(0,f.V2)(i,h)||(0,f.V2)(g,h):null,k=j?.payloadShape==="fields";try{b=await fetch(`${c}/api/v1/systemone`,{method:"POST",headers:p,body:JSON.stringify({model:a,state:"Customer: I was charged twice for my order this morning.",...k?{fields:{probe:{type:"text",instructions:"Extract the billing issue reported by the customer."}}}:{questions:{probe:{type:"noul",instructions:"Is the customer reporting a billing problem?"}}}}),signal:AbortSignal.timeout(15e3)})}catch(b){let a=Date.now()-q;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:"HTTP 504: Request timed out (15s)"};return{ok:!1,latencyMs:a,status:500,error:b.message||"System One request failed"}}let l=Date.now()-q,m=await b.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!b.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}let o=k?n?.values||n?.result?.values:n?.answers||n?.result?.answers;if(!(o&&"object"==typeof o&&Object.keys(o).length>0))return{ok:!1,latencyMs:l,status:b.status,error:k?"Provider returned no fields for this model":"Provider returned no answers for this model"};let r=JSON.stringify(o);return{ok:!0,latencyMs:l,error:null,status:b.status,preview:r}}let r="string"==typeof m&&m.trim()?m.trim():"hi";try{i=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:p,body:JSON.stringify({model:a,max_tokens:1024,stream:!1,messages:[{role:"user",content:r}]}),signal:AbortSignal.timeout(o)})}catch(b){let a=Date.now()-q;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(o/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Chat completion request failed"}}let s=Date.now()-q,t=await i.text().catch(()=>""),u=null;try{u=t?JSON.parse(t):null}catch{}let v=(0,e.rs)(String(a).split("/")[0]);if(u=(0,g.x)(u,v),!i.ok){let a=u?.error?.message||u?.msg||u?.message||u?.error||t;return{ok:!1,latencyMs:s,error:`HTTP ${i.status}${a?`: ${String(a).slice(0,500)}`:""}`,status:i.status}}let w=u?.status,x=u?.msg||u?.message;if(null!=w&&"200"!==String(w)&&"0"!==String(w)&&x)return{ok:!1,latencyMs:s,status:i.status,error:`Provider status ${w}: ${String(x).slice(0,240)}`};if(u?.error){let a=u?.error?.message||u?.error||"Provider returned an error";return{ok:!1,latencyMs:s,status:i.status,error:String(a).slice(0,240)}}let y=Array.isArray(u?.choices)&&u.choices.length>0,z=u?.choices?.[0]||{},A=z.message?.reasoning||z.message?.reasoning_content||z.message?.thinking||z.message?.thinking_content,B=!String(z.message?.content||"").trim();if(y&&"length"===z.finish_reason&&B&&A)return{ok:!0,latencyMs:s,error:null,status:i.status,note:"reasoning-only response (length-limited)"};if(!y)return{ok:!1,latencyMs:s,status:i.status,error:"Provider returned no completion choices for this model"};let C=u?.choices?.[0]?.message?.content||u?.choices?.[0]?.text||null;return{ok:!0,latencyMs:s,error:null,status:i.status,preview:C}}},39006:a=>{"use strict";a.exports={rE:"0.6.39"}},54603:(a,b,c)=>{"use strict";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)}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,KC:()=>d.KC,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},89718:(a,b,c)=>{"use strict";c.d(b,{$e:()=>d.$e,Br:()=>d.Br,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(7547)},96487:()=>{}};
|