zevairouter 1.0.239 → 1.0.240
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/CHANGELOG.md +5 -0
- package/README.md +2 -1
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +8 -8
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +8 -8
- package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7319.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/7634.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/static/chunks/{620-dcc7b8b09e769219.js → 620-2d8f3872640bda76.js} +1 -1
- package/cli/app/CHANGELOG.md +5 -0
- package/cli/app/package.json +1 -1
- package/cli/package.json +1 -1
- package/package.json +1 -1
- /package/cli/app/.next-cli-build/static/{_v7ydVNs7s5EDF1xhpHiV → fkiY1j1HeodocNT8BXwrJ}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{_v7ydVNs7s5EDF1xhpHiV → fkiY1j1HeodocNT8BXwrJ}/_ssgManifest.js +0 -0
|
@@ -18,4 +18,4 @@ ${a}`),e.push({role:"tool",tool_call_id:b.tool_use_id,content:a})}}let j=g.join(
|
|
|
18
18
|
|
|
19
19
|
${g}`:g,b.toolResults=e,0!==e.length||b.tools?.length||delete a.userInputMessageContext}}(t,e),s?.length>0&&!e.userInputMessage.userInputMessageContext?.tools&&(e.userInputMessage.userInputMessageContext||(e.userInputMessage.userInputMessageContext={}),e.userInputMessage.userInputMessageContext.tools=s),{history:t,currentMessage:e}}(e,h,p),v=d?.providerSpecificData?.profileArn||"",w=u?.userInputMessage?.content||"",x=new Date().toISOString(),y=[];r&&y.push((0,g.aZ)()),y.push(`[Context: Current time is ${x}]`),q&&y.push(g.rG),w=`${y.join("\n\n")}
|
|
20
20
|
|
|
21
|
-
${w}`;let z={conversationState:{chatTriggerType:"MANUAL",conversationId:(0,f.A)(),currentMessage:{userInputMessage:{content:w,modelId:p,origin:"AI_EDITOR",...u?.userInputMessage?.images?.length>0&&{images:u.userInputMessage.images},...u?.userInputMessage?.userInputMessageContext&&{userInputMessageContext:u.userInputMessage.userInputMessageContext}}},history:t}};return v&&(z.profileArn=v),(m||void 0!==n||void 0!==o)&&(z.inferenceConfig={},m&&(z.inferenceConfig.maxTokens=m),void 0!==n&&(z.inferenceConfig.temperature=n),void 0!==o&&(z.inferenceConfig.topP=o)),Object.defineProperty(z,"_kiroUpstreamModel",{value:p,enumerable:!1}),Object.defineProperty(z,"_kiroThinkingEnabled",{value:r,enumerable:!1}),Object.defineProperty(z,"_kiroExposeReasoning",{value:s,enumerable:!1}),z}(0,d.kz)(e.h.OPENAI,e.h.KIRO,m,null)},80662:(a,b,c)=>{c.d(b,{RF:()=>i,oV:()=>p});var d=c(55511),e=c.n(d),f=c(41004);let g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of g)a-c.lastUsed>f.v1.sessionTtlMs&&g.delete(b)},f.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=g.get(a);if(b)return b.lastUsed=Date.now(),b.sessionId;if(g.size>=1e3){let a=g.keys().next().value;g.delete(a)}let c=j();return g.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return e().randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id","x-client-request-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}let o=/^[a-z]+\/([0-9a-f-]{36})\//i;function p({headers:a,body:b,connectionId:c,workspaceId:d,scope:f=""}={}){let g=function(a,b){let c=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id);if(c)return`claude:${c}`;let d=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(o):null;return c?n(c[1]):null}(b);if(d)return`antigravity:${d}`;for(let b of l){let c=a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null;if(c)return c}return n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||n(b?.metadata?.user_id)||null}(a,b);if(g)return g;let h=function(a,b){var c;let d=function(a){let b=Array.isArray(a?.input)?a.input:Array.isArray(a?.messages)?a.messages:null;if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(d.length<50)return null;let f=(c=`${a}:${d.slice(0,50)}`,e().createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return h;let q=n(d);return q||i(c)}let q=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>f.v1.sessionTtlMs&&k.delete(b)},f.v1.sessionCleanupIntervalMs);q.unref&&q.unref()},89475:(a,b,c)=>{c.r(b),c.d(b,{openaiToAntigravityResponse:()=>f});var d=c(33110),e=c(14170);function f(a,b){if(!a)return null;let c=a.choices?.[0];if(!c)return a.usage&&(b._usage=a.usage),null;let d=c.delta||{},e=c.finish_reason;b._toolCallAccum||(b._toolCallAccum={}),b._responseId||(b._responseId=a.id||`resp_${Date.now()}`),b._modelVersion||(b._modelVersion=a.model||"");let f=[];if(d.reasoning_content&&f.push({thought:!0,text:d.reasoning_content}),d.content&&f.push({text:d.content}),d.tool_calls){for(let a of d.tool_calls){let c=a.index??0;b._toolCallAccum[c]||(b._toolCallAccum[c]={id:"",name:"",arguments:""});let d=b._toolCallAccum[c];a.id&&(d.id=a.id),a.function?.name&&(d.name+=a.function.name),a.function?.arguments&&(d.arguments+=a.function.arguments)}if(0===f.length&&!e)return null}if(e)for(let a of Object.keys(b._toolCallAccum)){let c=b._toolCallAccum[a],d={};try{d=JSON.parse(c.arguments)}catch{}let e=b.toolNameMap?.get(c.name)||c.name;f.push({functionCall:{name:e,args:d}})}if(0===f.length&&!e)return null;0===f.length&&e&&f.push({text:""});let g={content:{role:"model",parts:f}};e&&(g.finishReason=({stop:"STOP",length:"MAX_TOKENS",tool_calls:"STOP",content_filter:"SAFETY"})[e]||"STOP");let h={candidates:[g],modelVersion:b._modelVersion,responseId:b._responseId},i=a.usage||b._usage;return i&&(h.usageMetadata={promptTokenCount:i.prompt_tokens||0,candidatesTokenCount:i.completion_tokens||0,totalTokenCount:i.total_tokens||0},i.completion_tokens_details?.reasoning_tokens&&(h.usageMetadata.thoughtsTokenCount=i.completion_tokens_details.reasoning_tokens),i.prompt_tokens_details?.cached_tokens&&(h.usageMetadata.cachedContentTokenCount=i.prompt_tokens_details.cached_tokens)),{response:h}}(0,d.kz)(e.h.OPENAI,e.h.ANTIGRAVITY,null,f)},92306:(a,b,c)=>{function d(a,b){}c.d(b,{T:()=>e,s:()=>d});let e=!1},96281:(a,b,c)=>{c.d(b,{$G:()=>g,bf:()=>e,n6:()=>f,xr:()=>d});let d="EpwGCkYIChgCKkCzVUuRrg7CcglSUWEef4rH6o35g9UYS8ZPe0/VomQTBsFx6sttYNj5l8GqgW6ejuHyYqpFToxIbZl0bw17l5dJEgzCnqDO0Z8fRlMrNgsaDLS1cnCjC53KBqE0CCIwAADQdo1eO+7qPAmo8J4WR3JPmr92S97kmvr5K1iPMiOpkZNj8mEXW8uzBoOJs/9ZKoMFiqHJ3U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ToAntigravityRequest:()=>r,openaiToGeminiCLIRequest:()=>p,openaiToGeminiRequest:()=>o});var d=c(33110),e=c(14170),f=c(96281),g=c(75924),h=c(19979),i=c(47593),j=c(80662),k=c(66306);function l(){return crypto.randomUUID()}function m(a){if(!a)return"_unknown";let b=a.replace(/[^a-zA-Z0-9_.:\-]/g,"_");return/^[a-zA-Z_]/.test(b)||(b="_"+b),b.substring(0,64)}function n(a,b,c,d=f.bf){let e={model:a,contents:[],generationConfig:{},safetySettings:i.fc};void 0!==b.temperature&&(e.generationConfig.temperature=b.temperature),void 0!==b.top_p&&(e.generationConfig.topP=b.top_p),void 0!==b.top_k&&(e.generationConfig.topK=b.top_k);let g=b.max_output_tokens??b.max_completion_tokens??b.max_tokens;void 0!==g&&(e.generationConfig.maxOutputTokens=g);let h={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if("assistant"===a.role&&a.tool_calls)for(let b of a.tool_calls)"function"===b.type&&b.id&&b.function?.name&&(h[b.id]=b.function.name)}let j={};if(b.messages&&Array.isArray(b.messages))for(let a of b.messages)"tool"===a.role&&a.tool_call_id&&(j[a.tool_call_id]=a.content);if(b.messages&&Array.isArray(b.messages))for(let a=0;a<b.messages.length;a++){let c=b.messages[a],f=c.role,g=c.content;if("system"===f&&b.messages.length>1){let a="string"==typeof g?g:(0,i.kU)(g);a&&(e.systemInstruction||(e.systemInstruction={role:"user",parts:[]}),e.systemInstruction.parts.push({text:a}))}else if("user"===f||"system"===f&&1===b.messages.length){let a=(0,i.S6)(g);a.length>0&&e.contents.push({role:"user",parts:a})}else if("assistant"===f){let a=[];if(c.reasoning_content&&(a.push({thought:!0,text:c.reasoning_content}),a.push({thoughtSignature:d,text:""})),g){let b="string"==typeof g?g:(0,i.kU)(g);b&&a.push({text:b})}if(c.tool_calls&&Array.isArray(c.tool_calls)){let b=[];for(let e of c.tool_calls){if("function"!==e.type)continue;let c=(0,i.pT)(e.function?.arguments||"{}");a.push({thoughtSignature:d,functionCall:{id:e.id,name:m(e.function.name),args:c}}),b.push(e.id)}if(a.length>0&&e.contents.push({role:"model",parts:a}),b.some(a=>j[a])){let a=[];for(let c of b){if(!j[c])continue;let b=h[c];if(!b){let a=c.split("-");b=a.length>2?a.slice(0,-2).join("-"):c}let d=j[c],e=(0,i.pT)(d);null===e?e={result:d}:"object"!=typeof e&&(e={result:e}),a.push({functionResponse:{id:c,name:m(b),response:{result:e}}})}a.length>0&&e.contents.push({role:"user",parts:a})}}else a.length>0&&e.contents.push({role:"model",parts:a})}}if(b.tools&&Array.isArray(b.tools)&&b.tools.length>0){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(structuredClone(c.input_schema||{type:"object",properties:{}}));a.push({name:m(c.name),description:c.description||"",parameters:b})}else if("function"===c.type&&c.function){let b=c.function,d=(0,i.Yr)(structuredClone(b.parameters||{type:"object",properties:{}}));a.push({name:m(b.name),description:b.description||"",parameters:d})}a.length>0&&(e.tools=[{functionDeclarations:a}])}return e}function o(a,b,c){return n(a,b,c)}function p(a,b,c){let d=n(a,b,c,f.$G),e=(0,k.nl)("gemini-cli",a);if(b.reasoning_effort){let c=String(b.reasoning_effort).toLowerCase();if(/gemini-3/i.test(a)){d.generationConfig.thinkingConfig={thinkingLevel:c,includeThoughts:!0};let a="high"===c?e.maxOutput:"medium"===c?Math.min(e.maxOutput,32768):Math.min(e.maxOutput,16384);d.generationConfig.maxOutputTokens=Math.max(Number(d.generationConfig.maxOutputTokens)||0,a)}else d.generationConfig.thinkingConfig={thinkingBudget:({none:0,low:1024,medium:8192,high:24576})[c]??8192,includeThoughts:!0}}if(b.thinking?.type==="enabled"&&b.thinking.budget_tokens&&(d.generationConfig.thinkingConfig={thinkingBudget:b.thinking.budget_tokens,includeThoughts:!0}),d.tools?.[0]?.functionDeclarations){for(let a of d.tools[0].functionDeclarations)if(a.parameters){let b=(0,i.Yr)(a.parameters);a.parameters=b}}return d}function q(a,b,c=null,d=!1){let e={project:c?.projectId||c?.providerSpecificData?.projectId||(0,i.w_)(),model:a,userAgent:d?"antigravity":"gemini-cli",requestId:d?`agent-${l()}`:(0,i.KZ)(),request:{sessionId:d?(0,j.RF)(c?.email||c?.connectionId):(0,i.f6)(),contents:b.contents,systemInstruction:b.systemInstruction,generationConfig:b.generationConfig,tools:b.tools}};if(d){e.requestType="agent";let a=[{text:g.$V},{text:`Please ignore the following [ignore]${g.$V}[/ignore]`}];e.request.systemInstruction?.parts?e.request.systemInstruction.parts.unshift(...a):e.request.systemInstruction={role:"user",parts:a}}else e.request.safetySettings=b.safetySettings;return b.tools?.length>0&&(e.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}}),e}function r(a,b,c,d=null){if(a.toLowerCase().includes("claude")){let e=(0,h.openaiToClaudeRequestForAntigravity)(a,b,c);return function(a,b,c=null){let d={project:c?.projectId||c?.providerSpecificData?.projectId||(0,i.w_)(),model:a,userAgent:"antigravity",requestId:`agent-${l()}`,requestType:"agent",request:{sessionId:(0,j.RF)(c?.email||c?.connectionId),contents:[],generationConfig:{temperature:b.temperature||1,maxOutputTokens:b.max_tokens||4096}}},e={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if(Array.isArray(a.content))for(let b of a.content)"tool_use"===b.type&&b.id&&b.name&&(e[b.id]=b.name)}if(b.messages&&Array.isArray(b.messages))for(let a of b.messages){let b=[];if(Array.isArray(a.content)){for(let c of a.content)if("text"===c.type)b.push({text:c.text});else if("tool_use"===c.type)b.push({functionCall:{id:c.id,name:m(c.name),args:c.input||{}}});else if("tool_result"===c.type){let a=c.content;Array.isArray(a)&&(a=a.map(a=>"text"===a.type?a.text:JSON.stringify(a)).join("\n"));let d=e[c.tool_use_id]?m(e[c.tool_use_id]):"tool";b.push({functionResponse:{id:c.tool_use_id,name:d,response:{result:(0,i.pT)(a)||a}}})}}else"string"==typeof a.content&&b.push({text:a.content});b.length>0&&d.request.contents.push({role:"assistant"===a.role?"model":"user",parts:b})}if(b.tools&&Array.isArray(b.tools)){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(c.input_schema);a.push({name:m(c.name),description:c.description||"",parameters:b})}a.length>0&&(d.request.tools=[{functionDeclarations:a}],d.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}})}let f=[{text:g.$V},{text:`Please ignore the following [ignore]${g.$V}[/ignore]`}];if(b.system)if(Array.isArray(b.system))for(let a of b.system)a.text&&f.push({text:a.text});else"string"==typeof b.system&&f.push({text:b.system});return d.request.systemInstruction?.parts?d.request.systemInstruction.parts.unshift(...f):d.request.systemInstruction={role:"user",parts:f},d}(a,e,d)}let e=p(a,b,c);return q(a,e,d,!0)}(0,d.kz)(e.h.OPENAI,e.h.GEMINI,o,null),(0,d.kz)(e.h.OPENAI,e.h.GEMINI_CLI,(a,b,c,d)=>q(a,p(a,b,c),d),null),(0,d.kz)(e.h.OPENAI,e.h.ANTIGRAVITY,r,null)},97821:(a,b,c)=>{c.r(b),c.d(b,{openaiToCommandCode:()=>h});var d=c(33110),e=c(14170),f=c(55511);function g(a){if(null==a)return"";if("string"==typeof a)return a;if(Array.isArray(a)){let b=[];for(let c of a)"string"==typeof c?b.push(c):c&&"object"==typeof c&&"string"==typeof c.text&&b.push(c.text);return b.join("\n")}return String(a)}function h(a,b,c){let{messages:d,system:e}=function(a=[]){let b=[],c=[];for(let d of a){if(!d)continue;let a=d.role;if("system"===a){let a=g(d.content);a&&c.push(a);continue}if("tool"===a){let a="string"==typeof d.content?d.content:g(d.content);b.push({role:"tool",content:[{type:"tool-result",toolCallId:d.tool_call_id||"",toolName:d.name||"",output:{type:"text",value:a}}]});continue}if("assistant"===a){let a=[],c=g(d.content);if(c&&a.push({type:"text",text:c}),Array.isArray(d.tool_calls))for(let b of d.tool_calls){let c=b.function||{};a.push({type:"tool-call",toolCallId:b.id||"",toolName:c.name||"",input:function(a){if(null==a)return{};if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return{_raw:a}}}(c.arguments)})}b.push({role:"assistant",content:a.length?a:[{type:"text",text:""}]});continue}b.push({role:"user",content:function(a){if(null==a)return[{type:"text",text:""}];if("string"==typeof a)return[{type:"text",text:a}];if(Array.isArray(a)){let b=[];for(let c of a)if("string"==typeof c)b.push({type:"text",text:c});else if(c&&"object"==typeof c)if("text"===c.type&&"string"==typeof c.text)b.push({type:"text",text:c.text});else if("image_url"===c.type){let a="string"==typeof c.image_url?c.image_url:c.image_url?.url;a&&b.push({type:"image",image:a})}else if("image"===c.type&&c.source)if("base64"===c.source.type&&c.source.data){let a=c.source.media_type||"image/png";b.push({type:"image",image:`data:${a};base64,${c.source.data}`})}else"url"===c.source.type&&c.source.url&&b.push({type:"image",image:c.source.url});else"string"==typeof c.text&&b.push({type:"text",text:c.text});return b.length?b:[{type:"text",text:""}]}return[{type:"text",text:String(a)}]}(d.content)})}return{messages:b,system:c.join("\n\n")}}(b.messages),h={model:a,messages:d,stream:!1!==c,max_tokens:b.max_tokens??b.max_output_tokens??64e3,temperature:b.temperature??.3};e&&(h.system=e);let i=function(a){if(!Array.isArray(a)||0===a.length)return;let b=[];for(let c of a)c&&("function"===c.type&&c.function?b.push({name:c.function.name,description:c.function.description,input_schema:c.function.parameters||{type:"object"}}):c.name&&(c.input_schema||c.parameters)&&b.push({name:c.name,description:c.description,input_schema:c.input_schema||c.parameters}));return b.length?b:void 0}(b.tools);i&&(h.tools=i),null!=b.top_p&&(h.top_p=b.top_p);let j=new Date().toISOString().slice(0,10);return{threadId:(0,f.randomUUID)(),memory:"",config:{workingDir:process.cwd(),date:j,environment:process.platform,structure:[],isGitRepo:!1,currentBranch:"",mainBranch:"",gitStatus:"",recentCommits:[]},params:h}}(0,d.kz)(e.h.OPENAI,e.h.COMMANDCODE,h,null)}};
|
|
21
|
+
${w}`;let z={conversationState:{chatTriggerType:"MANUAL",conversationId:(0,f.A)(),currentMessage:{userInputMessage:{content:w,modelId:p,origin:"AI_EDITOR",...u?.userInputMessage?.images?.length>0&&{images:u.userInputMessage.images},...u?.userInputMessage?.userInputMessageContext&&{userInputMessageContext:u.userInputMessage.userInputMessageContext}}},history:t}};return v&&(z.profileArn=v),(m||void 0!==n||void 0!==o)&&(z.inferenceConfig={},m&&(z.inferenceConfig.maxTokens=m),void 0!==n&&(z.inferenceConfig.temperature=n),void 0!==o&&(z.inferenceConfig.topP=o)),Object.defineProperty(z,"_kiroUpstreamModel",{value:p,enumerable:!1}),Object.defineProperty(z,"_kiroThinkingEnabled",{value:r,enumerable:!1}),Object.defineProperty(z,"_kiroExposeReasoning",{value:s,enumerable:!1}),z}(0,d.kz)(e.h.OPENAI,e.h.KIRO,m,null)},80662:(a,b,c)=>{c.d(b,{RF:()=>i,oV:()=>p});var d=c(55511),e=c.n(d),f=c(41004);let g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of g)a-c.lastUsed>f.v1.sessionTtlMs&&g.delete(b)},f.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=g.get(a);if(b)return b.lastUsed=Date.now(),b.sessionId;if(g.size>=1e3){let a=g.keys().next().value;g.delete(a)}let c=j();return g.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return e().randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id","x-client-request-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}let o=/^[a-z]+\/([0-9a-f-]{36})\//i;function p({headers:a,body:b,connectionId:c,workspaceId:d,scope:f=""}={}){let g=function(a,b){let c=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id);if(c)return`claude:${c}`;let d=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(o):null;return c?n(c[1]):null}(b);if(d)return`antigravity:${d}`;for(let b of l){let c=a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null;if(c)return c}return n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||n(b?.metadata?.user_id)||null}(a,b);if(g)return g;let h=function(a,b){var c;let d=function(a){let b=Array.isArray(a?.input)?a.input:Array.isArray(a?.messages)?a.messages:null;if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(d.length<50)return null;let f=(c=`${a}:${d.slice(0,50)}`,e().createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return h;let q=n(d);return q||i(c)}let q=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>f.v1.sessionTtlMs&&k.delete(b)},f.v1.sessionCleanupIntervalMs);q.unref&&q.unref()},89475:(a,b,c)=>{c.r(b),c.d(b,{openaiToAntigravityResponse:()=>f});var d=c(33110),e=c(14170);function f(a,b){if(!a)return null;let c=a.choices?.[0];if(!c)return a.usage&&(b._usage=a.usage),null;let d=c.delta||{},e=c.finish_reason;b._toolCallAccum||(b._toolCallAccum={}),b._responseId||(b._responseId=a.id||`resp_${Date.now()}`),b._modelVersion||(b._modelVersion=a.model||"");let f=[];if(d.reasoning_content&&f.push({thought:!0,text:d.reasoning_content}),d.content&&f.push({text:d.content}),d.tool_calls){for(let a of d.tool_calls){let c=a.index??0;b._toolCallAccum[c]||(b._toolCallAccum[c]={id:"",name:"",arguments:""});let d=b._toolCallAccum[c];a.id&&(d.id=a.id),a.function?.name&&(d.name+=a.function.name),a.function?.arguments&&(d.arguments+=a.function.arguments)}if(0===f.length&&!e)return null}if(e)for(let a of Object.keys(b._toolCallAccum)){let c=b._toolCallAccum[a],d={};try{d=JSON.parse(c.arguments)}catch{}let e=b.toolNameMap?.get(c.name)||c.name;f.push({functionCall:{name:e,args:d}})}if(0===f.length&&!e)return null;0===f.length&&e&&f.push({text:""});let g={content:{role:"model",parts:f}};e&&(g.finishReason=({stop:"STOP",length:"MAX_TOKENS",tool_calls:"STOP",content_filter:"SAFETY"})[e]||"STOP");let h={candidates:[g],modelVersion:b._modelVersion,responseId:b._responseId},i=a.usage||b._usage;return i&&(h.usageMetadata={promptTokenCount:i.prompt_tokens||0,candidatesTokenCount:i.completion_tokens||0,totalTokenCount:i.total_tokens||0},i.completion_tokens_details?.reasoning_tokens&&(h.usageMetadata.thoughtsTokenCount=i.completion_tokens_details.reasoning_tokens),i.prompt_tokens_details?.cached_tokens&&(h.usageMetadata.cachedContentTokenCount=i.prompt_tokens_details.cached_tokens)),{response:h}}(0,d.kz)(e.h.OPENAI,e.h.ANTIGRAVITY,null,f)},92306:(a,b,c)=>{function d(a,b){}c.d(b,{T:()=>e,s:()=>d});let e=!1},96281:(a,b,c)=>{c.d(b,{$G:()=>g,bf:()=>e,n6:()=>f,xr:()=>d});let d="EpwGCkYIChgCKkCzVUuRrg7CcglSUWEef4rH6o35g9UYS8ZPe0/VomQTBsFx6sttYNj5l8GqgW6ejuHyYqpFToxIbZl0bw17l5dJEgzCnqDO0Z8fRlMrNgsaDLS1cnCjC53KBqE0CCIwAADQdo1eO+7qPAmo8J4WR3JPmr92S97kmvr5K1iPMiOpkZNj8mEXW8uzBoOJs/9ZKoMFiqHJ3UObwaJDqFOW70E9oCwDoc6jesaWVAEdN5vWfKMpIkjFJjECdjIdkxyJNJ8Ib8yXVal3qwE7uThoPRqSZDdHB5mmwPEjWE/90cSYCbtX2YsJki1265CabBb8/QEkODXg4kgRrL+c8e8rRXz/dr1RswvaPuzEdGKHRNi9UooNUeOK4/ebx1KkP9YZttyohN9GWqlts36kOoW0Cfie/ABDgF9g534BPth/sstxDM6d79QlRmh6NxizyTF74DXJI34u0M4tTRchqE5pAq85SgdJaa+dix1yJPMji8m6nZkwJbscJb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1sbFv/iyfmfCnfvJaSzGmC9CDWKy4iqQ/vBNWps9j1JXk0p5uPAYC2BaMkxl5xoTVZqI3zAuRtQF5JLmPPy+PdqOgFxMKcLGNhwp7dbhIFLF68vCYQ9CL0NnK2d3CFk1UFVYxsi1TsolR1xahe/Rxt5HZDz/z65nevrQ",g="CiQBjz1rX/AlslZWMe5RgBt4Tv9j4+YNZTTez+JH2/+5oAlICygKXgGPPWtf7/Sux9eLYap/bmYAdPqFThLXj+l7o0DLu/hdgU98MA9ZrlRDNHXx+T0tuY8AcnjPZbiDyOq2bE11Fjhsk6p5axqayaapC/Pt9GczcgIQf1z15WTxCeKWAPYKYQGPPWtfDYj0nlNFNoTlU39RC91Z16xFKJ2MLEmkm+NvimsoOJ6be3g2BssNPtJ/9BKDXRA5cVs17tBeeW72lH8TMB5999udtxHM2SiUsnWsrHlfVuGSCpNQQ+5REw8HNvEKkgEBjz1rXzBNWrqZGbjun55K+vgYPBhJO2qZ67uRWXUA5/qcU12U/mbi5XoA3swoxYE8LEXfZvFFC9WG/W28QNCA0Qd4Trk/WkWiAwZmB8a84Fs14rkv3wqyxwFavPkJorqurAfd2XzGiFy0sB0ITCOPYi1HzDGV5WfXk6b9k+jT66/RuzGa8EcSOWo/QtC3Bkhgowo4AY89a1/f/tw8A02zjIoK7JVDAbf8W4UfmbApJJhwXIiGtu1M0JItObx7g2reYqT+HHL2Q/R4VDc="},97102:(a,b,c)=>{c.r(b),c.d(b,{openaiToAntigravityRequest:()=>s,openaiToGeminiCLIRequest:()=>q,openaiToGeminiRequest:()=>p});var d=c(33110),e=c(14170),f=c(96281),g=c(75924),h=c(19979),i=c(47593),j=c(80662),k=c(66306);function l(){return crypto.randomUUID()}function m(a){if(!a)return"_unknown";let b=a.replace(/[^a-zA-Z0-9_.:\-]/g,"_");return/^[a-zA-Z_]/.test(b)||(b="_"+b),b.substring(0,64)}function n(a){let b=[];for(let c of a||[]){if(!c?.role||!Array.isArray(c.parts)||0===c.parts.length)continue;let a=b.at(-1);a?.role===c.role?a.parts.push(...c.parts):b.push({...c,parts:[...c.parts]})}return b.at(-1)?.role==="model"&&b.push({role:"user",parts:[{text:"Please continue."}]}),b}function o(a,b,c,d=f.bf){let e={model:a,contents:[],generationConfig:{},safetySettings:i.fc};void 0!==b.temperature&&(e.generationConfig.temperature=b.temperature),void 0!==b.top_p&&(e.generationConfig.topP=b.top_p),void 0!==b.top_k&&(e.generationConfig.topK=b.top_k);let g=b.max_output_tokens??b.max_completion_tokens??b.max_tokens;void 0!==g&&(e.generationConfig.maxOutputTokens=g);let h={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if("assistant"===a.role&&a.tool_calls)for(let b of a.tool_calls)"function"===b.type&&b.id&&b.function?.name&&(h[b.id]=b.function.name)}let j={};if(b.messages&&Array.isArray(b.messages))for(let a of b.messages)"tool"===a.role&&a.tool_call_id&&(j[a.tool_call_id]=a.content);if(b.messages&&Array.isArray(b.messages))for(let a=0;a<b.messages.length;a++){let c=b.messages[a],f=c.role,g=c.content;if("system"===f&&b.messages.length>1){let a="string"==typeof g?g:(0,i.kU)(g);a&&(e.systemInstruction||(e.systemInstruction={role:"user",parts:[]}),e.systemInstruction.parts.push({text:a}))}else if("user"===f||"system"===f&&1===b.messages.length){let a=(0,i.S6)(g);a.length>0&&e.contents.push({role:"user",parts:a})}else if("assistant"===f){let a=[];if(c.reasoning_content&&(a.push({thought:!0,text:c.reasoning_content}),a.push({thoughtSignature:d,text:""})),g){let b="string"==typeof g?g:(0,i.kU)(g);b&&a.push({text:b})}if(c.tool_calls&&Array.isArray(c.tool_calls)){let b=[];for(let e of c.tool_calls){if("function"!==e.type)continue;let c=(0,i.pT)(e.function?.arguments||"{}");a.push({thoughtSignature:d,functionCall:{id:e.id,name:m(e.function.name),args:c}}),b.push(e.id)}if(a.length>0&&e.contents.push({role:"model",parts:a}),b.some(a=>j[a])){let a=[];for(let c of b){if(!j[c])continue;let b=h[c];if(!b){let a=c.split("-");b=a.length>2?a.slice(0,-2).join("-"):c}let d=j[c],e=(0,i.pT)(d);null===e?e={result:d}:"object"!=typeof e&&(e={result:e}),a.push({functionResponse:{id:c,name:m(b),response:{result:e}}})}a.length>0&&e.contents.push({role:"user",parts:a})}}else a.length>0&&e.contents.push({role:"model",parts:a})}}if(b.tools&&Array.isArray(b.tools)&&b.tools.length>0){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(structuredClone(c.input_schema||{type:"object",properties:{}}));a.push({name:m(c.name),description:c.description||"",parameters:b})}else if("function"===c.type&&c.function){let b=c.function,d=(0,i.Yr)(structuredClone(b.parameters||{type:"object",properties:{}}));a.push({name:m(b.name),description:b.description||"",parameters:d})}a.length>0&&(e.tools=[{functionDeclarations:a}])}return e.contents=n(e.contents),e}function p(a,b,c){return o(a,b,c)}function q(a,b,c){let d=o(a,b,c,f.$G),e=(0,k.nl)("gemini-cli",a);if(b.reasoning_effort){let c=String(b.reasoning_effort).toLowerCase();if(/gemini-3/i.test(a)){d.generationConfig.thinkingConfig={thinkingLevel:c,includeThoughts:!0};let a="high"===c?e.maxOutput:"medium"===c?Math.min(e.maxOutput,32768):Math.min(e.maxOutput,16384);d.generationConfig.maxOutputTokens=Math.max(Number(d.generationConfig.maxOutputTokens)||0,a)}else d.generationConfig.thinkingConfig={thinkingBudget:({none:0,low:1024,medium:8192,high:24576})[c]??8192,includeThoughts:!0}}if(b.thinking?.type==="enabled"&&b.thinking.budget_tokens&&(d.generationConfig.thinkingConfig={thinkingBudget:b.thinking.budget_tokens,includeThoughts:!0}),d.tools?.[0]?.functionDeclarations){for(let a of d.tools[0].functionDeclarations)if(a.parameters){let b=(0,i.Yr)(a.parameters);a.parameters=b}}return d}function r(a,b,c=null,d=!1){let e={project:c?.projectId||c?.providerSpecificData?.projectId||(0,i.w_)(),model:a,userAgent:d?"antigravity":"gemini-cli",requestId:d?`agent-${l()}`:(0,i.KZ)(),request:{sessionId:d?(0,j.RF)(c?.email||c?.connectionId):(0,i.f6)(),contents:b.contents,systemInstruction:b.systemInstruction,generationConfig:b.generationConfig,tools:b.tools}};if(d){e.requestType="agent";let a=[{text:g.$V},{text:`Please ignore the following [ignore]${g.$V}[/ignore]`}];e.request.systemInstruction?.parts?e.request.systemInstruction.parts.unshift(...a):e.request.systemInstruction={role:"user",parts:a}}else e.request.safetySettings=b.safetySettings;return b.tools?.length>0&&(e.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}}),e}function s(a,b,c,d=null){if(a.toLowerCase().includes("claude")){let e=(0,h.openaiToClaudeRequestForAntigravity)(a,b,c);return function(a,b,c=null){let d={project:c?.projectId||c?.providerSpecificData?.projectId||(0,i.w_)(),model:a,userAgent:"antigravity",requestId:`agent-${l()}`,requestType:"agent",request:{sessionId:(0,j.RF)(c?.email||c?.connectionId),contents:[],generationConfig:{temperature:b.temperature||1,maxOutputTokens:b.max_tokens||4096}}},e={};if(b.messages&&Array.isArray(b.messages)){for(let a of b.messages)if(Array.isArray(a.content))for(let b of a.content)"tool_use"===b.type&&b.id&&b.name&&(e[b.id]=b.name)}if(b.messages&&Array.isArray(b.messages))for(let a of b.messages){let b=[];if(Array.isArray(a.content)){for(let c of a.content)if("text"===c.type)b.push({text:c.text});else if("tool_use"===c.type)b.push({functionCall:{id:c.id,name:m(c.name),args:c.input||{}}});else if("tool_result"===c.type){let a=c.content;Array.isArray(a)&&(a=a.map(a=>"text"===a.type?a.text:JSON.stringify(a)).join("\n"));let d=e[c.tool_use_id]?m(e[c.tool_use_id]):"tool";b.push({functionResponse:{id:c.tool_use_id,name:d,response:{result:(0,i.pT)(a)||a}}})}}else"string"==typeof a.content&&b.push({text:a.content});b.length>0&&d.request.contents.push({role:"assistant"===a.role?"model":"user",parts:b})}if(b.tools&&Array.isArray(b.tools)){let a=[];for(let c of b.tools)if(c.name&&c.input_schema){let b=(0,i.Yr)(c.input_schema);a.push({name:m(c.name),description:c.description||"",parameters:b})}a.length>0&&(d.request.tools=[{functionDeclarations:a}],d.request.toolConfig={functionCallingConfig:{mode:"VALIDATED"}})}let f=[{text:g.$V},{text:`Please ignore the following [ignore]${g.$V}[/ignore]`}];if(b.system)if(Array.isArray(b.system))for(let a of b.system)a.text&&f.push({text:a.text});else"string"==typeof b.system&&f.push({text:b.system});return d.request.systemInstruction?.parts?d.request.systemInstruction.parts.unshift(...f):d.request.systemInstruction={role:"user",parts:f},d.request.contents=n(d.request.contents),d}(a,e,d)}let e=q(a,b,c);return r(a,e,d,!0)}(0,d.kz)(e.h.OPENAI,e.h.GEMINI,p,null),(0,d.kz)(e.h.OPENAI,e.h.GEMINI_CLI,(a,b,c,d)=>r(a,q(a,b,c),d),null),(0,d.kz)(e.h.OPENAI,e.h.ANTIGRAVITY,s,null)},97821:(a,b,c)=>{c.r(b),c.d(b,{openaiToCommandCode:()=>h});var d=c(33110),e=c(14170),f=c(55511);function g(a){if(null==a)return"";if("string"==typeof a)return a;if(Array.isArray(a)){let b=[];for(let c of a)"string"==typeof c?b.push(c):c&&"object"==typeof c&&"string"==typeof c.text&&b.push(c.text);return b.join("\n")}return String(a)}function h(a,b,c){let{messages:d,system:e}=function(a=[]){let b=[],c=[];for(let d of a){if(!d)continue;let a=d.role;if("system"===a){let a=g(d.content);a&&c.push(a);continue}if("tool"===a){let a="string"==typeof d.content?d.content:g(d.content);b.push({role:"tool",content:[{type:"tool-result",toolCallId:d.tool_call_id||"",toolName:d.name||"",output:{type:"text",value:a}}]});continue}if("assistant"===a){let a=[],c=g(d.content);if(c&&a.push({type:"text",text:c}),Array.isArray(d.tool_calls))for(let b of d.tool_calls){let c=b.function||{};a.push({type:"tool-call",toolCallId:b.id||"",toolName:c.name||"",input:function(a){if(null==a)return{};if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return{_raw:a}}}(c.arguments)})}b.push({role:"assistant",content:a.length?a:[{type:"text",text:""}]});continue}b.push({role:"user",content:function(a){if(null==a)return[{type:"text",text:""}];if("string"==typeof a)return[{type:"text",text:a}];if(Array.isArray(a)){let b=[];for(let c of a)if("string"==typeof c)b.push({type:"text",text:c});else if(c&&"object"==typeof c)if("text"===c.type&&"string"==typeof c.text)b.push({type:"text",text:c.text});else if("image_url"===c.type){let a="string"==typeof c.image_url?c.image_url:c.image_url?.url;a&&b.push({type:"image",image:a})}else if("image"===c.type&&c.source)if("base64"===c.source.type&&c.source.data){let a=c.source.media_type||"image/png";b.push({type:"image",image:`data:${a};base64,${c.source.data}`})}else"url"===c.source.type&&c.source.url&&b.push({type:"image",image:c.source.url});else"string"==typeof c.text&&b.push({type:"text",text:c.text});return b.length?b:[{type:"text",text:""}]}return[{type:"text",text:String(a)}]}(d.content)})}return{messages:b,system:c.join("\n\n")}}(b.messages),h={model:a,messages:d,stream:!1!==c,max_tokens:b.max_tokens??b.max_output_tokens??64e3,temperature:b.temperature??.3};e&&(h.system=e);let i=function(a){if(!Array.isArray(a)||0===a.length)return;let b=[];for(let c of a)c&&("function"===c.type&&c.function?b.push({name:c.function.name,description:c.function.description,input_schema:c.function.parameters||{type:"object"}}):c.name&&(c.input_schema||c.parameters)&&b.push({name:c.name,description:c.description,input_schema:c.input_schema||c.parameters}));return b.length?b:void 0}(b.tools);i&&(h.tools=i),null!=b.top_p&&(h.top_p=b.top_p);let j=new Date().toISOString().slice(0,10);return{threadId:(0,f.randomUUID)(),memory:"",config:{workingDir:process.cwd(),date:j,environment:process.platform,structure:[],isGitRepo:!1,currentBranch:"",mainBranch:"",gitStatus:"",recentCommits:[]},params:h}}(0,d.kz)(e.h.OPENAI,e.h.COMMANDCODE,h,null)}};
|
|
@@ -2,4 +2,4 @@ exports.id=3949,exports.ids=[3949],exports.modules={12897:(a,b,c)=>{"use strict"
|
|
|
2
2
|
${b?.stderr||""}
|
|
3
3
|
${b?.message||""}`),/(?:invalid choice|unknown (?:command|subcommand)|unrecognized (?:argument|command)|no such command)/i.test(a))return null;throw new u(`Failed to discover the active Hermes ${e} path`,{code:"HERMES_PATH_DISCOVERY_FAILED",status:422})}return function(a,{platform:b,label:c}){let d="win32"===b?i().win32:i().posix,e=String(a??""),f=e.endsWith("\r\n")?e.slice(0,-2):e.endsWith("\n")?e.slice(0,-1):e;if(!(f.length>0&&f.length<=32768&&f===f.trim()&&!/[\u0000-\u001f\u007f]/.test(f)&&d.isAbsolute(f)))throw new u(`Hermes returned an invalid ${c} path`,{code:"HERMES_PATH_INVALID",status:422});return d.normalize(f)}(f?.stdout,{platform:c,label:e})},f=await e("path","config");if(!f)return b;let g=await e("env-path","environment");if(!g)return b;let h="win32"===c?i().win32:i().posix;if(y(h.dirname(f),c)!==y(h.dirname(g),c))throw new u("Hermes config and environment paths use different profiles",{code:"HERMES_PATH_INVALID",status:422});return{...b,configDir:h.dirname(f),configPath:f,envPath:g}}async function X({env:a=process.env,platform:b=n().platform(),homedir:c=n().homedir(),access:d=g().access,realpath:e=g().realpath,runVersion:f=U}={}){let h="win32"===b?l.constants.F_OK:l.constants.X_OK;for(let g of function({env:a,platform:b,homedir:c}){let d="win32"===b?i().win32:i().posix,e=x({env:a,platform:b,homedir:c}).configDir,f="win32"===b?["hermes.exe","hermes"]:["hermes"],g=String(a.PATH||"").split(d.delimiter).map(a=>a.trim().replace(/^"|"$/g,"")).filter(Boolean).flatMap(a=>f.map(b=>d.resolve(a,b)));return"win32"===b?g.push(d.join(e,"hermes-agent","venv","Scripts","hermes.exe")):(g.push(d.join(e,"hermes-agent","venv","bin","hermes")),g.push(d.join(c,".local","bin","hermes")),g.push("/usr/local/bin/hermes"),a.PREFIX&&g.push(d.join(a.PREFIX,"bin","hermes"))),[...new Set(g)]}({env:a,platform:b,homedir:c})){try{await d(g,h)}catch{continue}for(let a of[["--version"],["version"]])try{let b=await f(g,a),c=function(a){let b=S(a).match(/(?:^|\r?\n)\s*Hermes Agent\s+v?(\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)(?:\s|$)/i);return b?.[1]||null}(`${b?.stdout||""}
|
|
4
4
|
${b?.stderr||""}`);if(!c)continue;let d=g;try{d=await e(g)}catch{}return{installed:!0,binaryPath:d,version:c}}catch{}}return{installed:!1,binaryPath:null,version:null}}var Y=c(30869),Z=c(24424);let $="zevairouter-host",_=Promise.resolve();function aa(a){let b=String(a??"");if(!/^[0-9]+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)&&c>=1&&c<=65535?c:null}function ab(a){let b=_.then(a,a);return _=b.catch(()=>{}),b}function ac(a,b){return{installationTarget:$,platform:process.platform,configDir:a.configDir,configPath:a.configPath,envPath:a.envPath,binaryPath:b?.binaryPath||null,version:b?.version||null,supported:!!(b?.installed&&T(b.version)),localBaseUrl:function(){let a=aa(process.env.PORT)??aa(Y.h0.appPort);if(null===a)throw Error("ZevaiRouter app port configuration is invalid");return`http://127.0.0.1:${a}/v1`}()}}function ad(a,b=!1){return{available:a,restorable:b,conflict:a&&!b}}function ae(a,b){return a instanceof u?j.NextResponse.json({error:a.message,code:a.code,installationTarget:$},{status:a.status}):a instanceof SyntaxError?j.NextResponse.json({error:"Request body must be valid JSON",code:"INVALID_HERMES_SETTINGS",installationTarget:$},{status:400}):(console.error(b,a instanceof Error?a.message:a),j.NextResponse.json({error:b,code:"HERMES_IO_ERROR",installationTarget:$},{status:500}))}async function af(a,b){let c;try{let d;c=await g().open(a,"r");let e=await c.stat();if(!e.isFile())throw new u("Hermes settings path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});if(e.size>b)throw new u("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let f=Buffer.allocUnsafe(b+1),h=0;for(;h<f.length;){let{bytesRead:a}=await c.read(f,h,f.length-h,h);if(0===a)break;h+=a}if(h>b)throw new u("Hermes settings file is too large to update safely",{code:"HERMES_FILE_TOO_LARGE",status:422});let i=f.subarray(0,h);try{d=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{throw new u("Hermes settings file is not valid UTF-8",{code:"HERMES_FILE_ENCODING_INVALID",status:422})}return{exists:!0,text:d,mode:511&e.mode,uid:"win32"===process.platform?null:e.uid,gid:"win32"===process.platform?null:e.gid}}catch(a){if(a?.code==="ENOENT")return{exists:!1,text:"",mode:null,uid:null,gid:null};throw a}finally{c&&await c.close().catch(()=>{})}}async function ag(a){try{let b=await g().stat(a,{bigint:!0});if(!b.isFile())throw new u("Hermes backup path is not a regular file",{code:"HERMES_PATH_INVALID",status:422});return{exists:!0,dev:b.dev,ino:b.ino,size:b.size,mode:b.mode,uid:b.uid,gid:b.gid,mtimeNs:b.mtimeNs,ctimeNs:b.ctimeNs}}catch(a){if(a?.code==="ENOENT")return{exists:!1};throw a}}async function ah(a,b){let c=await ag(a);if(!["exists","dev","ino","size","mode","uid","gid","mtimeNs","ctimeNs"].every(a=>c[a]===b[a]))throw new u("Hermes backup changed while it was being discarded",{code:"HERMES_CONFIG_CHANGED",status:409})}async function ai(a){let b;if("win32"!==process.platform)try{b=await g().open(a,"r"),await b.sync()}catch(a){if(!["EBADF","EINVAL","ENOTSUP"].includes(a?.code))throw a}finally{b&&await b.close().catch(()=>{})}}async function aj(a,b,c,{uid:d=null,gid:f=null}={}){let h,j=i().dirname(a);await g().mkdir(j,{recursive:!0,mode:448});let k=i().join(j,`.${i().basename(a)}.${process.pid}.${(0,e.randomUUID)()}.tmp`);try{h=await g().open(k,"wx",c),await h.writeFile(b,"utf8"),"win32"!==process.platform&&Number.isInteger(d)&&Number.isInteger(f)&&(d!==process.getuid()||f!==process.getgid())&&await h.chown(d,f),await h.chmod(c),await h.sync(),await h.close(),h=null,await g().rename(k,a),await ai(j)}finally{h&&await h.close().catch(()=>{}),await g().unlink(k).catch(()=>{})}}async function ak(a){try{await g().unlink(a),await ai(i().dirname(a))}catch(a){if(a?.code!=="ENOENT")throw a}}async function al(a,b){let{exists:c,text:d,mode:e}=b;c?await aj(a,d,e??384,b):await ak(a)}async function am(a,b,c){let d=await af(a,c);if(d.exists!==b.exists||d.text!==b.text||d.mode!==b.mode||d.uid!==b.uid||d.gid!==b.gid)throw new u("Hermes settings changed while the operation was in progress",{code:"HERMES_CONFIG_CHANGED",status:409})}function an(a,b){return a.exists===b.exists&&(!a.exists||a.text===b.text&&a.mode===b.mode&&(null===b.uid||a.uid===b.uid)&&(null===b.gid||a.gid===b.gid))}function ao(a,b){return null!==a?a:"win32"===process.platform?null:b()}async function ap(a,b,c,d){try{let e=await af(a,d),f=an(e,c),g=an(e,b);return f&&await al(a,b),f||g}catch{return!1}}async function aq(a){let b=await af(a.backupPath,262144);return{snapshot:b,backup:b.exists?function(a){let b;try{b=JSON.parse(a)}catch{throw new u("Hermes ZevaiRouter backup is not valid JSON",{code:"HERMES_BACKUP_INVALID",status:409})}if(!(b?.version===1&&b.paths&&"string"==typeof b.paths.configPath&&"string"==typeof b.paths.envPath&&"boolean"==typeof b.before?.configFileExisted&&"boolean"==typeof b.before?.envFileExisted&&Q(b.before.configMode)&&Q(b.before.envMode)&&P(b.before.model)&&"boolean"==typeof b.before?.env?.exists&&(!b.before.env.exists||"string"==typeof b.before.env.line)&&P(b.applied?.model)&&"string"==typeof b.applied?.envHash&&Q(b.applied?.configMode)&&Q(b.applied?.envMode)))throw new u("Hermes ZevaiRouter backup has an unsupported format",{code:"HERMES_BACKUP_INVALID",status:409});return b}(b.text):null}}async function ar(a,b,c){try{let{backup:d}=await aq(a);if(!d)return ad(!1);let e=R(d,{configText:b.text,envText:c.text,configPath:a.configPath,envPath:a.envPath,configMode:b.mode,envMode:c.mode});return ad(!0,e)}catch{return ad(!0,!1)}}function as(a){if(!function(a,{platform:b=n().platform()}={}){let c=[a.configPath,a.envPath,a.backupPath].map(a=>y(a,b));return new Set(c).size===c.length}(a))throw new u("Hermes config, environment, and backup paths must be different",{code:"HERMES_PATH_INVALID",status:422})}async function at(a){try{return await g().realpath(a)}catch(a){if(a?.code!=="ENOENT")throw a}try{if((await g().lstat(a)).isSymbolicLink())throw new u("Hermes settings path is a dangling symbolic link",{code:"HERMES_PATH_INVALID",status:422})}catch(a){if(a?.code!=="ENOENT")throw a}let b=i().dirname(a),c=[i().basename(a)];for(;;){try{let a=await g().realpath(b);return i().join(a,...c)}catch(a){if(a?.code!=="ENOENT")throw a}let d=i().dirname(b);if(d===b)return a;c.unshift(i().basename(b)),b=d}}async function au(a){let[b,c,d]=await Promise.all([at(a.configPath),at(a.envPath),at(a.backupPath)]);return{...a,configDir:i().dirname(b),configPath:b,envPath:c,backupPath:d}}async function av({useBackupPathsWhenUnavailable:a=!1}={}){let b,c=await X(),d=x();if(c.installed)b=await W({installation:c,fallbackPaths:d});else if(a){let a=await au(d);try{let{backup:c}=await aq(a);b=c?function(a,b){if([b?.paths?.configPath,b?.paths?.envPath].some(a=>"string"!=typeof a||!i().isAbsolute(a)||/[\u0000-\u001f\u007f]/.test(a)))throw new u("Hermes backup contains invalid settings paths",{code:"HERMES_BACKUP_INVALID",status:409});return{...a,configDir:i().dirname(b.paths.configPath),configPath:b.paths.configPath,envPath:b.paths.envPath}}(d,c):d}catch{b=d}}else b=d;let e=await au(b);return as(e),{installation:c,paths:e}}async function aw(){try{let{installation:a,paths:b}=await av({useBackupPathsWhenUnavailable:!0}),c=await af(b.configPath,5242880),d=await af(b.envPath,1048576),e=await ar(b,c,d);if(!a.installed)return j.NextResponse.json({installed:!1,...ac(b,a),settings:{model:null},hasZevai:!1,backup:e,message:"Hermes Agent is not installed on the ZevaiRouter host"});let f=function(a){let b=A(a),c=b.get("model",!0);if(!(0,p.jh)(c))return{model:null,hasZevai:!1};let d=C(b)?.model,e=a=>{let b=d?.[a];return"string"==typeof b?b:null},f=e("provider"),g=e("base_url"),h=e("api_key"),i=e("api_mode"),j=null;try{let a=new URL(g);["http:","https:"].includes(a.protocol)&&(a.username="",a.password="",a.search="",a.hash="",j=a.toString().replace(/\/$/,""))}catch{}let k={default:e("default"),provider:f,base_url:j,api_mode:i},l=!1;try{l=["http:","https:"].includes(new URL(g).protocol)}catch{}return{model:k,hasZevai:("custom"===f||f?.startsWith("custom:"))&&l&&h===s&&"chat_completions"===i}}(c.text);return j.NextResponse.json({installed:!0,...ac(b,a),settings:{model:f.model},hasZevai:f.hasZevai,backup:e})}catch(a){return ae(a,"Failed to inspect Hermes settings on the ZevaiRouter host")}}async function ax(a){return ab(async()=>{try{var b;let c=function(a){let b;(!a||"object"!=typeof a||Array.isArray(a))&&v("Request body must be an object");let c=z(a.model,"model",512);(c.toLowerCase().endsWith("/model-id")||/[<>]/.test(c))&&v("model must be a real model identifier, not a placeholder");let d=z(a.apiKey,"apiKey",8192);/^[A-Za-z0-9._~+/=@:%-]+$/.test(d)||v("apiKey contains unsupported characters");let e=z(a.baseUrl,"baseUrl",2048);try{b=new URL(e)}catch{v("baseUrl must be a valid URL")}b&&["http:","https:"].includes(b.protocol)&&b.hostname||v("baseUrl must use http or https"),(b.username||b.password||b.search||b.hash)&&v("baseUrl must not include credentials, a query, or a fragment");let f=b.pathname.replace(/\/+$/,"");return b.pathname=/\/v1$/i.test(f)?`${f.slice(0,-3)}/v1`:`${f}/v1`,{model:c,apiKey:d,baseUrl:b.toString().replace(/\/$/,"")}}(await a.json()),{installation:d,paths:e}=await av();if(!d.installed)throw new u("Hermes Agent is not installed on the ZevaiRouter host",{code:"HERMES_NOT_INSTALLED",status:409});if(!T(d.version))throw new u("Hermes Agent 0.4.0 or newer is required for ZevaiRouter-managed API keys",{code:"HERMES_VERSION_UNSUPPORTED",status:422});let f=await af(e.configPath,5242880),g=await af(e.envPath,1048576),h=await aq(e),i=h.backup;if(i&&!R(i,{configText:f.text,envText:g.text,configPath:e.configPath,envPath:e.envPath,configMode:f.mode,envMode:g.mode}))throw new u("Hermes settings changed after the previous ZevaiRouter Apply; reset or reconcile them first",{code:"HERMES_CONFIG_CHANGED",status:409});let k=function(a,{model:b,baseUrl:c}){let d=A(a),e=F(d),f=d.get("model",!0);for(let[a,e]of((0,p.jh)(f)||(f=H(d,"model",{})),Object.entries({default:b,provider:"custom",base_url:c,api_key:s,api_mode:"chat_completions"})))H(f,a,e);return{text:d.toString(),before:e,applied:F(d)}}(f.text,c),l=function(a,b){let c=M(a),d=c?{exists:!0,line:c.content}:{exists:!1},e=`${r}=${b}`,f=J(a);if(c)f[c.index]=`${e}${L(c.line)}`;else{if(f.length>0&&!/(?:\r\n|\n|\r)$/.test(f.at(-1))){let b=a.includes("\r\n")?"\r\n":"\n";f[f.length-1]+=b}let b=a.includes("\r\n")?"\r\n":"\n";f.push(`${e}${b}`)}return{text:f.join(""),before:d,appliedHash:N(e)}}(g.text,c.apiKey),m=(b=function({paths:a,priorBackup:b=null,configFileExisted:c,envFileExisted:d,configMode:e,envMode:f,configBefore:g,envBefore:h,configApplied:i,envAppliedHash:j,configAppliedMode:k,envAppliedMode:l,now:m=new Date}){return{version:1,createdAt:b?.createdAt||m.toISOString(),updatedAt:m.toISOString(),paths:{configPath:a.configPath,envPath:a.envPath},before:b?.before||{configFileExisted:c,envFileExisted:d,configMode:e,envMode:f,model:g,env:h},applied:{model:i,envHash:j,configMode:k,envMode:l}}}({paths:e,priorBackup:i,configFileExisted:f.exists,envFileExisted:g.exists,configMode:f.mode,envMode:g.mode,configBefore:k.before,envBefore:l.before,configApplied:k.applied,envAppliedHash:l.appliedHash,configAppliedMode:"win32"===process.platform?null:f.mode??384,envAppliedMode:"win32"===process.platform?null:384}),`${JSON.stringify(b,null,2)}
|
|
5
|
-
`);if(Buffer.byteLength(m,"utf8")>262144)throw new u("Hermes managed settings are too large to back up safely",{code:"HERMES_BACKUP_TOO_LARGE",status:422});await am(e.configPath,f,5242880),await am(e.envPath,g,1048576),await am(e.backupPath,h.snapshot,262144);let n={exists:!0,text:m,mode:384,uid:ao(h.snapshot.uid,()=>process.getuid()),gid:ao(h.snapshot.gid,()=>process.getgid())},o={exists:!0,text:k.text,mode:f.mode??384,uid:ao(f.uid,()=>process.getuid()),gid:ao(f.gid,()=>process.getgid())},q={exists:!0,text:l.text,mode:384,uid:ao(g.uid,()=>process.getuid()),gid:ao(g.gid,()=>process.getgid())};try{await al(e.backupPath,n),await al(e.configPath,o),await al(e.envPath,q)}catch(d){let a=await ap(e.envPath,g,q,1048576),b=await ap(e.configPath,f,o,5242880),c=!!a&&!!b&&await ap(e.backupPath,h.snapshot,n,262144);throw a&&b&&c||console.error("Hermes Apply rollback could not safely restore every file"),d}return j.NextResponse.json({success:!0,message:"Hermes settings applied on the ZevaiRouter host",...ac(e,d),backup:ad(!0,!0)})}catch(a){return ae(a,"Failed to update Hermes settings on the ZevaiRouter host")}})}async function ay(a){return ab(async()=>{try{if(a?.url&&"1"===new URL(a.url,"http://localhost").searchParams.get("discard")){let a=await au(x());as(a);let b=await ag(a.backupPath);if(!b.exists)throw new u("No ZevaiRouter Hermes backup is available to discard",{code:"HERMES_BACKUP_NOT_FOUND",status:404});return await ah(a.backupPath,b),await ak(a.backupPath),j.NextResponse.json({success:!0,discarded:!0,message:"Hermes backup discarded; config and environment settings were not changed",installationTarget:$,configPath:a.configPath,envPath:a.envPath,backup:ad(!1)})}let{paths:b}=await av({useBackupPathsWhenUnavailable:!0}),c=await af(b.configPath,5242880),d=await af(b.envPath,1048576),e=await aq(b);if(!e.backup)throw new u("No ZevaiRouter Hermes backup is available to restore",{code:"HERMES_BACKUP_NOT_FOUND",status:404});let f=e.backup;if(!R(f,{configText:c.text,envText:d.text,configPath:b.configPath,envPath:b.envPath,configMode:c.mode,envMode:d.mode}))throw new u("Hermes managed settings changed after ZevaiRouter applied them",{code:"HERMES_CONFIG_CHANGED",status:409});let g=I(c.text,f.before.model,f.applied.model),h=O(d.text,f.before.env,f.applied.envHash),i={exists:f.before.configFileExisted||"{}"!==g.trim(),text:g,mode:f.before.configMode??384,uid:c.uid,gid:c.gid},k={exists:f.before.envFileExisted||h.trim().length>0,text:h,mode:f.before.envMode??384,uid:d.uid,gid:d.gid};await am(b.configPath,c,5242880),await am(b.envPath,d,1048576),await am(b.backupPath,e.snapshot,262144);try{await al(b.configPath,i),await al(b.envPath,k),await ak(b.backupPath)}catch(f){let a=await ap(b.envPath,d,k,1048576),e=await ap(b.configPath,c,i,5242880);throw a&&e||console.error("Hermes Reset rollback could not safely restore every file"),f}return j.NextResponse.json({success:!0,message:"Previous Hermes settings restored on the ZevaiRouter host",installationTarget:$,configPath:b.configPath,envPath:b.envPath,backup:ad(!1)})}catch(b){let a=ae(b,"Failed to restore Hermes settings on the ZevaiRouter host");if(b instanceof u&&"HERMES_CONFIG_CHANGED"===b.code)return j.NextResponse.json({error:b.message,code:b.code,installationTarget:$,backup:ad(!0,!1)},{status:b.status});return a}})}(0,Z.D)([aw,ax,ay]),(0,d.A)(aw,"00ba3352bae61e90fe842da8971769749305cc5ce8",null),(0,d.A)(ax,"40634a43bd5ceded48b51bd424b01b8e681a76eed0",null),(0,d.A)(ay,"40f13f03b31ba8f5619033b52eaea86644ad879468",null)},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat","notion-ai":"https://app.notion.com/api/v3/runInferenceTranscript"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.
|
|
5
|
+
`);if(Buffer.byteLength(m,"utf8")>262144)throw new u("Hermes managed settings are too large to back up safely",{code:"HERMES_BACKUP_TOO_LARGE",status:422});await am(e.configPath,f,5242880),await am(e.envPath,g,1048576),await am(e.backupPath,h.snapshot,262144);let n={exists:!0,text:m,mode:384,uid:ao(h.snapshot.uid,()=>process.getuid()),gid:ao(h.snapshot.gid,()=>process.getgid())},o={exists:!0,text:k.text,mode:f.mode??384,uid:ao(f.uid,()=>process.getuid()),gid:ao(f.gid,()=>process.getgid())},q={exists:!0,text:l.text,mode:384,uid:ao(g.uid,()=>process.getuid()),gid:ao(g.gid,()=>process.getgid())};try{await al(e.backupPath,n),await al(e.configPath,o),await al(e.envPath,q)}catch(d){let a=await ap(e.envPath,g,q,1048576),b=await ap(e.configPath,f,o,5242880),c=!!a&&!!b&&await ap(e.backupPath,h.snapshot,n,262144);throw a&&b&&c||console.error("Hermes Apply rollback could not safely restore every file"),d}return j.NextResponse.json({success:!0,message:"Hermes settings applied on the ZevaiRouter host",...ac(e,d),backup:ad(!0,!0)})}catch(a){return ae(a,"Failed to update Hermes settings on the ZevaiRouter host")}})}async function ay(a){return ab(async()=>{try{if(a?.url&&"1"===new URL(a.url,"http://localhost").searchParams.get("discard")){let a=await au(x());as(a);let b=await ag(a.backupPath);if(!b.exists)throw new u("No ZevaiRouter Hermes backup is available to discard",{code:"HERMES_BACKUP_NOT_FOUND",status:404});return await ah(a.backupPath,b),await ak(a.backupPath),j.NextResponse.json({success:!0,discarded:!0,message:"Hermes backup discarded; config and environment settings were not changed",installationTarget:$,configPath:a.configPath,envPath:a.envPath,backup:ad(!1)})}let{paths:b}=await av({useBackupPathsWhenUnavailable:!0}),c=await af(b.configPath,5242880),d=await af(b.envPath,1048576),e=await aq(b);if(!e.backup)throw new u("No ZevaiRouter Hermes backup is available to restore",{code:"HERMES_BACKUP_NOT_FOUND",status:404});let f=e.backup;if(!R(f,{configText:c.text,envText:d.text,configPath:b.configPath,envPath:b.envPath,configMode:c.mode,envMode:d.mode}))throw new u("Hermes managed settings changed after ZevaiRouter applied them",{code:"HERMES_CONFIG_CHANGED",status:409});let g=I(c.text,f.before.model,f.applied.model),h=O(d.text,f.before.env,f.applied.envHash),i={exists:f.before.configFileExisted||"{}"!==g.trim(),text:g,mode:f.before.configMode??384,uid:c.uid,gid:c.gid},k={exists:f.before.envFileExisted||h.trim().length>0,text:h,mode:f.before.envMode??384,uid:d.uid,gid:d.gid};await am(b.configPath,c,5242880),await am(b.envPath,d,1048576),await am(b.backupPath,e.snapshot,262144);try{await al(b.configPath,i),await al(b.envPath,k),await ak(b.backupPath)}catch(f){let a=await ap(b.envPath,d,k,1048576),e=await ap(b.configPath,c,i,5242880);throw a&&e||console.error("Hermes Reset rollback could not safely restore every file"),f}return j.NextResponse.json({success:!0,message:"Previous Hermes settings restored on the ZevaiRouter host",installationTarget:$,configPath:b.configPath,envPath:b.envPath,backup:ad(!1)})}catch(b){let a=ae(b,"Failed to restore Hermes settings on the ZevaiRouter host");if(b instanceof u&&"HERMES_CONFIG_CHANGED"===b.code)return j.NextResponse.json({error:b.message,code:b.code,installationTarget:$,backup:ad(!0,!1)},{status:b.status});return a}})}(0,Z.D)([aw,ax,ay]),(0,d.A)(aw,"00ba3352bae61e90fe842da8971769749305cc5ce8",null),(0,d.A)(ax,"40634a43bd5ceded48b51bd424b01b8e681a76eed0",null),(0,d.A)(ay,"40f13f03b31ba8f5619033b52eaea86644ad879468",null)},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat","notion-ai":"https://app.notion.com/api/v3/runInferenceTranscript"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.240","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(83477);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=4827,exports.ids=[4827],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);async function m({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){let b=[],c=process.platform,e=new Set([process.pid,...Array.isArray(a)?a:[]].filter(a=>null!=a).map(String));if("win32"===c){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(a=>{let c=a.toLowerCase();if(c.includes("zevai")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=a.match(/^"(\d+)"/);c&&c[1]&&!e.has(c[1])&&b.push(c[1])}})}catch{}for(let a of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${a} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(a=>{let c=a.trim();!c||isNaN(c)||e.has(c)||b.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(a=>{if(a.includes("zevai")||a.includes("next-server")||a.includes("cloudflared")||a.includes("/bin/app/")||a.includes("tray_darwin")||a.includes("tray_linux")){let c=a.trim().split(/\s+/)[1];!c||isNaN(c)||e.has(c)||b.push(c)}})}catch{}return b}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],l=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});l.unref();try{await m({excludePids:[l.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),l.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat","notion-ai":"https://app.notion.com/api/v3/runInferenceTranscript"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.239","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(83477);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
|
|
1
|
+
exports.id=4827,exports.ids=[4827],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);async function m({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){let b=[],c=process.platform,e=new Set([process.pid,...Array.isArray(a)?a:[]].filter(a=>null!=a).map(String));if("win32"===c){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(a=>{let c=a.toLowerCase();if(c.includes("zevai")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=a.match(/^"(\d+)"/);c&&c[1]&&!e.has(c[1])&&b.push(c[1])}})}catch{}for(let a of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${a} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(a=>{let c=a.trim();!c||isNaN(c)||e.has(c)||b.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(a=>{if(a.includes("zevai")||a.includes("next-server")||a.includes("cloudflared")||a.includes("/bin/app/")||a.includes("tray_darwin")||a.includes("tray_linux")){let c=a.trim().split(/\s+/)[1];!c||isNaN(c)||e.has(c)||b.push(c)}})}catch{}return b}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],l=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});l.unref();try{await m({excludePids:[l.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),l.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat","notion-ai":"https://app.notion.com/api/v3/runInferenceTranscript"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.240","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(83477);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
|