switchboard-router 0.9.40 → 0.9.42
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/static/chunks/1321-65fa769b26801132.js → .next/static/chunks/1321-b1d92a764bdc4978.js} +1 -1
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +8 -8
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/routable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/routable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/defaults/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
- package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +8 -8
- package/app/.next-cli-build/server/chunks/1274.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/2619.js +1 -0
- package/app/.next-cli-build/server/chunks/2847.js +1 -1
- package/app/.next-cli-build/server/chunks/369.js +2 -2
- package/app/.next-cli-build/server/chunks/6533.js +1 -0
- package/app/.next-cli-build/server/chunks/7201.js +1 -1
- package/app/.next-cli-build/server/chunks/7828.js +4 -0
- package/app/.next-cli-build/server/chunks/8400.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8789.js +1 -1
- package/app/.next-cli-build/server/chunks/8998.js +19 -19
- package/app/.next-cli-build/server/chunks/9261.js +9 -9
- package/app/.next-cli-build/server/chunks/9264.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/{.next/static/chunks/1321-65fa769b26801132.js → .next-cli-build/static/chunks/1321-b1d92a764bdc4978.js} +1 -1
- package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
- package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/1351.js +0 -1
- package/app/.next-cli-build/server/chunks/3735.js +0 -4
- package/app/.next-cli-build/server/chunks/403.js +0 -1
- /package/app/.next/static/{hrOBBbHpcMKJGPTNbGPQ- → _QJazGP3H6y4MJykGD5aW}/_buildManifest.js +0 -0
- /package/app/.next/static/{hrOBBbHpcMKJGPTNbGPQ- → _QJazGP3H6y4MJykGD5aW}/_ssgManifest.js +0 -0
- /package/app/.next-cli-build/static/{hrOBBbHpcMKJGPTNbGPQ- → _QJazGP3H6y4MJykGD5aW}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{hrOBBbHpcMKJGPTNbGPQ- → _QJazGP3H6y4MJykGD5aW}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=8789,exports.ids=[8789],exports.modules={12407:(a,b,c)=>{c.d(b,{$s:()=>r,E5:()=>i,GU:()=>m,Hr:()=>o,Kx:()=>l,M8:()=>q,f8:()=>p,oC:()=>g,ox:()=>j,p3:()=>n,qd:()=>f,sZ:()=>k,uw:()=>h});let d=async()=>{},e={getSettings:async()=>({}),trackPendingRequest:()=>{},appendRequestLog:d,saveRequestDetail:d,saveRequestUsage:d,getRoutingEvents:async()=>[],getClusterWorkerStats:async()=>({}),getPromotedLearningVersion:async()=>null,createLearningVersion:d,countRoutingEvents:async()=>0,listCombosWithRoutingEvents:async()=>[],getLastScheduledLearnAt:async()=>null,getClusterLatencyP50:async()=>null,getComboModels:async()=>null,putVaultEntry:async()=>!1,searchVault:async()=>[],getVaultEntry:async()=>null,cleanupExpiredVault:async()=>0,buildExternalIdpRefreshParams:null,createXaiService:null,fetchKiroProfileArn:null};function f(a={}){return e={...e,...a}}function g(){return e}function h(...a){return e.trackPendingRequest?.(...a)}function i(...a){return e.appendRequestLog?.(...a)??Promise.resolve()}function j(...a){return e.saveRequestDetail?.(...a)??Promise.resolve()}function k(...a){return e.saveRequestUsage?.(...a)??Promise.resolve()}async function l(...a){return e.getRoutingEvents(...a)}async function m(...a){return e.getClusterWorkerStats(...a)}async function n(...a){return e.getPromotedLearningVersion(...a)}async function o(...a){return e.createLearningVersion(...a)}async function p(...a){return e.countRoutingEvents(...a)}async function q(...a){return!!e.putVaultEntry&&e.putVaultEntry(...a)}async function r(...a){return e.searchVault?e.searchVault(...a):[]}},18129:(a,b,c)=>{c.d(b,{Hf:()=>o,Jj:()=>q,MF:()=>v,Vq:()=>w,fp:()=>t,hJ:()=>u});var d=c(16698),e=c(77598),f=c(60290),g=c(41029),h=c(45350);let i=h.sr.codex?.maxRefreshAgeMs,j=new Map,k=new Map,l=new d.AsyncLocalStorage,m=new WeakMap,n=new WeakMap;function o(a){return m.get(a)||a?.providerSpecificData||{}}function p(a){return{accessToken:a?.accessToken,refreshToken:a?.refreshToken,idToken:a?.idToken,copilotToken:a?.copilotToken??a?.providerSpecificData?.copilotToken}}function q(a,b){let c=n.get(b);if(c&&(c.source.connectionId||c.source.id)===a)return c;let d=p(b),e=Object.keys(d).filter(a=>d[a]);if(0===e.length)return null;for(let b of[...k.values()].reverse()){if((b.source.connectionId||b.source.id)!==a)continue;let c={...p(b.source),...Object.fromEntries(Object.entries(p(b.result)).filter(([,a])=>a))};if(e.every(a=>c[a]===d[a]))return b}return null}function r(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function s(a){return r(a?.expiresAt??a?.tokenExpiresAt)}function t(a,b,c=Date.now()){if(!b)return!1;let d=s(b);if(null!==d&&d-c<(0,g.Og)(a))return!0;let e=h.sr[a]?.maxRefreshAgeMs;return!!(e&&b.refreshToken&&function(a,b=Date.now(),c=i){let d=r(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,e))}function u(a,b,c,d=Date.now()){var e,f;if(!c)return null;if((0,g.jT)(c))return c;let i={},j=new Date(d).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,d)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(e=b?.providerSpecificData,i.providerSpecificData=(f=c.providerSpecificData)&&"object"==typeof f?{...e||{},...f}:e),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(h.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),m.set(i,c.providerSpecificData||{}),i}async function v(a,b,c){let d,g,h,i=(d=[b?.accessToken,b?.refreshToken,b?.idToken,b?.copilotToken??b?.providerSpecificData?.copilotToken],g=(0,e.createHash)("sha256").update(JSON.stringify(d)).digest("hex"),`${h=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${h}`}:${g}`);if(l.getStore()===i)return c();let q=j.get(i);if(q)return q;let r=k.get(i);if(r?.reusable){let a;return a=r.result,Number.isFinite(r.expiresAt)&&(a={...a,expiresAt:new Date(r.expiresAt).toISOString(),expiresIn:Math.max(0,Math.ceil((r.expiresAt-Date.now())/1e3))},m.set(a,r.providerSpecificUpdates),n.set(a,r)),a}let t={...b?._connection||{},...b,provider:a,authType:b?.authType||b?._connection?.authType||"oauth"},u=Promise.resolve().then(()=>l.run(i,c)).then(a=>{if(a&&!a.error&&Object.values(p(a)).some(Boolean)){let b={result:a,source:t,reusable:!!a&&!a.error&&(["accessToken","refreshToken","idToken"].some(b=>a[b]&&a[b]!==t?.[b])||a.copilotToken&&a.copilotToken!==(t?.copilotToken??t?.providerSpecificData?.copilotToken)),providerSpecificUpdates:Object.fromEntries(Object.entries(o(a)).filter(([a,b])=>JSON.stringify(b)!==JSON.stringify(t.providerSpecificData?.[a]))),expiresAt:s(a)??(Number.isFinite(Number(a.expiresIn))&&Number(a.expiresIn)>0?Date.now()+1e3*Number(a.expiresIn):null)};for(m.set(a,b.providerSpecificUpdates),n.set(a,b),k.delete(i),k.set(i,b);k.size>f.v1.credentialRefreshResultsMaxSize;)k.delete(k.keys().next().value)}return a}).finally(()=>{j.delete(i)});return j.set(i,u),u}async function w(a,b,c,d=null){return b?v(a,b,async()=>{let e=await (0,g.$B)(a,b,c,d);return u(a,b,e)}):null}},28730:(a,b,c)=>{c.d(b,{$V:()=>v,Cn:()=>l,Co:()=>u,Ic:()=>s,J5:()=>q,NA:()=>x,QH:()=>o,VK:()=>y,Wu:()=>w,fC:()=>m,go:()=>i,nZ:()=>r,qk:()=>n,sX:()=>j,uR:()=>p,zv:()=>t});var d=c(21820),e=c(4630),f=c(35570);function g(){try{return(0,f.zi)("gemini-cli")||null}catch{return null}}let h=e.xq["gemini-cli"]?.cliVersion||g()?.version||"0.56.0",i=e.xq["gemini-cli"]?.apiClient||g()?.apiClient||"google-genai-sdk/1.41.0 gl-node/v22.19.0";function j(a="unknown"){let b,c=g()?.version||h;return`GeminiCLI/${c}/${a||"unknown"} (${(0,d.platform)()}; ${"ia32"===(b=(0,d.arch)())?"x86":b}; terminal)`}function k(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let l={ideType:9,platform:k(),pluginType:2},m=Object.freeze(["authorization","x-api-key","x-goog-api-key","x-switchboard-key","cookie","token","set-cookie","session-id","session_id","x-session-id","x-amp-thread-id","x-client-request-id"]),n=Object.freeze(["authorization","x-switchboard-key","x-api-key","x-goog-api-key","session-id","session_id","x-session-id","x-amp-thread-id","x-client-request-id"]),o="_ide",p="_ide",q=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),r={loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},s={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:k(),pluginType:2})},t={ideType:9,platform:k(),pluginType:2},u="You are Claude Code, Anthropic's official CLI for Claude.",v="You are Antigravity, a powerful agentic AI coding assistant designed by the Google Deepmind team working on Advanced Agentic Coding.You are pair programming with a USER to solve their coding task. The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.**Absolute paths only****Proactiveness**",w=Object.fromEntries(Object.entries(e.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),x={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:e.sr.codex?.tokenUrl,auth:e.sr.codex?.authorizeUrl},anthropic:{token:e.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},qwen:{token:e.sr.qwen?.tokenUrl,auth:e.sr.qwen?.deviceCodeUrl},iflow:{token:e.sr.iflow?.tokenUrl,auth:e.sr.iflow?.authorizeUrl},github:{token:e.sr.github?.tokenUrl,auth:e.sr.github?.authorizeUrl,deviceCode:e.sr.github?.deviceCodeUrl}};function y(a){let b="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"switchboard","X-Msh-Version":"2.1.2","X-Msh-Device-Model":"u">typeof process?`${process.platform} ${process.arch}`:"unknown","X-Msh-Device-Id":b}}},41029:(a,b,c)=>{c.d(b,{oD:()=>B,Og:()=>D,jT:()=>C,Sc:()=>E,jR:()=>z,I9:()=>r,AH:()=>x,Ql:()=>w,$B:()=>K,pb:()=>G,qZ:()=>L});var d=c(4630),e=c(28730),f=c(46052);let g=new Map;function h(a,b){g.get(a)===b&&(g.delete(a),b.cleanupTimer&&clearTimeout(b.cleanupTimer))}async function i(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;h(e,f)}let i={promise:null},j=(async()=>{try{let a=await c();if(a&&(a.accessToken||a.copilotToken||a.refreshToken)){let b;(b={result:a,expiresAt:Date.now()+1e4,cleanupTimer:null}).cleanupTimer=setTimeout(()=>{g.get(e)===b&&(g.delete(e),b.cleanupTimer=null)},1e4),b.cleanupTimer.unref?.(),g.set(e,b)}else h(e,i);return a}catch(a){throw h(e,i),a}})();return i.promise=j,g.set(e,i),j}var j=c(12407),k=c(57034);function l(a,b,c,d){let e=t(c,d);return e.permanent?(a?.error?.("TOKEN_REFRESH",`${b} refresh token revoked or expired. Re-auth required.`,{status:d,code:e.code}),{error:"unrecoverable_refresh_error",code:e.code}):null}function m(a="",b=0){let c="";try{let b=a?JSON.parse(a):null;c=b?.error||b?.error_code||b?.code||""}catch{}return{status:b,errorCode:c||void 0,bodyLen:a?.length||0}}let n=null;async function o(a,b){return a?i("xai",a,async()=>{try{if(!n){let a=(0,j.oC)().createXaiService;if(!a)return b?.warn?.("TOKEN_REFRESH","xAI service not wired (setOpenSseDeps)"),null;n=await a()}let c=await n.refreshAccessToken(a);return{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,idToken:c.id_token}}catch(d){let a=String(d?.message||""),c=a.includes("invalid_grant")?"invalid_grant":a.includes("invalid_request")?"invalid_request":null;if(b?.warn?.("TOKEN_REFRESH","xai refresh failed",c?{errorCode:c}:void 0),c)return{error:c};return null}},b):null}async function p(a,b,c,e,g=null){let h=d.xq[a],j=h?.refreshUrl||d.sr[a]?.refreshUrl||d.sr[a]?.tokenUrl;return h&&j?b?i(a,b,async()=>{try{let c=new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:h.clientId});h.clientSecret&&c.set("client_secret",h.clientSecret);let d=await (0,f.Fm)(j,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c,identity:h.identity,provider:a,format:h.format},g);if(!d.ok){let b=await d.text(),c=l(e,a,b,d.status);if(c)return c;return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:d.status,error:m(b,d.status)}),null}let i=await d.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||b,expiresIn:i.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function q(a,b){return a?i("claude",a,async()=>{try{let c=await (0,f.Fm)(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId}),identity:d.xq.claude?.identity,provider:"claude",format:d.xq.claude?.format});if(!c.ok){let a=await c.text(),d=l(b,"Claude",a,c.status);if(d)return d;return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:m(a,c.status)}),null}let g=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function r(a,b,c,g,h=null,j=null){if(!a)return null;let k=h||(b===d.xq.antigravity?.clientId?"antigravity":"gemini-cli"),n=d.xq[k];return i(`google:${b}`,a,async()=>{try{let d=await (0,f.Fm)(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c}),identity:n?.identity,provider:k,format:n?.format},j);if(!d.ok){let a=await d.text(),b=l(g,"Google",a,d.status);if(b)return b;return g?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:d.status,error:m(a,d.status)}),null}let h=await d.json();return g?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!h.access_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}}catch(a){return g?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},g)}async function s(a,b){return a?i("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await (0,f.Fm)(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId}),identity:d.xq.qwen?.identity,provider:"qwen",format:d.xq.qwen?.format});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>""),c=l(b,"Qwen",a,e.status);if(c)return c;b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:m(a,e.status)})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}function t(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error,e=("string"==typeof d?d:d?.code||d?.type)||c?.error_code||"",f=c?.error_description||c?.message||d?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=b<500&&["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant","bad_refresh_token"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}async function u(a,b){return a?i("codex",a,async()=>{try{let c=await (0,f.Fm)(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a}),identity:d.xq.codex?.identity,provider:"codex",format:d.xq.codex?.format});if(!c.ok){let a=await c.text(),d=t(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:m(a,c.status),code:d.code,permanent:d.permanent}),null}let g=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,hasIdToken:!!g.id_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,idToken:g.id_token,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function v(a,b,c){if(a?.profileArn)return{};let d=c?.trim?.()||null;if(!d){let c=(0,j.oC)().fetchKiroProfileArn;c&&(d=await c(b,a?.region))}return d?{providerSpecificData:{profileArn:d}}:{}}async function w(a,b,c,e=null){return a?i("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,l=b?.region;if("external_idp"===g){let g;try{let c=(0,j.oC)().buildExternalIdpRefreshParams;if(!c)throw Error("buildExternalIdpRefreshParams not wired");g=await c(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let h=await (0,f.Fm)(g.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:g.body,identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!h.ok){let a=await h.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:h.status,error:m(a,h.status)}),null}let i=await h.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||a,expiresIn:i.expires_in,providerSpecificData:g.providerSpecificData}}if(h&&i){let j="idc"===g&&(0,k.i7)(l)?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",n=await (0,f.Fm)(j,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"}),identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!n.ok){let a=await n.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:n.status,error:m(a,n.status)}),null}let o=await n.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!o.accessToken,expiresIn:o.expiresIn}),{accessToken:o.accessToken,refreshToken:o.refreshToken||a,expiresIn:o.expiresIn,...await v(b,o.accessToken,o.profileArn)}}let n=await (0,f.Fm)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a}),identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!n.ok){let a=await n.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:n.status,error:m(a,n.status)}),null}let o=await n.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!o.accessToken,expiresIn:o.expiresIn}),{accessToken:o.accessToken,refreshToken:o.refreshToken||a,expiresIn:o.expiresIn,...await v(b,o.accessToken,o.profileArn)}},c):null}async function x(a,b){return a?i("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),g=await (0,f.Fm)(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret}),identity:d.xq.iflow?.identity,provider:"iflow",format:d.xq.iflow?.format});if(!g.ok){let a=await g.text(),c=l(b,"iFlow",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:g.status,error:m(a,g.status)}),null)}let h=await g.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}},b):null}async function y(a,b){return a?i("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let g=await (0,f.Fm)(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c),identity:d.xq.github?.identity,provider:"github",format:d.xq.github?.format});if(!g.ok){let a=await g.text(),c=l(b,"GitHub",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:g.status,error:m(a,g.status)}),null)}let h=await g.json();if(h.error||!h.access_token){let a=JSON.stringify(h),c=l(b,"GitHub",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:g.status,error:m(a,g.status)}),null)}return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}},b):null}async function z(a,b){return a?i("copilot",a,async()=>{try{let c=await (0,f.Fm)(d.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,Accept:"application/json"},identity:d.xq.github?.identity,provider:"github",format:d.xq.github?.format});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:m(a,c.status)}),null}let e=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!e.token,expiresAt:e.expires_at}),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function A(a,b){return a?i("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=await (0,f.Fm)(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a},body:JSON.stringify({refreshToken:a}),identity:d.xq["codebuddy-cn"]?.identity,provider:"codebuddy-cn",format:d.xq["codebuddy-cn"]?.format});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:m(a,e.status)}),null}let g=await e.json();return 0===g.code&&g.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!g.data.accessToken,hasNewRefreshToken:!!g.data.refreshToken,expiresIn:g.data.expiresIn}),{accessToken:g.data.accessToken,refreshToken:g.data.refreshToken||a,expiresIn:g.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:g.code,msg:g.msg}),null)},b):null}let B=3e5;function C(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function D(a){return e.Wu[a]||B}function E(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let F=new Map;async function G(a,b,g="vertex",h=null){let i=a.client_email,j=F.get(i);if(j&&j.expiresAt-Date.now()>3e5)return{accessToken:j.token,expiresAt:j.expiresAt};try{let{SignJWT:j,importPKCS8:k}=await c.e(9078).then(c.bind(c,9078));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let l=await k(a.private_key.replace(/\\n/g,"\n"),"RS256"),m=Math.floor(Date.now()/1e3),n=await new j({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(m).setExpirationTime(m+3600).sign(l),o=d.xq[g]||d.xq.vertex,p=await (0,f.Fm)(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),identity:o.identity,provider:g,format:o.format},h);if(!p.ok){let a=await p.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:q,expires_in:r}=await p.json(),s=Date.now()+(r??3600)*1e3;return F.set(i,{token:q,expiresAt:s}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:q,expiresAt:s}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function H(a,b,c="vertex"){let d=E(a.apiKey);if(d)return G(d,b,c);try{let d="string"==typeof a.apiKey?JSON.parse(a.apiKey):null;if(d?.type==="authorized_user"&&d.refresh_token&&d.client_id&&d.client_secret)return r(d.refresh_token,d.client_id,d.client_secret,b,c)}catch{}return null}let I={"gemini-cli":(a,b)=>r(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>r(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>q(a.refreshToken,b),codex:(a,b)=>u(a.refreshToken,b),qwen:(a,b)=>s(a.refreshToken,b),iflow:(a,b)=>x(a.refreshToken,b),github:(a,b)=>y(a.refreshToken,b),kiro:(a,b)=>w(a.refreshToken,a.providerSpecificData,b),xai:(a,b)=>o(a.refreshToken,b),"grok-cli":(a,b,c)=>p("grok-cli",a.refreshToken,a,b,c),"codebuddy-cn":(a,b)=>A(a.refreshToken,b),muse:(a,b)=>J(a.providerSpecificData?.dcaToken||a.refreshToken,b),vertex:(a,b)=>H(a,b,"vertex"),"vertex-partner":(a,b)=>H(a,b,"vertex-partner")};async function J(a,b){if(!a)return null;try{let c=process.env.META_MINT_URL||"https://api.meta.ai/muse-code/key",d=await (0,f.Fm)(c,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":"muse-code/1.0.2","Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({dca_token:a}),identity:"muse-code",provider:"muse"});if(!d.ok)return b?.warn?.("TOKEN_REFRESH",`Failed to re-mint Meta Muse API key: ${d.status}`),null;let e=await d.json();return{accessToken:e.api_key,apiKey:e.api_key,providerSpecificData:{apiKey:e.api_key,baseUrl:e.base_url||"https://api.meta.ai/v1"}}}catch(a){return b?.warn?.("TOKEN_REFRESH",`Error re-minting Meta Muse API key: ${a?.message}`),null}}async function K(a,b,c,d=null){let e="vertex"===a||"vertex-partner"===a;if(!b.refreshToken&&!(e&&b?.apiKey))return null;let f=I[a];return f?f(b,c,d):p(a,b.refreshToken,b,c,d)}async function L(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(C(b)||b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},57034:(a,b,c)=>{c.d(b,{i7:()=>e,l6:()=>f});let d=/^[a-z]{2}(?:-[a-z0-9]+)+-\d{1,2}$/;function e(a){return"string"==typeof a&&d.test(a)}function f(a,b="us-east-1"){return e(a)?a:b}}};
|
|
1
|
+
"use strict";exports.id=8789,exports.ids=[8789],exports.modules={12407:(a,b,c)=>{c.d(b,{$s:()=>r,E5:()=>i,GU:()=>m,Hr:()=>o,Kx:()=>l,M8:()=>q,f8:()=>p,oC:()=>g,ox:()=>j,p3:()=>n,qd:()=>f,sZ:()=>k,uw:()=>h});let d=async()=>{},e={getSettings:async()=>({}),loadProviderQuotaState:null,saveProviderQuotaState:null,trackPendingRequest:()=>{},appendRequestLog:d,saveRequestDetail:d,saveRequestUsage:d,getRoutingEvents:async()=>[],getClusterWorkerStats:async()=>({}),getPromotedLearningVersion:async()=>null,createLearningVersion:d,countRoutingEvents:async()=>0,listCombosWithRoutingEvents:async()=>[],getLastScheduledLearnAt:async()=>null,getClusterLatencyP50:async()=>null,getComboModels:async()=>null,putVaultEntry:async()=>!1,searchVault:async()=>[],getVaultEntry:async()=>null,cleanupExpiredVault:async()=>0,buildExternalIdpRefreshParams:null,createXaiService:null,fetchKiroProfileArn:null};function f(a={}){return e={...e,...a}}function g(){return e}function h(...a){return e.trackPendingRequest?.(...a)}function i(...a){return e.appendRequestLog?.(...a)??Promise.resolve()}function j(...a){return e.saveRequestDetail?.(...a)??Promise.resolve()}function k(...a){return e.saveRequestUsage?.(...a)??Promise.resolve()}async function l(...a){return e.getRoutingEvents(...a)}async function m(...a){return e.getClusterWorkerStats(...a)}async function n(...a){return e.getPromotedLearningVersion(...a)}async function o(...a){return e.createLearningVersion(...a)}async function p(...a){return e.countRoutingEvents(...a)}async function q(...a){return!!e.putVaultEntry&&e.putVaultEntry(...a)}async function r(...a){return e.searchVault?e.searchVault(...a):[]}},18129:(a,b,c)=>{c.d(b,{Hf:()=>o,Jj:()=>q,MF:()=>v,Vq:()=>w,fp:()=>t,hJ:()=>u});var d=c(16698),e=c(77598),f=c(60290),g=c(41029),h=c(45350);let i=h.sr.codex?.maxRefreshAgeMs,j=new Map,k=new Map,l=new d.AsyncLocalStorage,m=new WeakMap,n=new WeakMap;function o(a){return m.get(a)||a?.providerSpecificData||{}}function p(a){return{accessToken:a?.accessToken,refreshToken:a?.refreshToken,idToken:a?.idToken,copilotToken:a?.copilotToken??a?.providerSpecificData?.copilotToken}}function q(a,b){let c=n.get(b);if(c&&(c.source.connectionId||c.source.id)===a)return c;let d=p(b),e=Object.keys(d).filter(a=>d[a]);if(0===e.length)return null;for(let b of[...k.values()].reverse()){if((b.source.connectionId||b.source.id)!==a)continue;let c={...p(b.source),...Object.fromEntries(Object.entries(p(b.result)).filter(([,a])=>a))};if(e.every(a=>c[a]===d[a]))return b}return null}function r(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function s(a){return r(a?.expiresAt??a?.tokenExpiresAt)}function t(a,b,c=Date.now()){if(!b)return!1;let d=s(b);if(null!==d&&d-c<(0,g.Og)(a))return!0;let e=h.sr[a]?.maxRefreshAgeMs;return!!(e&&b.refreshToken&&function(a,b=Date.now(),c=i){let d=r(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,e))}function u(a,b,c,d=Date.now()){var e,f;if(!c)return null;if((0,g.jT)(c))return c;let i={},j=new Date(d).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,d)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(e=b?.providerSpecificData,i.providerSpecificData=(f=c.providerSpecificData)&&"object"==typeof f?{...e||{},...f}:e),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(h.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),m.set(i,c.providerSpecificData||{}),i}async function v(a,b,c){let d,g,h,i=(d=[b?.accessToken,b?.refreshToken,b?.idToken,b?.copilotToken??b?.providerSpecificData?.copilotToken],g=(0,e.createHash)("sha256").update(JSON.stringify(d)).digest("hex"),`${h=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${h}`}:${g}`);if(l.getStore()===i)return c();let q=j.get(i);if(q)return q;let r=k.get(i);if(r?.reusable){let a;return a=r.result,Number.isFinite(r.expiresAt)&&(a={...a,expiresAt:new Date(r.expiresAt).toISOString(),expiresIn:Math.max(0,Math.ceil((r.expiresAt-Date.now())/1e3))},m.set(a,r.providerSpecificUpdates),n.set(a,r)),a}let t={...b?._connection||{},...b,provider:a,authType:b?.authType||b?._connection?.authType||"oauth"},u=Promise.resolve().then(()=>l.run(i,c)).then(a=>{if(a&&!a.error&&Object.values(p(a)).some(Boolean)){let b={result:a,source:t,reusable:!!a&&!a.error&&(["accessToken","refreshToken","idToken"].some(b=>a[b]&&a[b]!==t?.[b])||a.copilotToken&&a.copilotToken!==(t?.copilotToken??t?.providerSpecificData?.copilotToken)),providerSpecificUpdates:Object.fromEntries(Object.entries(o(a)).filter(([a,b])=>JSON.stringify(b)!==JSON.stringify(t.providerSpecificData?.[a]))),expiresAt:s(a)??(Number.isFinite(Number(a.expiresIn))&&Number(a.expiresIn)>0?Date.now()+1e3*Number(a.expiresIn):null)};for(m.set(a,b.providerSpecificUpdates),n.set(a,b),k.delete(i),k.set(i,b);k.size>f.v1.credentialRefreshResultsMaxSize;)k.delete(k.keys().next().value)}return a}).finally(()=>{j.delete(i)});return j.set(i,u),u}async function w(a,b,c,d=null){return b?v(a,b,async()=>{let e=await (0,g.$B)(a,b,c,d);return u(a,b,e)}):null}},28730:(a,b,c)=>{c.d(b,{$V:()=>v,Cn:()=>l,Co:()=>u,Ic:()=>s,J5:()=>q,NA:()=>x,QH:()=>o,VK:()=>y,Wu:()=>w,fC:()=>m,go:()=>i,nZ:()=>r,qk:()=>n,sX:()=>j,uR:()=>p,zv:()=>t});var d=c(21820),e=c(4630),f=c(35570);function g(){try{return(0,f.zi)("gemini-cli")||null}catch{return null}}let h=e.xq["gemini-cli"]?.cliVersion||g()?.version||"0.56.0",i=e.xq["gemini-cli"]?.apiClient||g()?.apiClient||"google-genai-sdk/1.41.0 gl-node/v22.19.0";function j(a="unknown"){let b,c=g()?.version||h;return`GeminiCLI/${c}/${a||"unknown"} (${(0,d.platform)()}; ${"ia32"===(b=(0,d.arch)())?"x86":b}; terminal)`}function k(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let l={ideType:9,platform:k(),pluginType:2},m=Object.freeze(["authorization","x-api-key","x-goog-api-key","x-switchboard-key","cookie","token","set-cookie","session-id","session_id","x-session-id","x-amp-thread-id","x-client-request-id"]),n=Object.freeze(["authorization","x-switchboard-key","x-api-key","x-goog-api-key","session-id","session_id","x-session-id","x-amp-thread-id","x-client-request-id"]),o="_ide",p="_ide",q=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),r={loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},s={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:k(),pluginType:2})},t={ideType:9,platform:k(),pluginType:2},u="You are Claude Code, Anthropic's official CLI for Claude.",v="You are Antigravity, a powerful agentic AI coding assistant designed by the Google Deepmind team working on Advanced Agentic Coding.You are pair programming with a USER to solve their coding task. The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.**Absolute paths only****Proactiveness**",w=Object.fromEntries(Object.entries(e.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),x={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:e.sr.codex?.tokenUrl,auth:e.sr.codex?.authorizeUrl},anthropic:{token:e.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},qwen:{token:e.sr.qwen?.tokenUrl,auth:e.sr.qwen?.deviceCodeUrl},iflow:{token:e.sr.iflow?.tokenUrl,auth:e.sr.iflow?.authorizeUrl},github:{token:e.sr.github?.tokenUrl,auth:e.sr.github?.authorizeUrl,deviceCode:e.sr.github?.deviceCodeUrl}};function y(a){let b="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"switchboard","X-Msh-Version":"2.1.2","X-Msh-Device-Model":"u">typeof process?`${process.platform} ${process.arch}`:"unknown","X-Msh-Device-Id":b}}},41029:(a,b,c)=>{c.d(b,{oD:()=>B,Og:()=>D,jT:()=>C,Sc:()=>E,jR:()=>z,I9:()=>r,AH:()=>x,Ql:()=>w,$B:()=>K,pb:()=>G,qZ:()=>L});var d=c(4630),e=c(28730),f=c(46052);let g=new Map;function h(a,b){g.get(a)===b&&(g.delete(a),b.cleanupTimer&&clearTimeout(b.cleanupTimer))}async function i(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;h(e,f)}let i={promise:null},j=(async()=>{try{let a=await c();if(a&&(a.accessToken||a.copilotToken||a.refreshToken)){let b;(b={result:a,expiresAt:Date.now()+1e4,cleanupTimer:null}).cleanupTimer=setTimeout(()=>{g.get(e)===b&&(g.delete(e),b.cleanupTimer=null)},1e4),b.cleanupTimer.unref?.(),g.set(e,b)}else h(e,i);return a}catch(a){throw h(e,i),a}})();return i.promise=j,g.set(e,i),j}var j=c(12407),k=c(57034);function l(a,b,c,d){let e=t(c,d);return e.permanent?(a?.error?.("TOKEN_REFRESH",`${b} refresh token revoked or expired. Re-auth required.`,{status:d,code:e.code}),{error:"unrecoverable_refresh_error",code:e.code}):null}function m(a="",b=0){let c="";try{let b=a?JSON.parse(a):null;c=b?.error||b?.error_code||b?.code||""}catch{}return{status:b,errorCode:c||void 0,bodyLen:a?.length||0}}let n=null;async function o(a,b){return a?i("xai",a,async()=>{try{if(!n){let a=(0,j.oC)().createXaiService;if(!a)return b?.warn?.("TOKEN_REFRESH","xAI service not wired (setOpenSseDeps)"),null;n=await a()}let c=await n.refreshAccessToken(a);return{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,idToken:c.id_token}}catch(d){let a=String(d?.message||""),c=a.includes("invalid_grant")?"invalid_grant":a.includes("invalid_request")?"invalid_request":null;if(b?.warn?.("TOKEN_REFRESH","xai refresh failed",c?{errorCode:c}:void 0),c)return{error:c};return null}},b):null}async function p(a,b,c,e,g=null){let h=d.xq[a],j=h?.refreshUrl||d.sr[a]?.refreshUrl||d.sr[a]?.tokenUrl;return h&&j?b?i(a,b,async()=>{try{let c=new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:h.clientId});h.clientSecret&&c.set("client_secret",h.clientSecret);let d=await (0,f.Fm)(j,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c,identity:h.identity,provider:a,format:h.format},g);if(!d.ok){let b=await d.text(),c=l(e,a,b,d.status);if(c)return c;return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:d.status,error:m(b,d.status)}),null}let i=await d.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||b,expiresIn:i.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function q(a,b){return a?i("claude",a,async()=>{try{let c=await (0,f.Fm)(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId}),identity:d.xq.claude?.identity,provider:"claude",format:d.xq.claude?.format});if(!c.ok){let a=await c.text(),d=l(b,"Claude",a,c.status);if(d)return d;return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:m(a,c.status)}),null}let g=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function r(a,b,c,g,h=null,j=null){if(!a)return null;let k=h||(b===d.xq.antigravity?.clientId?"antigravity":"gemini-cli"),n=d.xq[k];return i(`google:${b}`,a,async()=>{try{let d=await (0,f.Fm)(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c}),identity:n?.identity,provider:k,format:n?.format},j);if(!d.ok){let a=await d.text(),b=l(g,"Google",a,d.status);if(b)return b;return g?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:d.status,error:m(a,d.status)}),null}let h=await d.json();return g?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!h.access_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}}catch(a){return g?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},g)}async function s(a,b){return a?i("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await (0,f.Fm)(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId}),identity:d.xq.qwen?.identity,provider:"qwen",format:d.xq.qwen?.format});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>""),c=l(b,"Qwen",a,e.status);if(c)return c;b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:m(a,e.status)})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}function t(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error,e=("string"==typeof d?d:d?.code||d?.type)||c?.error_code||"",f=c?.error_description||c?.message||d?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=b<500&&["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant","bad_refresh_token"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}async function u(a,b){return a?i("codex",a,async()=>{try{let c=await (0,f.Fm)(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a}),identity:d.xq.codex?.identity,provider:"codex",format:d.xq.codex?.format});if(!c.ok){let a=await c.text(),d=t(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:m(a,c.status),code:d.code,permanent:d.permanent}),null}let g=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,hasIdToken:!!g.id_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,idToken:g.id_token,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function v(a,b,c){if(a?.profileArn)return{};let d=c?.trim?.()||null;if(!d){let c=(0,j.oC)().fetchKiroProfileArn;c&&(d=await c(b,a?.region))}return d?{providerSpecificData:{profileArn:d}}:{}}async function w(a,b,c,e=null){return a?i("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,l=b?.region;if("external_idp"===g){let g;try{let c=(0,j.oC)().buildExternalIdpRefreshParams;if(!c)throw Error("buildExternalIdpRefreshParams not wired");g=await c(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let h=await (0,f.Fm)(g.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:g.body,identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!h.ok){let a=await h.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:h.status,error:m(a,h.status)}),null}let i=await h.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||a,expiresIn:i.expires_in,providerSpecificData:g.providerSpecificData}}if(h&&i){let j="idc"===g&&(0,k.i7)(l)?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",n=await (0,f.Fm)(j,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"}),identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!n.ok){let a=await n.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:n.status,error:m(a,n.status)}),null}let o=await n.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!o.accessToken,expiresIn:o.expiresIn}),{accessToken:o.accessToken,refreshToken:o.refreshToken||a,expiresIn:o.expiresIn,...await v(b,o.accessToken,o.profileArn)}}let n=await (0,f.Fm)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a}),identity:d.xq.kiro?.identity,provider:"kiro",format:d.xq.kiro?.format},e);if(!n.ok){let a=await n.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:n.status,error:m(a,n.status)}),null}let o=await n.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!o.accessToken,expiresIn:o.expiresIn}),{accessToken:o.accessToken,refreshToken:o.refreshToken||a,expiresIn:o.expiresIn,...await v(b,o.accessToken,o.profileArn)}},c):null}async function x(a,b){return a?i("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),g=await (0,f.Fm)(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret}),identity:d.xq.iflow?.identity,provider:"iflow",format:d.xq.iflow?.format});if(!g.ok){let a=await g.text(),c=l(b,"iFlow",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:g.status,error:m(a,g.status)}),null)}let h=await g.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}},b):null}async function y(a,b){return a?i("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let g=await (0,f.Fm)(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c),identity:d.xq.github?.identity,provider:"github",format:d.xq.github?.format});if(!g.ok){let a=await g.text(),c=l(b,"GitHub",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:g.status,error:m(a,g.status)}),null)}let h=await g.json();if(h.error||!h.access_token){let a=JSON.stringify(h),c=l(b,"GitHub",a,g.status);return c||(b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:g.status,error:m(a,g.status)}),null)}return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in}},b):null}async function z(a,b){return a?i("copilot",a,async()=>{try{let c=await (0,f.Fm)(d.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,Accept:"application/json"},identity:d.xq.github?.identity,provider:"github",format:d.xq.github?.format});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:m(a,c.status)}),null}let e=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!e.token,expiresAt:e.expires_at}),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function A(a,b){return a?i("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=await (0,f.Fm)(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a},body:JSON.stringify({refreshToken:a}),identity:d.xq["codebuddy-cn"]?.identity,provider:"codebuddy-cn",format:d.xq["codebuddy-cn"]?.format});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:m(a,e.status)}),null}let g=await e.json();return 0===g.code&&g.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!g.data.accessToken,hasNewRefreshToken:!!g.data.refreshToken,expiresIn:g.data.expiresIn}),{accessToken:g.data.accessToken,refreshToken:g.data.refreshToken||a,expiresIn:g.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:g.code,msg:g.msg}),null)},b):null}let B=3e5;function C(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function D(a){return e.Wu[a]||B}function E(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let F=new Map;async function G(a,b,g="vertex",h=null){let i=a.client_email,j=F.get(i);if(j&&j.expiresAt-Date.now()>3e5)return{accessToken:j.token,expiresAt:j.expiresAt};try{let{SignJWT:j,importPKCS8:k}=await c.e(9078).then(c.bind(c,9078));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let l=await k(a.private_key.replace(/\\n/g,"\n"),"RS256"),m=Math.floor(Date.now()/1e3),n=await new j({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(m).setExpirationTime(m+3600).sign(l),o=d.xq[g]||d.xq.vertex,p=await (0,f.Fm)(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),identity:o.identity,provider:g,format:o.format},h);if(!p.ok){let a=await p.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:q,expires_in:r}=await p.json(),s=Date.now()+(r??3600)*1e3;return F.set(i,{token:q,expiresAt:s}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:q,expiresAt:s}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function H(a,b,c="vertex"){let d=E(a.apiKey);if(d)return G(d,b,c);try{let d="string"==typeof a.apiKey?JSON.parse(a.apiKey):null;if(d?.type==="authorized_user"&&d.refresh_token&&d.client_id&&d.client_secret)return r(d.refresh_token,d.client_id,d.client_secret,b,c)}catch{}return null}let I={"gemini-cli":(a,b)=>r(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>r(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>q(a.refreshToken,b),codex:(a,b)=>u(a.refreshToken,b),qwen:(a,b)=>s(a.refreshToken,b),iflow:(a,b)=>x(a.refreshToken,b),github:(a,b)=>y(a.refreshToken,b),kiro:(a,b)=>w(a.refreshToken,a.providerSpecificData,b),xai:(a,b)=>o(a.refreshToken,b),"grok-cli":(a,b,c)=>p("grok-cli",a.refreshToken,a,b,c),"codebuddy-cn":(a,b)=>A(a.refreshToken,b),muse:(a,b)=>J(a.providerSpecificData?.dcaToken||a.refreshToken,b),vertex:(a,b)=>H(a,b,"vertex"),"vertex-partner":(a,b)=>H(a,b,"vertex-partner")};async function J(a,b){if(!a)return null;try{let c=process.env.META_MINT_URL||"https://api.meta.ai/muse-code/key",d=await (0,f.Fm)(c,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":"muse-code/1.0.2","Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({dca_token:a}),identity:"muse-code",provider:"muse"});if(!d.ok)return b?.warn?.("TOKEN_REFRESH",`Failed to re-mint Meta Muse API key: ${d.status}`),null;let e=await d.json();return{accessToken:e.api_key,apiKey:e.api_key,providerSpecificData:{apiKey:e.api_key,baseUrl:e.base_url||"https://api.meta.ai/v1"}}}catch(a){return b?.warn?.("TOKEN_REFRESH",`Error re-minting Meta Muse API key: ${a?.message}`),null}}async function K(a,b,c,d=null){let e="vertex"===a||"vertex-partner"===a;if(!b.refreshToken&&!(e&&b?.apiKey))return null;let f=I[a];return f?f(b,c,d):p(a,b.refreshToken,b,c,d)}async function L(a,b=3,c=null,d=null){for(let e=0;e<b;e++){if(d?.throwIfAborted(),e>0){let a=1e3*e;c?.debug?.("TOKEN_REFRESH",`Retry ${e}/${b} after ${a}ms`),await new Promise(b=>{let c=()=>{clearTimeout(e),d?.removeEventListener("abort",c),b()},e=setTimeout(c,a);d?.addEventListener("abort",c,{once:!0}),d?.aborted&&c()}),d?.throwIfAborted()}try{let b=await a();if(C(b)||b)return b}catch(a){d?.throwIfAborted(),c?.warn?.("TOKEN_REFRESH",`Attempt ${e+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},57034:(a,b,c)=>{c.d(b,{i7:()=>e,l6:()=>f});let d=/^[a-z]{2}(?:-[a-z0-9]+)+-\d{1,2}$/;function e(a){return"string"==typeof a&&d.test(a)}function f(a,b="us-east-1"){return e(a)?a:b}}};
|