@synthever/jrouter 1.0.0 → 1.0.2
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 +14 -14
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +2 -2
- 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_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_client-reference-manifest.js +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_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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/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_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +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_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_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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +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/logout/route.js +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/start/route.js +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/reset-password/route.js +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/metadata/route.js +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/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -9
- 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/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +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/crush-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +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/grok-build-settings/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +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/pi-settings/route.js +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/combos/[id]/route.js +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/route.js +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/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +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]/secret/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- 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/elevenlabs/voices/route.js +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/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/check-all/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/config/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/model/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/run-scheduled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/model-health/summary/route.js +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/availability/route.js +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/custom/route.js +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/limits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +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/codex/bulk-import/route.js +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/cursor/import/route.js +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/grok-cli/bulk-import/route.js +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/kiro/api-key/route.js +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-cli-proxy/route.js +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/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +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/pricing/route.js +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/route.js +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/providers/[id]/connections/keys/route.js +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]/overrides/route.js +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/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +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]/test/route.js +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/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +4 -4
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +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/pxpipe/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +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/stats/route.js +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/stop/route.js +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/proxy-test/route.js +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/route.js +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/stream/route.js +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/translate/route.js +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]/codex-reset-credits/route.js +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/chart/route.js +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/logs/route.js +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/request-details/route.js +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/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +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/messages/count_tokens/route.js +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/version/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/health.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/health.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/health.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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest.body +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 +14 -14
- package/app/.next-cli-build/server/chunks/1133.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +2 -2
- package/app/.next-cli-build/server/chunks/2132.js +1 -1
- package/app/.next-cli-build/server/chunks/2524.js +1 -1
- package/app/.next-cli-build/server/chunks/2732.js +1 -1
- package/app/.next-cli-build/server/chunks/2760.js +1 -1
- package/app/.next-cli-build/server/chunks/3192.js +1 -1
- package/app/.next-cli-build/server/chunks/3360.js +1 -1
- package/app/.next-cli-build/server/chunks/3535.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +6 -6
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +3 -3
- package/app/.next-cli-build/server/chunks/4152.js +1 -1
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/455.js +1 -1
- package/app/.next-cli-build/server/chunks/4642.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4764.js +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/4864.js +6 -6
- package/app/.next-cli-build/server/chunks/5299.js +25 -25
- package/app/.next-cli-build/server/chunks/5330.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +2 -2
- package/app/.next-cli-build/server/chunks/6296.js +5 -5
- package/app/.next-cli-build/server/chunks/735.js +1 -1
- package/app/.next-cli-build/server/chunks/7373.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/8126.js +1 -1
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8432.js +1 -1
- package/app/.next-cli-build/server/chunks/8749.js +1 -1
- package/app/.next-cli-build/server/chunks/9032.js +1 -1
- package/app/.next-cli-build/server/chunks/9046.js +1 -1
- package/app/.next-cli-build/server/chunks/9128.js +1 -1
- package/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +2 -2
- 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-b2785838003873e1.js → 1321-9eb7d54c5b900efb.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-66e7c2a2b715a638.js → 5497-973a06c94a94aff7.js} +1 -1
- package/app/.next-cli-build/static/chunks/761-1bcb7334763d5645.js +132 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-9f4426c30039c7d5.js → page-3960bffd1fddbbad.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-0c7b45a45ba51753.js → page-61b17862582ff807.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-de6dfc43c2687bd8.js → page-1a560f2b5cdf2e31.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-4c6b176d5c59d8a4.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-e631d28dd402dc1e.js → page-d0031965cf7eff51.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/landing/{page-431f7e8093b8ca51.js → page-5bc39b166588b878.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/login/{page-80c4e229a5f38a6b.js → page-f2b166590b653d36.js} +1 -1
- package/app/custom-server.js +2 -2
- package/app/package.json +1 -1
- package/app/src/lib/oauth/providers/xiaomi-mimo.js +2 -2
- package/app/src/lib/updater/updater.js +3 -3
- package/app/src/mitm/server.js +10 -10
- package/cli.js +6 -6
- package/hooks/postinstall.js +2 -2
- package/hooks/sqliteRuntime.js +2 -2
- package/hooks/trayRuntime.js +3 -3
- package/package.json +7 -3
- package/src/cli/api/client.js +3 -3
- package/src/cli/commands/connect.js +3 -3
- package/src/cli/commands/connectTools.js +12 -12
- package/src/cli/commands/xaiVideo.js +1 -1
- package/src/cli/menus/cliTools.js +18 -18
- package/src/cli/menus/settings.js +1 -1
- package/src/cli/tray/autostart.js +1 -1
- package/app/.next-cli-build/static/chunks/761-57ed45cdddcf32eb.js +0 -132
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-316b3186a841d862.js +0 -1
- /package/app/.next-cli-build/static/{fjLlI_-eBYMOp6J-a-q-6 → MDZXE-9g1sq006f6JNky9}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{fjLlI_-eBYMOp6J-a-q-6 → MDZXE-9g1sq006f6JNky9}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";exports.id=9489,exports.ids=[9489],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\\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\\Python313\\Scripts`]:["/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}}).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.execSync)(`${b} --version`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).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}}}}},17603:(a,b,c)=>{c.d(b,{R8:()=>l,ar:()=>n,vB:()=>j});var d=c(24);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){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"}function k(a,b){let c=a.indexOf("/"),e=c>0?a.slice(0,c):"",f=c>0?a.slice(c+1):a,g=(0,d.getCapabilitiesForModel)(e,f);return b.every(a=>!0===g[a])}function l(a,b,c){let d=[...b||[]].filter(a=>f.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>k(a,d)))return a;let g=(function(a){let b=new Set,c=[];for(let d of e){let{enabled:e,models:f}=i(d,a);if(e)for(let a of f)b.has(a)||(b.add(a),c.push(a))}return c})(c).filter(b=>!a.includes(b)&&k(b,d));return 0===g.length?a:[...g,...a]}function m(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 n(a,b){let c=new Set(b);return 0===c.size?a:(b,e,...f)=>{if(c.has(e)){let a=e.indexOf("/"),c=a>0?e.slice(0,a):"",f=a>0?e.slice(a+1):e,{contextWindow:g}=(0,d.getCapabilitiesForModel)(c,f);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,n=.8*(b||2e5)*4,o=k.slice(0,6),p=f.concat(o,j).reduce((a,b)=>a+m(l(b)),0);for(;p>n&&o.length>0;)p-=m(l(o.pop()));return o.length===k.length?a:{...a,[c]:[...f,...o,...j]}}(b,g)}return a(b,e,...f)}}},46634:(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}}},46945:(a,b,c)=>{c.d(b,{V:()=>e});let d=/\[1m\]$/i;function e(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(d);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}},57615:(a,b,c)=>{c.d(b,{c:()=>r});var d=c(36366),e=c(89718),f=c(97914),g=c(38775),h=c(73483),i=c(58920),j=c(46945),k=c(40615),l=c(2818),m=c(79494),n=c(43438),o=c(66972),p=c(27226);async function q(a){return["GET","HEAD"].includes(a.method)?{}:a.headers.get("content-type")?.includes("multipart/form-data")?Object.fromEntries([...(await a.clone().formData()).entries()].filter(([,a])=>"string"==typeof a)):a.clone().json()}async function r(a,b,{family:c=null,model:s=null,billable:t=!0}={}){let u,v;if((0,n.NE)())return b(a);try{let r,x=await (0,e.mt)(),y=await (0,p.R)(a);if(!y){if(x.requireApiKey)throw new m.wY(401,"invalid_api_key","Missing API key.");return b(a)}try{r=await q(a)}catch{throw new m.wY(400,"invalid_request","Invalid request body.")}if(!r||"object"!=typeof r||Array.isArray(r))throw new m.wY(400,"invalid_request","Request body must be an object.");let z=new URL(a.url).pathname,A=c||(r.generationConfig?.responseModalities?.includes("AUDIO")?"audio":(0,l.MH)(z));if(null!==y.allowedEndpoints&&!y.allowedEndpoints.includes(A))throw new m.wY(403,"endpoint_not_allowed","This endpoint is not allowed for this API key.");let B=(0,j.V)(s||("web"===A?r.provider||r.model:r.model||r.provider)||"").model,C="web"===A?async a=>({provider:(0,k.rs)(a),model:z.endsWith("/fetch")?"fetch":"search"}):g.mA,D={},E=null,F=!1;if(B){let a=await (0,g.d_)(B);F=!!a;try{D=a?{provider:null,model:B}:await C(B)}catch(a){if(a?.statusCode)throw new m.wY(a.statusCode,"invalid_model",a.message);throw a}if(a?(0,m.ox)({...y,allowedModels:[]},[B]):(0,m.ox)(y,(0,n.yl)(B,D)),D.provider&&(E=await (0,f.getPricingForModel)(D.provider,D.model)),null!==y.maxCostUsd&&t){if(a){let b=await Promise.all(a.map(async a=>{let b=await C(a);return(0,f.getPricingForModel)(b.provider,b.model)}));b.every(a=>a&&Number.isFinite(a.input)&&Number.isFinite(a.output))&&(E={input:Math.max(...b.map(a=>a.input)),output:Math.max(...b.map(a=>a.output))})}if(!E||!Number.isFinite(E.input)||!Number.isFinite(E.output))throw new m.wY(403,"pricing_unavailable","Cost quota requires model pricing. Configure pricing or use a key without a cost quota.")}}else if(y.allowedModels.length&&t)throw new m.wY(403,"model_not_allowed","A model is required for this API key's model restrictions.");if(null!==y.maxCostUsd&&t&&(!E||!Number.isFinite(E.input)||!Number.isFinite(E.output)))throw new m.wY(403,"pricing_unavailable","Cost quota requires model pricing. Configure pricing or use a key without a cost quota.");let G="chat"===A||"audio"===A?(0,m.pB)(r,y.maxOutputTokens):r;if(G!==r&&!a.headers.get("content-type")?.includes("multipart/form-data")&&!["GET","HEAD"].includes(a.method)){let b=new Headers(a.headers);b.delete("content-length"),a=new Request(a.url,{method:a.method,headers:b,body:JSON.stringify(G),signal:a.signal})}let H=t?(0,h.bC)(G):0,I=t&&"chat"===A?G.max_tokens??G.max_completion_tokens??G.max_output_tokens??G.generationConfig?.maxOutputTokens??G.options?.num_predict??l.Ln:0,J=E?(0,i.calculateCostFromTokens)({prompt_tokens:H,completion_tokens:I},E):0;v=await (0,d.c)();let K=(0,o.ft)(v,y.id,{tokens:H+Math.max(0,I),cost:J},Date.now());u={...K,policy:y,requestedModel:B,isCombo:F,resolvedModel:D,pending:new Set,accounted:!1};let L=await n.ZP.run(u,()=>b(a));!L.ok&&u.modelPolicyError&&(L=u.modelPolicyError.response());let M=function(a){let b,c,d,e,f,g,i,j,k=new TextDecoder,l="",m=0,n=0,o=!1,p=0,q={cached_tokens:0,cache_creation_input_tokens:0,reasoning_tokens:0},r=a.includes("text/event-stream"),s=a.includes("json");function t(a){let b=(0,h._6)(Object.hasOwn(a,"promptTokenCount")?{prompt_tokens:a.promptTokenCount,completion_tokens:a.candidatesTokenCount,cached_tokens:a.cachedContentTokenCount,reasoning_tokens:a.thoughtsTokenCount}:a);if(b){for(let a of(m=Math.max(m,b.prompt_tokens||0),n=Math.max(n,b.completion_tokens||0),Object.keys(q)))q[a]=Math.max(q[a],b[a]||0);o=!0}}let u=(b=!1,c=!1,d="",e=null,f=null,g=[],i=null,j=0,a=>{for(let h of a){if(null!==i&&(i.length<65536?i+=h:i=null),b){c?(c=!1,d.length<64&&(d+=h)):"\\"===h?(c=!0,d.length<64&&(d+=h)):'"'===h?(b=!1,e=d):d.length<64&&(d+=h);continue}if('"'===h)b=!0,d="";else if(":"===h)f=e,e=null;else if("{"===h){let a=g.at(-1),b="usage"===f||"usageMetadata"===f;null===i&&b&&(1===g.length||2===g.length&&["response","message"].includes(a))&&(i="{",j=g.length+1),g.push(f),f=null,e=null}else if("}"===h){if(null!==i&&g.length===j){try{t(JSON.parse(i))}catch{}i=null}g.pop(),e=null,f=null}else/\s/.test(h)||(e=null,f=null)}});function v(a){try{let b=JSON.parse(a),c=b.usage||b.response?.usage||b.message?.usage||b.usageMetadata;c&&t(c);let d=b.choices?.[0]?.delta?.content||b.choices?.[0]?.message?.content||b.delta?.text||("string"==typeof b.delta?b.delta:"");"string"==typeof d&&(p+=d.length)}catch{}}return{push(a){if(!s&&!r)return;let b=k.decode(a,{stream:!0});if(s&&!r&&u(b),l+=b,r){let a=l.split("\n");for(let b of(l=a.pop(),a))b.startsWith("data:")&&v(b.slice(5).trim())}l.length>1048576&&(l=l.slice(-65536))},result:()=>(s?v(l):l.startsWith("data:")&&v(l.slice(5).trim()),{hasUsage:o,input:m,output:o?n:(0,h.oT)(p),tokens:{...q,prompt_tokens:m,completion_tokens:n}})}}(L.headers.get("content-type")||""),N=!1;async function w(){if(N)return;N=!0,await Promise.allSettled([...u.pending]);let a=u.resolvedModel?.provider?await (0,f.getPricingForModel)(u.resolvedModel.provider,u.resolvedModel.model):E;v.transaction(()=>{if(L.ok&&t&&!u.accounted){let b=M.result(),c=b.hasUsage?b.input:H,d=b.output;(0,o.QE)(v,K,c+d,a?(0,i.calculateCostFromTokens)({...b.tokens,prompt_tokens:c,completion_tokens:d},a):0)}(0,o.Cu)(v,K)})}if(!L.ok||!L.body)return await w(),L;let O=L.body.getReader(),P=new ReadableStream({async pull(a){try{let{value:b,done:c}=await n.ZP.run(u,()=>O.read());c?(await w(),a.close()):(M.push(b),a.enqueue(b))}catch(b){await w(),a.error(b)}},async cancel(a){try{await n.ZP.run(u,()=>O.cancel(a))}finally{await w()}}});return new Response(P,{status:L.status,statusText:L.statusText,headers:L.headers})}catch(a){if(u&&v&&(await Promise.allSettled([...u.pending]),(0,o.Cu)(v,u)),a instanceof m.wY)return a.response();throw a}}},74388:(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()}}},79489:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{P:()=>C});var e=c(48895),f=c(57615),g=c(80238),h=c(45974),i=c(89718),j=c(50830),k=c(38775),l=c(92500),m=c(3894),n=c(46634),o=c(74388),p=c(43659),q=c(48136),r=c(18910),s=c(17603),t=c(27349),u=c(41004),v=c(14170),w=c(7803),x=c(67828),y=c(38160),z=c(46945),A=c(27811),B=a([e,l]);async function C(a,b=null){return(0,f.c)(a,a=>D(a,b),{family:"chat"})}async function D(a,b=null){let c;try{c=await a.json()}catch{return w.warn("CHAT","Invalid JSON body"),(0,p.yj)(u.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:c,headers:Object.fromEntries(a.headers.entries())});let{model:d,contextMarker:e}=(0,z.V)(c.model);e&&(c.model=d);let f=a.headers.get("Authorization"),h=(0,g.Tr)(a);if(f&&h){let a=w.maskKey(h);w.debug("AUTH",`API Key: ${a}`)}else w.debug("AUTH","No API key provided (local mode)");let j=await (0,i.mt)();if(j.requireApiKey){if(!h)return w.warn("AUTH","Missing API key (requireApiKey=true)"),(0,p.yj)(u.gx.UNAUTHORIZED,"Missing API key");if(!await (0,g.kI)(h))return w.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,p.yj)(u.gx.UNAUTHORIZED,"Invalid API key")}if(!d)return w.warn("CHAT","Missing model"),(0,p.yj)(u.gx.BAD_REQUEST,"Missing model");let l=await (0,A.TM)(a),m=await (0,A.cI)(l,d);if(m)return m;let n=a?.headers?.get("user-agent")||"",o=(0,t.c)(c,d,n,!!j.ccFilterNaming);if(o)return o.response||o;let q=(0,r.t8)(c),v=await (0,k.d_)(d);if(v){c=await F(c,d,a,b);let e=j.comboStrategies||{},f=e[d]?.fallbackStrategy||j.comboStrategy||"fallback",g=await (0,A.Ge)(l,(0,s.R8)(v,q,j),v),i=g.filter(a=>!v.includes(a));if("fusion"===f)return w.info("CHAT",`Combo "${d}" with ${v.length} models (strategy: fusion)`),(0,r.vt)({body:c,models:v,handleSingleModel:(c,d,e)=>{let f=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};f={...b,body:d}}return E(c,d,f,a,h)},log:w,comboName:d,judgeModel:e[d]?.judgeModel,tuning:e[d]?.fusionTuning});let k=j.comboStickyRoundRobinLimit;return w.info("CHAT",`Combo "${d}" with ${g.length} models (strategy: ${f}, sticky: ${k})`),(0,r.Pr)({body:c,models:g,handleSingleModel:(0,s.ar)((c,d)=>E(c,d,b,a,h),i),log:w,comboName:d,comboStrategy:f,comboStickyLimit:k})}let x=await (0,A.Ge)(l,(0,s.R8)([d],q,j),[d]);if(x.length>1){let e=x.filter(a=>a!==d);return w.info("CHAT",`Capacity adapter for [${[...q].join(",")}] on "${d}" → trying ${x.join(", ")}`),(0,r.Pr)({body:c,models:x,handleSingleModel:(0,s.ar)((c,d)=>E(c,d,b,a,h),e),log:w,comboName:d,comboStrategy:(0,s.vB)(q,j)})}return E(c,d,b,a,h,e?`${d.slice(d.indexOf("/")+1)}[${e}]`:null)}async function E(a,b,c=null,d=null,e=null,f=null){let j;try{j=await (0,k.mA)(b)}catch(a){if(a?.statusCode)return w.warn("CHAT",`Model "${b}" unavailable: ${a.message}`),(0,p.yj)(a.statusCode,a.message);throw a}if(!j.provider){let f=await (0,k.d_)(b);if(f){a=await F(a,b,d,c);let g=await (0,i.mt)(),h=g.comboStrategies||{},j=h[b]?.fallbackStrategy||g.comboStrategy||"fallback",k=(0,r.t8)(a),l=await (0,A.TM)(d),m=await (0,A.Ge)(l,(0,s.R8)(f,k,g),f),n=m.filter(a=>!f.includes(a));if("fusion"===j)return w.info("CHAT",`Combo "${b}" with ${f.length} models (strategy: fusion)`),(0,r.vt)({body:a,models:f,handleSingleModel:(a,b,f)=>{let g=c;if(f&&c){let{tools:a,tool_choice:b,...d}=c.body||{};g={...c,body:d}}return E(a,b,g,d,e)},log:w,comboName:b,judgeModel:h[b]?.judgeModel,tuning:h[b]?.fusionTuning});let o=g.comboStickyRoundRobinLimit;return w.info("CHAT",`Combo "${b}" with ${m.length} models (strategy: ${j}, sticky: ${o})`),(0,r.Pr)({body:a,models:m,handleSingleModel:(0,s.ar)((a,b)=>E(a,b,c,d,e),n),log:w,comboName:b,comboStrategy:j,comboStickyLimit:o})}return w.warn("CHAT","Invalid model format",{model:b}),(0,p.yj)(u.gx.BAD_REQUEST,"Invalid model format")}let{provider:t,model:z}=j,B=d?.headers?.get("user-agent")||"",C=new Set,D=null,G=null,H=null;for(;;){let b=await (0,g.c1)(t,C,z,{requestedModel:f||z});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=D||b.lastError||"Unavailable",c=u.gx.SERVICE_UNAVAILABLE;return w.warn("CHAT",`[${t}/${z}] ${a} (${b.retryAfterHuman})`),(0,p.wO)(c,`[${t}/${z}] ${a}`,b.retryAfter,b.retryAfterHuman,H)}if(0===C.size)return w.warn("AUTH",`No active credentials for provider: ${t}`),(0,p.yj)(u.gx.NOT_FOUND,`No active credentials for provider: ${t}`);return w.warn("CHAT","No more accounts available",{provider:t}),(0,p.yj)(G||u.gx.SERVICE_UNAVAILABLE,D||"All accounts unavailable",H)}let j=await (0,x.checkAndRefreshToken)(t,b);if(("antigravity"===t||"gemini-cli"===t)&&!j.projectId){let a=await (0,y.eG)(b.connectionId,j.accessToken,t);a&&(j.projectId=a,(0,x.vN)(b.connectionId,{projectId:a}).catch(()=>{}))}let k=await (0,i.mt)(),r=(k.providerThinking||{})[t]||null,s=await (0,l.wk)({body:{...a,model:`${t}/${z}`},modelInfo:{provider:t,model:z},credentials:j,log:w,clientRawRequest:c,connectionId:b.connectionId,userAgent:B,apiKey:e,ccFilterNaming:!!k.ccFilterNaming,rtkEnabled:!!k.rtkEnabled,headroomEnabled:!!k.headroomEnabled,headroomUrl:k.headroomUrl||m.ag,headroomCompressUserMessages:!!k.headroomCompressUserMessages,headroomTimeoutMs:k.headroomTimeoutMs,cavemanEnabled:!!k.cavemanEnabled,cavemanLevel:k.cavemanLevel||"full",ponytailEnabled:!!k.ponytailEnabled,ponytailLevel:k.ponytailLevel||"full",pxpipeEnabled:!!k.pxpipeEnabled,pxpipeMinChars:k.pxpipeMinChars,pxpipeTimeoutMs:k.pxpipeTimeoutMs,pxpipeTransform:k.pxpipeEnabled?await (0,n.RG)():null,onPxpipeEvent:o.T0,providerThinking:r,providerOverrides:(k.providerOverrides||{})[t]||null,sourceFormatOverride:d?.url?(0,v.t)(new URL(d.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,x.vN)(b.connectionId,{...a,existingProviderSpecificData:b.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,g.Pt)(b.connectionId,b,z),(0,h.vO)(b.connectionId,z)}});if(s.success)return s.response;let A=null,E=s.resetsAtMs;if("antigravity"===t&&(409===s.status||429===s.status)&&(A=await (0,h.XJ)(b.connectionId,s.status,z,j.accessToken,b.providerSpecificData))&&(E=A),"antigravity"===t&&A||(await (0,g.vk)(b.connectionId,s.status,s.error,t,z,E)).shouldFallback){w.warn("FALLBACK",`⇄ ACC:${b.connectionName} UNAVAILABLE (${s.status}) → NEXT ACCOUNT`),C.add(b.connectionId),D=s.error,G=s.status,H=(0,q.d)(s.response?.headers);continue}return s.response}}async function F(a,b,c,d){let e=await (0,i.Dj)(b),f=d?.body?.model||a.model||b,g=c?.url?(0,v.t)(new URL(c.url).pathname,a):null,h=(0,j.YK)(a,e,{requestedModel:f,sourceFormat:g});return h!==a&&w.info("COMBO","Prompt injection applied",{combo:b,requestedModel:f,displayIdentity:e.displayIdentity||null,mode:e.promptInjectionMode||"prepend"}),h}[e,l]=B.then?(await B)():B,d()}catch(a){d(a)}})},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=9489,exports.ids=[9489],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\\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\\Python313\\Scripts`]:["/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}}).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.execSync)(`${b} --version`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).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}}}}},17603:(a,b,c)=>{c.d(b,{R8:()=>l,ar:()=>n,vB:()=>j});var d=c(24);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){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"}function k(a,b){let c=a.indexOf("/"),e=c>0?a.slice(0,c):"",f=c>0?a.slice(c+1):a,g=(0,d.getCapabilitiesForModel)(e,f);return b.every(a=>!0===g[a])}function l(a,b,c){let d=[...b||[]].filter(a=>f.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>k(a,d)))return a;let g=(function(a){let b=new Set,c=[];for(let d of e){let{enabled:e,models:f}=i(d,a);if(e)for(let a of f)b.has(a)||(b.add(a),c.push(a))}return c})(c).filter(b=>!a.includes(b)&&k(b,d));return 0===g.length?a:[...g,...a]}function m(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 n(a,b){let c=new Set(b);return 0===c.size?a:(b,e,...f)=>{if(c.has(e)){let a=e.indexOf("/"),c=a>0?e.slice(0,a):"",f=a>0?e.slice(a+1):e,{contextWindow:g}=(0,d.getCapabilitiesForModel)(c,f);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,n=.8*(b||2e5)*4,o=k.slice(0,6),p=f.concat(o,j).reduce((a,b)=>a+m(l(b)),0);for(;p>n&&o.length>0;)p-=m(l(o.pop()));return o.length===k.length?a:{...a,[c]:[...f,...o,...j]}}(b,g)}return a(b,e,...f)}}},46634:(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}}},46945:(a,b,c)=>{c.d(b,{V:()=>e});let d=/\[1m\]$/i;function e(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(d);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}},57615:(a,b,c)=>{c.d(b,{c:()=>r});var d=c(36366),e=c(89718),f=c(97914),g=c(38775),h=c(73483),i=c(58920),j=c(46945),k=c(40615),l=c(2818),m=c(79494),n=c(43438),o=c(66972),p=c(27226);async function q(a){return["GET","HEAD"].includes(a.method)?{}:a.headers.get("content-type")?.includes("multipart/form-data")?Object.fromEntries([...(await a.clone().formData()).entries()].filter(([,a])=>"string"==typeof a)):a.clone().json()}async function r(a,b,{family:c=null,model:s=null,billable:t=!0}={}){let u,v;if((0,n.NE)())return b(a);try{let r,x=await (0,e.mt)(),y=await (0,p.R)(a);if(!y){if(x.requireApiKey)throw new m.wY(401,"invalid_api_key","Missing API key.");return b(a)}try{r=await q(a)}catch{throw new m.wY(400,"invalid_request","Invalid request body.")}if(!r||"object"!=typeof r||Array.isArray(r))throw new m.wY(400,"invalid_request","Request body must be an object.");let z=new URL(a.url).pathname,A=c||(r.generationConfig?.responseModalities?.includes("AUDIO")?"audio":(0,l.MH)(z));if(null!==y.allowedEndpoints&&!y.allowedEndpoints.includes(A))throw new m.wY(403,"endpoint_not_allowed","This endpoint is not allowed for this API key.");let B=(0,j.V)(s||("web"===A?r.provider||r.model:r.model||r.provider)||"").model,C="web"===A?async a=>({provider:(0,k.rs)(a),model:z.endsWith("/fetch")?"fetch":"search"}):g.mA,D={},E=null,F=!1;if(B){let a=await (0,g.d_)(B);F=!!a;try{D=a?{provider:null,model:B}:await C(B)}catch(a){if(a?.statusCode)throw new m.wY(a.statusCode,"invalid_model",a.message);throw a}if(a?(0,m.ox)({...y,allowedModels:[]},[B]):(0,m.ox)(y,(0,n.yl)(B,D)),D.provider&&(E=await (0,f.getPricingForModel)(D.provider,D.model)),null!==y.maxCostUsd&&t){if(a){let b=await Promise.all(a.map(async a=>{let b=await C(a);return(0,f.getPricingForModel)(b.provider,b.model)}));b.every(a=>a&&Number.isFinite(a.input)&&Number.isFinite(a.output))&&(E={input:Math.max(...b.map(a=>a.input)),output:Math.max(...b.map(a=>a.output))})}if(!E||!Number.isFinite(E.input)||!Number.isFinite(E.output))throw new m.wY(403,"pricing_unavailable","Cost quota requires model pricing. Configure pricing or use a key without a cost quota.")}}else if(y.allowedModels.length&&t)throw new m.wY(403,"model_not_allowed","A model is required for this API key's model restrictions.");if(null!==y.maxCostUsd&&t&&(!E||!Number.isFinite(E.input)||!Number.isFinite(E.output)))throw new m.wY(403,"pricing_unavailable","Cost quota requires model pricing. Configure pricing or use a key without a cost quota.");let G="chat"===A||"audio"===A?(0,m.pB)(r,y.maxOutputTokens):r;if(G!==r&&!a.headers.get("content-type")?.includes("multipart/form-data")&&!["GET","HEAD"].includes(a.method)){let b=new Headers(a.headers);b.delete("content-length"),a=new Request(a.url,{method:a.method,headers:b,body:JSON.stringify(G),signal:a.signal})}let H=t?(0,h.bC)(G):0,I=t&&"chat"===A?G.max_tokens??G.max_completion_tokens??G.max_output_tokens??G.generationConfig?.maxOutputTokens??G.options?.num_predict??l.Ln:0,J=E?(0,i.calculateCostFromTokens)({prompt_tokens:H,completion_tokens:I},E):0;v=await (0,d.c)();let K=(0,o.ft)(v,y.id,{tokens:H+Math.max(0,I),cost:J},Date.now());u={...K,policy:y,requestedModel:B,isCombo:F,resolvedModel:D,pending:new Set,accounted:!1};let L=await n.ZP.run(u,()=>b(a));!L.ok&&u.modelPolicyError&&(L=u.modelPolicyError.response());let M=function(a){let b,c,d,e,f,g,i,j,k=new TextDecoder,l="",m=0,n=0,o=!1,p=0,q={cached_tokens:0,cache_creation_input_tokens:0,reasoning_tokens:0},r=a.includes("text/event-stream"),s=a.includes("json");function t(a){let b=(0,h._6)(Object.hasOwn(a,"promptTokenCount")?{prompt_tokens:a.promptTokenCount,completion_tokens:a.candidatesTokenCount,cached_tokens:a.cachedContentTokenCount,reasoning_tokens:a.thoughtsTokenCount}:a);if(b){for(let a of(m=Math.max(m,b.prompt_tokens||0),n=Math.max(n,b.completion_tokens||0),Object.keys(q)))q[a]=Math.max(q[a],b[a]||0);o=!0}}let u=(b=!1,c=!1,d="",e=null,f=null,g=[],i=null,j=0,a=>{for(let h of a){if(null!==i&&(i.length<65536?i+=h:i=null),b){c?(c=!1,d.length<64&&(d+=h)):"\\"===h?(c=!0,d.length<64&&(d+=h)):'"'===h?(b=!1,e=d):d.length<64&&(d+=h);continue}if('"'===h)b=!0,d="";else if(":"===h)f=e,e=null;else if("{"===h){let a=g.at(-1),b="usage"===f||"usageMetadata"===f;null===i&&b&&(1===g.length||2===g.length&&["response","message"].includes(a))&&(i="{",j=g.length+1),g.push(f),f=null,e=null}else if("}"===h){if(null!==i&&g.length===j){try{t(JSON.parse(i))}catch{}i=null}g.pop(),e=null,f=null}else/\s/.test(h)||(e=null,f=null)}});function v(a){try{let b=JSON.parse(a),c=b.usage||b.response?.usage||b.message?.usage||b.usageMetadata;c&&t(c);let d=b.choices?.[0]?.delta?.content||b.choices?.[0]?.message?.content||b.delta?.text||("string"==typeof b.delta?b.delta:"");"string"==typeof d&&(p+=d.length)}catch{}}return{push(a){if(!s&&!r)return;let b=k.decode(a,{stream:!0});if(s&&!r&&u(b),l+=b,r){let a=l.split("\n");for(let b of(l=a.pop(),a))b.startsWith("data:")&&v(b.slice(5).trim())}l.length>1048576&&(l=l.slice(-65536))},result:()=>(s?v(l):l.startsWith("data:")&&v(l.slice(5).trim()),{hasUsage:o,input:m,output:o?n:(0,h.oT)(p),tokens:{...q,prompt_tokens:m,completion_tokens:n}})}}(L.headers.get("content-type")||""),N=!1;async function w(){if(N)return;N=!0,await Promise.allSettled([...u.pending]);let a=u.resolvedModel?.provider?await (0,f.getPricingForModel)(u.resolvedModel.provider,u.resolvedModel.model):E;v.transaction(()=>{if(L.ok&&t&&!u.accounted){let b=M.result(),c=b.hasUsage?b.input:H,d=b.output;(0,o.QE)(v,K,c+d,a?(0,i.calculateCostFromTokens)({...b.tokens,prompt_tokens:c,completion_tokens:d},a):0)}(0,o.Cu)(v,K)})}if(!L.ok||!L.body)return await w(),L;let O=L.body.getReader(),P=new ReadableStream({async pull(a){try{let{value:b,done:c}=await n.ZP.run(u,()=>O.read());c?(await w(),a.close()):(M.push(b),a.enqueue(b))}catch(b){await w(),a.error(b)}},async cancel(a){try{await n.ZP.run(u,()=>O.cancel(a))}finally{await w()}}});return new Response(P,{status:L.status,statusText:L.statusText,headers:L.headers})}catch(a){if(u&&v&&(await Promise.allSettled([...u.pending]),(0,o.Cu)(v,u)),a instanceof m.wY)return a.response();throw a}}},74388:(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()}}},79489:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{P:()=>C});var e=c(48895),f=c(57615),g=c(80238),h=c(45974),i=c(89718),j=c(50830),k=c(38775),l=c(92500),m=c(3894),n=c(46634),o=c(74388),p=c(43659),q=c(48136),r=c(18910),s=c(17603),t=c(27349),u=c(41004),v=c(14170),w=c(7803),x=c(67828),y=c(38160),z=c(46945),A=c(27811),B=a([e,l]);async function C(a,b=null){return(0,f.c)(a,a=>D(a,b),{family:"chat"})}async function D(a,b=null){let c;try{c=await a.json()}catch{return w.warn("CHAT","Invalid JSON body"),(0,p.yj)(u.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:c,headers:Object.fromEntries(a.headers.entries())});let{model:d,contextMarker:e}=(0,z.V)(c.model);e&&(c.model=d);let f=a.headers.get("Authorization"),h=(0,g.Tr)(a);if(f&&h){let a=w.maskKey(h);w.debug("AUTH",`API Key: ${a}`)}else w.debug("AUTH","No API key provided (local mode)");let j=await (0,i.mt)();if(j.requireApiKey){if(!h)return w.warn("AUTH","Missing API key (requireApiKey=true)"),(0,p.yj)(u.gx.UNAUTHORIZED,"Missing API key");if(!await (0,g.kI)(h))return w.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,p.yj)(u.gx.UNAUTHORIZED,"Invalid API key")}if(!d)return w.warn("CHAT","Missing model"),(0,p.yj)(u.gx.BAD_REQUEST,"Missing model");let l=await (0,A.TM)(a),m=await (0,A.cI)(l,d);if(m)return m;let n=a?.headers?.get("user-agent")||"",o=(0,t.c)(c,d,n,!!j.ccFilterNaming);if(o)return o.response||o;let q=(0,r.t8)(c),v=await (0,k.d_)(d);if(v){c=await F(c,d,a,b);let e=j.comboStrategies||{},f=e[d]?.fallbackStrategy||j.comboStrategy||"fallback",g=await (0,A.Ge)(l,(0,s.R8)(v,q,j),v),i=g.filter(a=>!v.includes(a));if("fusion"===f)return w.info("CHAT",`Combo "${d}" with ${v.length} models (strategy: fusion)`),(0,r.vt)({body:c,models:v,handleSingleModel:(c,d,e)=>{let f=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};f={...b,body:d}}return E(c,d,f,a,h)},log:w,comboName:d,judgeModel:e[d]?.judgeModel,tuning:e[d]?.fusionTuning});let k=j.comboStickyRoundRobinLimit;return w.info("CHAT",`Combo "${d}" with ${g.length} models (strategy: ${f}, sticky: ${k})`),(0,r.Pr)({body:c,models:g,handleSingleModel:(0,s.ar)((c,d)=>E(c,d,b,a,h),i),log:w,comboName:d,comboStrategy:f,comboStickyLimit:k})}let x=await (0,A.Ge)(l,(0,s.R8)([d],q,j),[d]);if(x.length>1){let e=x.filter(a=>a!==d);return w.info("CHAT",`Capacity adapter for [${[...q].join(",")}] on "${d}" → trying ${x.join(", ")}`),(0,r.Pr)({body:c,models:x,handleSingleModel:(0,s.ar)((c,d)=>E(c,d,b,a,h),e),log:w,comboName:d,comboStrategy:(0,s.vB)(q,j)})}return E(c,d,b,a,h,e?`${d.slice(d.indexOf("/")+1)}[${e}]`:null)}async function E(a,b,c=null,d=null,e=null,f=null){let j;try{j=await (0,k.mA)(b)}catch(a){if(a?.statusCode)return w.warn("CHAT",`Model "${b}" unavailable: ${a.message}`),(0,p.yj)(a.statusCode,a.message);throw a}if(!j.provider){let f=await (0,k.d_)(b);if(f){a=await F(a,b,d,c);let g=await (0,i.mt)(),h=g.comboStrategies||{},j=h[b]?.fallbackStrategy||g.comboStrategy||"fallback",k=(0,r.t8)(a),l=await (0,A.TM)(d),m=await (0,A.Ge)(l,(0,s.R8)(f,k,g),f),n=m.filter(a=>!f.includes(a));if("fusion"===j)return w.info("CHAT",`Combo "${b}" with ${f.length} models (strategy: fusion)`),(0,r.vt)({body:a,models:f,handleSingleModel:(a,b,f)=>{let g=c;if(f&&c){let{tools:a,tool_choice:b,...d}=c.body||{};g={...c,body:d}}return E(a,b,g,d,e)},log:w,comboName:b,judgeModel:h[b]?.judgeModel,tuning:h[b]?.fusionTuning});let o=g.comboStickyRoundRobinLimit;return w.info("CHAT",`Combo "${b}" with ${m.length} models (strategy: ${j}, sticky: ${o})`),(0,r.Pr)({body:a,models:m,handleSingleModel:(0,s.ar)((a,b)=>E(a,b,c,d,e),n),log:w,comboName:b,comboStrategy:j,comboStickyLimit:o})}return w.warn("CHAT","Invalid model format",{model:b}),(0,p.yj)(u.gx.BAD_REQUEST,"Invalid model format")}let{provider:t,model:z}=j,B=d?.headers?.get("user-agent")||"",C=new Set,D=null,G=null,H=null;for(;;){let b=await (0,g.c1)(t,C,z,{requestedModel:f||z});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=D||b.lastError||"Unavailable",c=u.gx.SERVICE_UNAVAILABLE;return w.warn("CHAT",`[${t}/${z}] ${a} (${b.retryAfterHuman})`),(0,p.wO)(c,`[${t}/${z}] ${a}`,b.retryAfter,b.retryAfterHuman,H)}if(0===C.size)return w.warn("AUTH",`No active credentials for provider: ${t}`),(0,p.yj)(u.gx.NOT_FOUND,`No active credentials for provider: ${t}`);return w.warn("CHAT","No more accounts available",{provider:t}),(0,p.yj)(G||u.gx.SERVICE_UNAVAILABLE,D||"All accounts unavailable",H)}let j=await (0,x.checkAndRefreshToken)(t,b);if(("antigravity"===t||"gemini-cli"===t)&&!j.projectId){let a=await (0,y.eG)(b.connectionId,j.accessToken,t);a&&(j.projectId=a,(0,x.vN)(b.connectionId,{projectId:a}).catch(()=>{}))}let k=await (0,i.mt)(),r=(k.providerThinking||{})[t]||null,s=await (0,l.wk)({body:{...a,model:`${t}/${z}`},modelInfo:{provider:t,model:z},credentials:j,log:w,clientRawRequest:c,connectionId:b.connectionId,userAgent:B,apiKey:e,ccFilterNaming:!!k.ccFilterNaming,rtkEnabled:!!k.rtkEnabled,headroomEnabled:!!k.headroomEnabled,headroomUrl:k.headroomUrl||m.ag,headroomCompressUserMessages:!!k.headroomCompressUserMessages,headroomTimeoutMs:k.headroomTimeoutMs,cavemanEnabled:!!k.cavemanEnabled,cavemanLevel:k.cavemanLevel||"full",ponytailEnabled:!!k.ponytailEnabled,ponytailLevel:k.ponytailLevel||"full",pxpipeEnabled:!!k.pxpipeEnabled,pxpipeMinChars:k.pxpipeMinChars,pxpipeTimeoutMs:k.pxpipeTimeoutMs,pxpipeTransform:k.pxpipeEnabled?await (0,n.RG)():null,onPxpipeEvent:o.T0,providerThinking:r,providerOverrides:(k.providerOverrides||{})[t]||null,sourceFormatOverride:d?.url?(0,v.t)(new URL(d.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,x.vN)(b.connectionId,{...a,existingProviderSpecificData:b.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,g.Pt)(b.connectionId,b,z),(0,h.vO)(b.connectionId,z)}});if(s.success)return s.response;let A=null,E=s.resetsAtMs;if("antigravity"===t&&(409===s.status||429===s.status)&&(A=await (0,h.XJ)(b.connectionId,s.status,z,j.accessToken,b.providerSpecificData))&&(E=A),"antigravity"===t&&A||(await (0,g.vk)(b.connectionId,s.status,s.error,t,z,E)).shouldFallback){w.warn("FALLBACK",`⇄ ACC:${b.connectionName} UNAVAILABLE (${s.status}) → NEXT ACCOUNT`),C.add(b.connectionId),D=s.error,G=s.status,H=(0,q.d)(s.response?.headers);continue}return s.response}}async function F(a,b,c,d){let e=await (0,i.Dj)(b),f=d?.body?.model||a.model||b,g=c?.url?(0,v.t)(new URL(c.url).pathname,a):null,h=(0,j.YK)(a,e,{requestedModel:f,sourceFormat:g});return h!==a&&w.info("COMBO","Prompt injection applied",{combo:b,requestedModel:f,displayIdentity:e.displayIdentity||null,mode:e.promptInjectionMode||"prepend"}),h}[e,l]=B.then?(await B)():B,d()}catch(a){d(a)}})},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:"jrouter-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
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""}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=9609,exports.ids=[9609],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{provider:"codex",text:"model is not supported when using codex with a chatgpt account",cooldownMs:18e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},39609:(a,b,c)=>{c.r(b),c.d(b,{default:()=>u,proxyAwareFetch:()=>s});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map,h=new Map,i=new Set(["SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID"]),j=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],k=["8.8.8.8","8.8.4.4"];function l(a){return null==a?"":String(a).trim()}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(k);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a,b){let c,d=l(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function o(a){let b=l(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function p(a,b=!1){let d=o(a);if(!d&&!b)return null;let f=`${d||"direct"}::${b?"insecure":"secure"}`;if(!g.has(f)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{Agent:a,ProxyAgent:h}=await c.e(7774).then(c.t.bind(c,47774,19)),i=b?{rejectUnauthorized:!1}:void 0,j=d?new h({uri:d,...b?{requestTls:i}:{}}):new a({connect:i});g.set(f,j)}return g.get(f)}async function q(a,b,c){try{let d=c?await p(c):void 0;return await f(a,d?{...b,dispatcher:d}:b)}catch(e){let d;if("true"!==process.env.STRICT_SSL&&"1"!==process.env.STRICT_SSL&&(d=e?.cause?.code||e?.code,i.has(d))){if(b.body&&"function"==typeof b.body.getReader&&b.body.locked)throw e;console.warn(`[ProxyFetch] TLS cert verification failed (${e.cause?.code||e.code}), retrying with insecure TLS: ${a}`);let d=await p(c,!0);return await f(a,{...b,dispatcher:d})}throw e}}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=l(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers instanceof Headers?Object.fromEntries(b.headers.entries()):{...b.headers||{}},"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=l(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=l(b?.noProxy??b?.connectionNoProxy);return d&&n(a,d)?null:o(c)}(d,c),h=g?null:o(function(a){let b;if(n(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),i=g||h;if(function(a){try{let b=new URL(a).hostname;return j.some(a=>b.includes(a))}catch{return!1}}(d)){if(i)try{return await q(a,b,i)}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(i)try{return await q(a,b,i)}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),q(a,b,null)}let k=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!l(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&k)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return q(a,b,null)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t);let u=t},41004:(a,b,c)=>{c.d(b,{C8:()=>q,DR:()=>p,IK:()=>k,Ps:()=>g,SA:()=>n,Uc:()=>l,Z1:()=>i,cI:()=>o,eo:()=>m,gx:()=>d,pH:()=>j,v1:()=>e,xM:()=>h}),c(3662);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let g=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",h=f("STREAM_STALL_TIMEOUT_MS",36e4),i=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),j=f("FETCH_CONNECT_TIMEOUT_MS",6e4),k=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),l=64e3,m=32e3,n="x-
|
|
1
|
+
"use strict";exports.id=9609,exports.ids=[9609],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{provider:"codex",text:"model is not supported when using codex with a chatgpt account",cooldownMs:18e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},39609:(a,b,c)=>{c.r(b),c.d(b,{default:()=>u,proxyAwareFetch:()=>s});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map,h=new Map,i=new Set(["SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID"]),j=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],k=["8.8.8.8","8.8.4.4"];function l(a){return null==a?"":String(a).trim()}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(k);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a,b){let c,d=l(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function o(a){let b=l(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function p(a,b=!1){let d=o(a);if(!d&&!b)return null;let f=`${d||"direct"}::${b?"insecure":"secure"}`;if(!g.has(f)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{Agent:a,ProxyAgent:h}=await c.e(7774).then(c.t.bind(c,47774,19)),i=b?{rejectUnauthorized:!1}:void 0,j=d?new h({uri:d,...b?{requestTls:i}:{}}):new a({connect:i});g.set(f,j)}return g.get(f)}async function q(a,b,c){try{let d=c?await p(c):void 0;return await f(a,d?{...b,dispatcher:d}:b)}catch(e){let d;if("true"!==process.env.STRICT_SSL&&"1"!==process.env.STRICT_SSL&&(d=e?.cause?.code||e?.code,i.has(d))){if(b.body&&"function"==typeof b.body.getReader&&b.body.locked)throw e;console.warn(`[ProxyFetch] TLS cert verification failed (${e.cause?.code||e.code}), retrying with insecure TLS: ${a}`);let d=await p(c,!0);return await f(a,{...b,dispatcher:d})}throw e}}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=l(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers instanceof Headers?Object.fromEntries(b.headers.entries()):{...b.headers||{}},"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=l(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=l(b?.noProxy??b?.connectionNoProxy);return d&&n(a,d)?null:o(c)}(d,c),h=g?null:o(function(a){let b;if(n(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),i=g||h;if(function(a){try{let b=new URL(a).hostname;return j.some(a=>b.includes(a))}catch{return!1}}(d)){if(i)try{return await q(a,b,i)}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(i)try{return await q(a,b,i)}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),q(a,b,null)}let k=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!l(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&k)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return q(a,b,null)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t);let u=t},41004:(a,b,c)=>{c.d(b,{C8:()=>q,DR:()=>p,IK:()=>k,Ps:()=>g,SA:()=>n,Uc:()=>l,Z1:()=>i,cI:()=>o,eo:()=>m,gx:()=>d,pH:()=>j,v1:()=>e,xM:()=>h}),c(3662);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let g=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",h=f("STREAM_STALL_TIMEOUT_MS",36e4),i=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),j=f("FETCH_CONNECT_TIMEOUT_MS",6e4),k=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),l=64e3,m=32e3,n="x-jrouter-token-saver",o={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function p(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let q=["Please write a 5-10 word title for the following conversation:"]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/
|
|
1
|
+
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/MDZXE-9g1sq006f6JNky9/_buildManifest.js","static/MDZXE-9g1sq006f6JNky9/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-e582fe7763255be4.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-83acfce05009cf38.js","static/chunks/main-app-61c188f529099d29.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
|