zevairouter 1.0.206 → 1.0.207
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/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +7 -7
- 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/providers/validate/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 +7 -7
- package/cli/app/.next-cli-build/server/chunks/1131.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/5949.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/7276.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7319.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-1fe63031e911e8ae.js → 620-5efe52c8e30b940f.js} +1 -1
- package/cli/app/CHANGELOG.md +5 -0
- package/cli/app/cli/hooks/notionTlsRuntime.js +2 -2
- package/cli/app/cli/hooks/postinstall.js +8 -5
- package/cli/app/cli/hooks/startupRuntime.js +10 -0
- package/cli/app/package.json +1 -1
- package/cli/cli.js +5 -1
- package/cli/hooks/notionTlsRuntime.js +2 -2
- package/cli/hooks/postinstall.js +8 -5
- package/cli/hooks/startupRuntime.js +10 -0
- package/cli/package.json +1 -1
- package/package.json +1 -1
- /package/cli/app/.next-cli-build/static/{QQpdzzC0MRu531K7Yj_1P → tCLrIME_x5vk2wyOG_a1Q}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{QQpdzzC0MRu531K7Yj_1P → tCLrIME_x5vk2wyOG_a1Q}/_ssgManifest.js +0 -0
|
@@ -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.207","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":{"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","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 uses 5.0.9 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","minimatch":"file:vendor/minimatch3-secure","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","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(44404);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.206","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":{"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","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 uses 5.0.9 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","minimatch":"file:vendor/minimatch3-secure","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","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(44404);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.207","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":{"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","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 uses 5.0.9 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","minimatch":"file:vendor/minimatch3-secure","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","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(44404);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,4 +1,4 @@
|
|
|
1
|
-
exports.id=5949,exports.ids=[5949],exports.modules={6848:(a,b,c)=>{"use strict";let d=c(29021),e=c(33873),{getRuntimeDir:f,getRuntimeNodeModules:g,runNpmInstall:h,summarizeNpmError:i}=c(24344),j="tls-client-node",k="0.2.0";function l(){return d.existsSync(e.join(g(),j,"package.json"))}a.exports={ensureNotionTlsRuntime:function({silent:a=!1}={}){let b,c;if(l())return{ok:!0,already:!0};let g=(b=f(),d.mkdirSync(b,{recursive:!0}),c=e.join(b,"package.json"),d.existsSync(c)||d.writeFileSync(c,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0},null,2)),b),m=h({cwd:g,pkgs:[`${j}@${k}`],timeout:3e5});return m.ok||a||(console.warn(`[zevai][runtime] Notion TLS install skipped: ${i(m.stderr||m.stdout)}`),console.warn(`[zevai][runtime] Retry: cd "${g}" && npm install ${j}@${k}`)),{ok:m.ok&&l()}},hasNotionTlsRuntime:l}},24344:(a,b,c)=>{"use strict";let{execSync:d,spawnSync:e}=c(79646),f=c(29021),g=c(21820),h=c(33873),i="zevai";function j(){return h.join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?h.join(process.env.APPDATA||g.homedir(),i):h.join(g.homedir(),`.${i}`),"runtime")}function k(){return h.join(j(),"node_modules")}function l(){let a=j();f.existsSync(a)||f.mkdirSync(a,{recursive:!0});let b=h.join(a,"package.json");return f.existsSync(b)||f.writeFileSync(b,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0,description:"User-writable runtime deps for ZevaiRouter (better-sqlite3 native binary)"},null,2)),a}function m(a){return f.existsSync(h.join(k(),a,"package.json"))}function n(){let a=h.join(k(),"better-sqlite3","build","Release","better_sqlite3.node");if(!f.existsSync(a))return!1;try{let b=f.openSync(a,"r"),c=Buffer.alloc(4);f.readSync(b,c,0,4,0),f.closeSync(b);let d=c.toString("hex");if("linux"===process.platform)return d.startsWith("7f454c46");if("darwin"===process.platform)return d.startsWith("cffaedfe")||d.startsWith("cefaedfe");if("win32"===process.platform)return d.startsWith("4d5a");return!0}catch{return!1}}function o(a=""){let b=String(a);if(/ENOTFOUND|ETIMEDOUT|EAI_AGAIN|network|getaddrinfo/i.test(b))return"No internet connection or registry unreachable";if(/EACCES|EPERM|permission denied/i.test(b))return"Permission denied (check folder permissions)";if(/ENOSPC|no space/i.test(b))return"Not enough disk space";if(/node-gyp|gyp ERR|python|MSBuild|Visual Studio|Xcode/i.test(b))return"Missing build tools (Xcode CLT / Python / VS Build Tools)";if(/ETARGET|version.*not found/i.test(b))return"Package version not found on registry";let c=b.match(/npm ERR! (.+)/);if(c)return c[1].slice(0,200);let d=b.trim().split(/\r?\n/).filter(Boolean).pop();return d?d.slice(0,200):"Unknown error"}function p({cwd:a,pkgs:b,extraArgs:c=[],timeout:d=18e4}){let g=["install",...b,"--save","--no-audit","--no-fund","--prefer-online","--loglevel=error",...c.filter(a=>"--no-save"!==a)],i="win32"===process.platform?"npm.cmd":"npm",j=g,k="win32"===process.platform;try{let a=h.join(h.dirname(process.execPath),"..","lib","node_modules","npm","bin","npm-cli.js");f.existsSync(a)&&(i=process.execPath,j=[a,...g],k=!1)}catch{}let l=e(i,j,{cwd:a,stdio:["ignore","pipe","pipe"],timeout:d,shell:k,encoding:"utf8"});return{ok:0===l.status,code:l.status,stderr:l.stderr||"",stdout:l.stdout||""}}a.exports={ensureSqliteRuntime:function({silent:a=!1}={}){return(l(),m("better-sqlite3")&&n())?(a||console.log("✅ SQLite engine ready"),{betterSqlite:!0}):{betterSqlite:function(a,b={}){let c=l(),d=b.optional?["--no-save"]:[];b.silent||console.log("⏳ Installing SQLite engine (first run)...");let e=p({cwd:c,pkgs:a,extraArgs:d,timeout:b.timeout||18e4});if(!e.ok&&!b.silent){let b=o(e.stderr);console.warn("⚠️ SQLite engine install failed — using fallback"),console.warn(` Reason: ${b}`),console.warn(` Retry: cd "${c}" && npm install ${a.join(" ")}`)}return e.ok}(["better-sqlite3@12.6.2"],{optional:!0,silent:a})&&m("better-sqlite3")&&n()}},buildEnvWithRuntime:function(a=process.env){let b=[k(),h.join(__dirname,"..","app","node_modules"),h.join(__dirname,"..","..","node_modules"),a.NODE_PATH||""].filter(Boolean).join(h.delimiter);return{...a,NODE_PATH:b}},getRuntimeDir:j,getRuntimeNodeModules:k,runNpmInstall:p,summarizeNpmError:o}},50982:(a,b,c)=>{var d={"./cloakbrowserRuntime":99436,"./cloakbrowserRuntime.js":99436,"./notionTlsRuntime":6848,"./notionTlsRuntime.js":6848,"./postinstall":77897,"./postinstall.js":77897,"./safeGlobalInstall":65185,"./safeGlobalInstall.js":65185,"./sqliteRuntime":24344,"./sqliteRuntime.js":24344,"./startupRuntime":83445,"./startupRuntime.js":83445,"./streamCommand":69069,"./streamCommand.js":69069,"./trayRuntime":52784,"./trayRuntime.js":52784};function e(a){return c(f(a))}function f(a){if(!c.o(d,a)){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}return d[a]}e.keys=function(){return Object.keys(d)},e.resolve=f,a.exports=e,e.id=50982},51029:a=>{function b(a){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}b.keys=()=>[],b.resolve=b,b.id=51029,a.exports=b},52784:(a,b,c)=>{"use strict";let{spawnSync:d}=c(79646),e=c(29021),f=c(33873),{getRuntimeDir:g,getRuntimeNodeModules:h,runNpmInstall:i,summarizeNpmError:j}=c(24344),k="systray2",l="systray";function m(){return e.existsSync(f.join(h(),k,"package.json"))}function n({silent:a=!1}={}){if("win32"===process.platform)return;let b="darwin"===process.platform?"tray_darwin_release":"tray_linux_release",c=f.join(h(),k,"traybin",b);if(e.existsSync(c))try{e.chmodSync(c,493)}catch(b){a||console.warn(`[zevai][runtime] chmod tray bin failed: ${b.message}`)}}a.exports={ensureTrayRuntime:function({silent:a=!1}={}){if(!function({silent:a=!1}={}){for(let b of[f.join(h(),l),f.join(__dirname,"..","node_modules",l)])if(e.existsSync(b))try{e.rmSync(b,{recursive:!0,force:!0}),a||console.log(`[zevai][runtime] removed legacy systray: ${b}`)}catch(c){a||console.warn(`[zevai][runtime] failed to remove ${b}: ${c.message}`)}}({silent:a}),"win32"===process.platform)return{systray:!1,skipped:!0};if(m())return n({silent:a}),a||console.log("✅ System tray ready"),{systray:!0};let b=function(a,{silent:b=!1}={}){let c,d,h=(c=g(),e.existsSync(c)||e.mkdirSync(c,{recursive:!0}),d=f.join(c,"package.json"),e.existsSync(d)||e.writeFileSync(d,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0},null,2)),c);b||console.log("⏳ Installing system tray (first run)...");let k=i({cwd:h,pkgs:a,extraArgs:["--no-save"],timeout:12e4});if(!k.ok&&!b){let b=j(k.stderr);console.warn("⚠️ System tray install failed — tray disabled"),console.warn(` Reason: ${b}`),console.warn(` Retry: cd "${h}" && npm install ${a.join(" ")}`)}return k.ok}([`${k}@2.1.4`],{silent:a});return b&&n({silent:a}),{systray:b&&m()}}}},65185:(a,b,c)=>{"use strict";a=c.nmd(a);let{execFileSync:d,spawnSync:e}=c(79646),f=c(29021),g=c(21820),h=c(33873),i="zevairouter",j="zevai";function k(a){console.log(`[zevai-install] ${a}`)}function l(a){console.warn(`[zevai-install] ${a}`)}function m(){let a=process.platform;return"darwin"===a?{id:"mac",label:"macOS"}:"win32"===a?{id:"windows",label:"Windows"}:"linux"===a?{id:"linux",label:"Linux"}:{id:a,label:a}}function n(){let a=h.dirname(process.execPath);for(let b of"win32"===process.platform?[h.join(a,"node_modules","npm","bin","npm-cli.js"),h.join(a,"npm.cmd"),h.join(a,"npm"),"npm.cmd","npm"]:[h.join(a,"npm"),h.join(a,"..","lib","node_modules","npm","bin","npm-cli.js")])if("npm"!==b&&"npm.cmd"!==b&&f.existsSync(b))return b;try{let a="win32"===process.platform?"where":"which",b=d(a,["npm"],{encoding:"utf8"}).trim().split(/\r?\n/)[0];if(b)return b}catch{}return"win32"===process.platform?"npm.cmd":"npm"}function o(a,b,c={}){let d={...process.env,npm_config_fund:"false",npm_config_audit:"false",npm_config_update_notifier:"false",npm_node_execpath:process.execPath},i=a.endsWith("npm-cli.js"),j=i?process.execPath:a,k=i?[a,...b]:b;if(c.stream){let a=f.mkdtempSync(h.join(g.tmpdir(),"zevai-command-")),b=h.join(a,"result.json");try{let a=h.join(__dirname,"streamCommand.js"),g=e(process.execPath,[a,b,j,...k],{env:{...d,ZEVAI_STREAM_COMMAND_SHELL:"win32"!==process.platform||i?"0":"1"},stdio:"inherit",timeout:c.timeout||6e5,windowsHide:!0}),l={};try{l=JSON.parse(f.readFileSync(b,"utf8"))}catch{}return{ok:0===g.status&&0===l.status,status:l.status??g.status,stdout:l.stdout||"",stderr:l.stderr||"",error:g.error||l.error||null}}finally{try{f.rmSync(a,{recursive:!0,force:!0})}catch{}}}let l=e(j,k,{encoding:"utf8",env:d,shell:"win32"===process.platform&&!i,timeout:c.timeout||6e5});return{ok:0===l.status,status:l.status,stdout:l.stdout||"",stderr:l.stderr||"",error:l.error}}function p(a){let b=(o(a,["root","-g"],{timeout:3e4}).stdout||"").trim().split(/\r?\n/).filter(Boolean).pop();return b&&f.existsSync(b)?b:"win32"===process.platform?h.join(h.dirname(process.execPath),"node_modules"):h.join(h.dirname(process.execPath),"..","lib","node_modules")}function q(a){let b=(o(a,["prefix","-g"],{timeout:3e4}).stdout||"").trim().split(/\r?\n/).filter(Boolean).pop();if(b&&f.existsSync(b)){if("win32"===process.platform)return b;let a=h.join(b,"bin");if(f.existsSync(a))return a}return h.dirname(process.execPath)}function r(a){let b=h.join(a,i);f.existsSync(b)&&(k(`Removing previous install: ${b}`),f.rmSync(b,{recursive:!0,force:!0,maxRetries:5,retryDelay:200}));try{for(let b of f.readdirSync(a))if(b.startsWith(`.${i}-`)||b===`.${i}`){let c=h.join(a,b);k(`Removing leftover: ${c}`),f.rmSync(c,{recursive:!0,force:!0,maxRetries:5,retryDelay:200})}}catch{}}function s(a){for(let b of"win32"===process.platform?[`${j}.cmd`,`${j}`,`${j}.ps1`]:[j]){let c=h.join(a,b);try{f.existsSync(c)&&f.rmSync(c,{force:!0})}catch{}}}function t(){return"win32"===process.platform?[`${j}.cmd`,j,`${j}.ps1`]:[j]}function u(a,b){let c=h.join(a,i);if(!f.existsSync(h.join(c,"package.json")))return null;let d=f.mkdtempSync(h.join(g.tmpdir(),"zevai-install-rollback-")),e=h.join(d,i),j=h.join(d,"bin");try{for(let a of(f.cpSync(c,e,{recursive:!0,preserveTimestamps:!0,verbatimSymlinks:!0}),f.mkdirSync(j,{recursive:!0}),t())){let c=h.join(b,a);f.existsSync(c)&&f.cpSync(c,h.join(j,a),{preserveTimestamps:!0,verbatimSymlinks:!0})}return{backupRoot:d,packageBackup:e,binBackup:j}}catch(a){try{f.rmSync(d,{recursive:!0,force:!0})}catch{}throw a}}function v(a,b,c){if(!a)return;let d=h.join(b,i);for(let b of(f.rmSync(d,{recursive:!0,force:!0,maxRetries:5,retryDelay:200}),f.cpSync(a.packageBackup,d,{recursive:!0,preserveTimestamps:!0,verbatimSymlinks:!0}),s(c),t())){let d=h.join(a.binBackup,b);f.existsSync(d)&&f.cpSync(d,h.join(c,b),{preserveTimestamps:!0,verbatimSymlinks:!0})}}function w(a){if(a)try{f.rmSync(a.backupRoot,{recursive:!0,force:!0})}catch{}}function x(a){try{let b=h.join(a,i,"package.json");return JSON.parse(f.readFileSync(b,"utf8")).version||null}catch{return null}}function y(a){try{return f.existsSync(h.join(a,i,"package.json"))}catch{return!1}}function z(a={}){let b=m(),c=String(a.version||"latest").replace(/^v(?=\d)/,""),d=a.packageSpec||`${i}@${c}`,g=/^(?:latest|\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)$/.test(c),t=d===`${i}@${c}`;if(!g||!t)return{ok:!1,nodePath:process.execPath,npmPath:"",globalRoot:"",platform:b,error:"Version must be 'latest' or an exact semantic version (for example 1.2.3)."};let A=n(),B=p(A),C=q(A),D=y(B),E=D?x(B):null,F=null;if(D&&!a.externalRollback)try{F=u(B,C),k(`rollback snapshot: ${F.backupRoot}`)}catch(a){return{ok:!1,nodePath:process.execPath,npmPath:A,globalRoot:B,platform:b,version:E||void 0,error:`Refusing to update without a rollback snapshot: ${a.message}`}}k(`OS: ${b.label} (${process.platform}/${process.arch})`),k(`Node: ${process.version} @ ${process.execPath}`),k(`npm: ${A}`),k(`global root: ${B}`),k(`global bin: ${C}`),k(`installing: ${d}${E?` (was ${E})`:""}`);let G=!0===a.forceClean;G&&!D?(r(B),s(C)):G&&D&&l("forceClean requested but existing package kept until install succeeds (OOM-safe)");let H=["install","-g",d,"--prefer-online"];process.env.npm_config_registry||process.env.ZEVAI_NPM_REGISTRY&&H.push("--registry",process.env.ZEVAI_NPM_REGISTRY);let I=o(A,H,{timeout:6e5,stream:!0}),J=`${I.stderr}
|
|
1
|
+
exports.id=5949,exports.ids=[5949],exports.modules={6848:(a,b,c)=>{"use strict";let d=c(29021),e=c(33873),{getRuntimeDir:f,getRuntimeNodeModules:g,runNpmInstall:h,summarizeNpmError:i}=c(24344),j="tls-client-node",k="0.2.0";function l(){return d.existsSync(e.join(g(),j,"package.json"))}a.exports={ensureNotionTlsRuntime:function({silent:a=!1,timeout:b=3e5}={}){let c,g;if(l())return{ok:!0,already:!0};let m=(c=f(),d.mkdirSync(c,{recursive:!0}),g=e.join(c,"package.json"),d.existsSync(g)||d.writeFileSync(g,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0},null,2)),c),n=h({cwd:m,pkgs:[`${j}@${k}`],timeout:b});return n.ok||a||(console.warn(`[zevai][runtime] Notion TLS install skipped: ${i(n.stderr||n.stdout)}`),console.warn(`[zevai][runtime] Retry: cd "${m}" && npm install ${j}@${k}`)),{ok:n.ok&&l()}},hasNotionTlsRuntime:l}},24344:(a,b,c)=>{"use strict";let{execSync:d,spawnSync:e}=c(79646),f=c(29021),g=c(21820),h=c(33873),i="zevai";function j(){return h.join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?h.join(process.env.APPDATA||g.homedir(),i):h.join(g.homedir(),`.${i}`),"runtime")}function k(){return h.join(j(),"node_modules")}function l(){let a=j();f.existsSync(a)||f.mkdirSync(a,{recursive:!0});let b=h.join(a,"package.json");return f.existsSync(b)||f.writeFileSync(b,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0,description:"User-writable runtime deps for ZevaiRouter (better-sqlite3 native binary)"},null,2)),a}function m(a){return f.existsSync(h.join(k(),a,"package.json"))}function n(){let a=h.join(k(),"better-sqlite3","build","Release","better_sqlite3.node");if(!f.existsSync(a))return!1;try{let b=f.openSync(a,"r"),c=Buffer.alloc(4);f.readSync(b,c,0,4,0),f.closeSync(b);let d=c.toString("hex");if("linux"===process.platform)return d.startsWith("7f454c46");if("darwin"===process.platform)return d.startsWith("cffaedfe")||d.startsWith("cefaedfe");if("win32"===process.platform)return d.startsWith("4d5a");return!0}catch{return!1}}function o(a=""){let b=String(a);if(/ENOTFOUND|ETIMEDOUT|EAI_AGAIN|network|getaddrinfo/i.test(b))return"No internet connection or registry unreachable";if(/EACCES|EPERM|permission denied/i.test(b))return"Permission denied (check folder permissions)";if(/ENOSPC|no space/i.test(b))return"Not enough disk space";if(/node-gyp|gyp ERR|python|MSBuild|Visual Studio|Xcode/i.test(b))return"Missing build tools (Xcode CLT / Python / VS Build Tools)";if(/ETARGET|version.*not found/i.test(b))return"Package version not found on registry";let c=b.match(/npm ERR! (.+)/);if(c)return c[1].slice(0,200);let d=b.trim().split(/\r?\n/).filter(Boolean).pop();return d?d.slice(0,200):"Unknown error"}function p({cwd:a,pkgs:b,extraArgs:c=[],timeout:d=18e4}){let g=["install",...b,"--save","--no-audit","--no-fund","--prefer-online","--loglevel=error",...c.filter(a=>"--no-save"!==a)],i="win32"===process.platform?"npm.cmd":"npm",j=g,k="win32"===process.platform;try{let a=h.join(h.dirname(process.execPath),"..","lib","node_modules","npm","bin","npm-cli.js");f.existsSync(a)&&(i=process.execPath,j=[a,...g],k=!1)}catch{}let l=e(i,j,{cwd:a,stdio:["ignore","pipe","pipe"],timeout:d,shell:k,encoding:"utf8"});return{ok:0===l.status,code:l.status,stderr:l.stderr||"",stdout:l.stdout||""}}a.exports={ensureSqliteRuntime:function({silent:a=!1}={}){return(l(),m("better-sqlite3")&&n())?(a||console.log("✅ SQLite engine ready"),{betterSqlite:!0}):{betterSqlite:function(a,b={}){let c=l(),d=b.optional?["--no-save"]:[];b.silent||console.log("⏳ Installing SQLite engine (first run)...");let e=p({cwd:c,pkgs:a,extraArgs:d,timeout:b.timeout||18e4});if(!e.ok&&!b.silent){let b=o(e.stderr);console.warn("⚠️ SQLite engine install failed — using fallback"),console.warn(` Reason: ${b}`),console.warn(` Retry: cd "${c}" && npm install ${a.join(" ")}`)}return e.ok}(["better-sqlite3@12.6.2"],{optional:!0,silent:a})&&m("better-sqlite3")&&n()}},buildEnvWithRuntime:function(a=process.env){let b=[k(),h.join(__dirname,"..","app","node_modules"),h.join(__dirname,"..","..","node_modules"),a.NODE_PATH||""].filter(Boolean).join(h.delimiter);return{...a,NODE_PATH:b}},getRuntimeDir:j,getRuntimeNodeModules:k,runNpmInstall:p,summarizeNpmError:o}},50982:(a,b,c)=>{var d={"./cloakbrowserRuntime":99436,"./cloakbrowserRuntime.js":99436,"./notionTlsRuntime":6848,"./notionTlsRuntime.js":6848,"./postinstall":77897,"./postinstall.js":77897,"./safeGlobalInstall":65185,"./safeGlobalInstall.js":65185,"./sqliteRuntime":24344,"./sqliteRuntime.js":24344,"./startupRuntime":83445,"./startupRuntime.js":83445,"./streamCommand":69069,"./streamCommand.js":69069,"./trayRuntime":52784,"./trayRuntime.js":52784};function e(a){return c(f(a))}function f(a){if(!c.o(d,a)){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}return d[a]}e.keys=function(){return Object.keys(d)},e.resolve=f,a.exports=e,e.id=50982},51029:a=>{function b(a){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}b.keys=()=>[],b.resolve=b,b.id=51029,a.exports=b},52784:(a,b,c)=>{"use strict";let{spawnSync:d}=c(79646),e=c(29021),f=c(33873),{getRuntimeDir:g,getRuntimeNodeModules:h,runNpmInstall:i,summarizeNpmError:j}=c(24344),k="systray2",l="systray";function m(){return e.existsSync(f.join(h(),k,"package.json"))}function n({silent:a=!1}={}){if("win32"===process.platform)return;let b="darwin"===process.platform?"tray_darwin_release":"tray_linux_release",c=f.join(h(),k,"traybin",b);if(e.existsSync(c))try{e.chmodSync(c,493)}catch(b){a||console.warn(`[zevai][runtime] chmod tray bin failed: ${b.message}`)}}a.exports={ensureTrayRuntime:function({silent:a=!1}={}){if(!function({silent:a=!1}={}){for(let b of[f.join(h(),l),f.join(__dirname,"..","node_modules",l)])if(e.existsSync(b))try{e.rmSync(b,{recursive:!0,force:!0}),a||console.log(`[zevai][runtime] removed legacy systray: ${b}`)}catch(c){a||console.warn(`[zevai][runtime] failed to remove ${b}: ${c.message}`)}}({silent:a}),"win32"===process.platform)return{systray:!1,skipped:!0};if(m())return n({silent:a}),a||console.log("✅ System tray ready"),{systray:!0};let b=function(a,{silent:b=!1}={}){let c,d,h=(c=g(),e.existsSync(c)||e.mkdirSync(c,{recursive:!0}),d=f.join(c,"package.json"),e.existsSync(d)||e.writeFileSync(d,JSON.stringify({name:"zevai-runtime",version:"1.0.0",private:!0},null,2)),c);b||console.log("⏳ Installing system tray (first run)...");let k=i({cwd:h,pkgs:a,extraArgs:["--no-save"],timeout:12e4});if(!k.ok&&!b){let b=j(k.stderr);console.warn("⚠️ System tray install failed — tray disabled"),console.warn(` Reason: ${b}`),console.warn(` Retry: cd "${h}" && npm install ${a.join(" ")}`)}return k.ok}([`${k}@2.1.4`],{silent:a});return b&&n({silent:a}),{systray:b&&m()}}}},65185:(a,b,c)=>{"use strict";a=c.nmd(a);let{execFileSync:d,spawnSync:e}=c(79646),f=c(29021),g=c(21820),h=c(33873),i="zevairouter",j="zevai";function k(a){console.log(`[zevai-install] ${a}`)}function l(a){console.warn(`[zevai-install] ${a}`)}function m(){let a=process.platform;return"darwin"===a?{id:"mac",label:"macOS"}:"win32"===a?{id:"windows",label:"Windows"}:"linux"===a?{id:"linux",label:"Linux"}:{id:a,label:a}}function n(){let a=h.dirname(process.execPath);for(let b of"win32"===process.platform?[h.join(a,"node_modules","npm","bin","npm-cli.js"),h.join(a,"npm.cmd"),h.join(a,"npm"),"npm.cmd","npm"]:[h.join(a,"npm"),h.join(a,"..","lib","node_modules","npm","bin","npm-cli.js")])if("npm"!==b&&"npm.cmd"!==b&&f.existsSync(b))return b;try{let a="win32"===process.platform?"where":"which",b=d(a,["npm"],{encoding:"utf8"}).trim().split(/\r?\n/)[0];if(b)return b}catch{}return"win32"===process.platform?"npm.cmd":"npm"}function o(a,b,c={}){let d={...process.env,npm_config_fund:"false",npm_config_audit:"false",npm_config_update_notifier:"false",npm_node_execpath:process.execPath},i=a.endsWith("npm-cli.js"),j=i?process.execPath:a,k=i?[a,...b]:b;if(c.stream){let a=f.mkdtempSync(h.join(g.tmpdir(),"zevai-command-")),b=h.join(a,"result.json");try{let a=h.join(__dirname,"streamCommand.js"),g=e(process.execPath,[a,b,j,...k],{env:{...d,ZEVAI_STREAM_COMMAND_SHELL:"win32"!==process.platform||i?"0":"1"},stdio:"inherit",timeout:c.timeout||6e5,windowsHide:!0}),l={};try{l=JSON.parse(f.readFileSync(b,"utf8"))}catch{}return{ok:0===g.status&&0===l.status,status:l.status??g.status,stdout:l.stdout||"",stderr:l.stderr||"",error:g.error||l.error||null}}finally{try{f.rmSync(a,{recursive:!0,force:!0})}catch{}}}let l=e(j,k,{encoding:"utf8",env:d,shell:"win32"===process.platform&&!i,timeout:c.timeout||6e5});return{ok:0===l.status,status:l.status,stdout:l.stdout||"",stderr:l.stderr||"",error:l.error}}function p(a){let b=(o(a,["root","-g"],{timeout:3e4}).stdout||"").trim().split(/\r?\n/).filter(Boolean).pop();return b&&f.existsSync(b)?b:"win32"===process.platform?h.join(h.dirname(process.execPath),"node_modules"):h.join(h.dirname(process.execPath),"..","lib","node_modules")}function q(a){let b=(o(a,["prefix","-g"],{timeout:3e4}).stdout||"").trim().split(/\r?\n/).filter(Boolean).pop();if(b&&f.existsSync(b)){if("win32"===process.platform)return b;let a=h.join(b,"bin");if(f.existsSync(a))return a}return h.dirname(process.execPath)}function r(a){let b=h.join(a,i);f.existsSync(b)&&(k(`Removing previous install: ${b}`),f.rmSync(b,{recursive:!0,force:!0,maxRetries:5,retryDelay:200}));try{for(let b of f.readdirSync(a))if(b.startsWith(`.${i}-`)||b===`.${i}`){let c=h.join(a,b);k(`Removing leftover: ${c}`),f.rmSync(c,{recursive:!0,force:!0,maxRetries:5,retryDelay:200})}}catch{}}function s(a){for(let b of"win32"===process.platform?[`${j}.cmd`,`${j}`,`${j}.ps1`]:[j]){let c=h.join(a,b);try{f.existsSync(c)&&f.rmSync(c,{force:!0})}catch{}}}function t(){return"win32"===process.platform?[`${j}.cmd`,j,`${j}.ps1`]:[j]}function u(a,b){let c=h.join(a,i);if(!f.existsSync(h.join(c,"package.json")))return null;let d=f.mkdtempSync(h.join(g.tmpdir(),"zevai-install-rollback-")),e=h.join(d,i),j=h.join(d,"bin");try{for(let a of(f.cpSync(c,e,{recursive:!0,preserveTimestamps:!0,verbatimSymlinks:!0}),f.mkdirSync(j,{recursive:!0}),t())){let c=h.join(b,a);f.existsSync(c)&&f.cpSync(c,h.join(j,a),{preserveTimestamps:!0,verbatimSymlinks:!0})}return{backupRoot:d,packageBackup:e,binBackup:j}}catch(a){try{f.rmSync(d,{recursive:!0,force:!0})}catch{}throw a}}function v(a,b,c){if(!a)return;let d=h.join(b,i);for(let b of(f.rmSync(d,{recursive:!0,force:!0,maxRetries:5,retryDelay:200}),f.cpSync(a.packageBackup,d,{recursive:!0,preserveTimestamps:!0,verbatimSymlinks:!0}),s(c),t())){let d=h.join(a.binBackup,b);f.existsSync(d)&&f.cpSync(d,h.join(c,b),{preserveTimestamps:!0,verbatimSymlinks:!0})}}function w(a){if(a)try{f.rmSync(a.backupRoot,{recursive:!0,force:!0})}catch{}}function x(a){try{let b=h.join(a,i,"package.json");return JSON.parse(f.readFileSync(b,"utf8")).version||null}catch{return null}}function y(a){try{return f.existsSync(h.join(a,i,"package.json"))}catch{return!1}}function z(a={}){let b=m(),c=String(a.version||"latest").replace(/^v(?=\d)/,""),d=a.packageSpec||`${i}@${c}`,g=/^(?:latest|\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)$/.test(c),t=d===`${i}@${c}`;if(!g||!t)return{ok:!1,nodePath:process.execPath,npmPath:"",globalRoot:"",platform:b,error:"Version must be 'latest' or an exact semantic version (for example 1.2.3)."};let A=n(),B=p(A),C=q(A),D=y(B),E=D?x(B):null,F=null;if(D&&!a.externalRollback)try{F=u(B,C),k(`rollback snapshot: ${F.backupRoot}`)}catch(a){return{ok:!1,nodePath:process.execPath,npmPath:A,globalRoot:B,platform:b,version:E||void 0,error:`Refusing to update without a rollback snapshot: ${a.message}`}}k(`OS: ${b.label} (${process.platform}/${process.arch})`),k(`Node: ${process.version} @ ${process.execPath}`),k(`npm: ${A}`),k(`global root: ${B}`),k(`global bin: ${C}`),k(`installing: ${d}${E?` (was ${E})`:""}`);let G=!0===a.forceClean;G&&!D?(r(B),s(C)):G&&D&&l("forceClean requested but existing package kept until install succeeds (OOM-safe)");let H=["install","-g",d,"--prefer-online"];process.env.npm_config_registry||process.env.ZEVAI_NPM_REGISTRY&&H.push("--registry",process.env.ZEVAI_NPM_REGISTRY);let I=o(A,H,{timeout:6e5,stream:!0}),J=`${I.stderr}
|
|
2
2
|
${I.stdout}
|
|
3
3
|
${I.error||""}`;if(!I.ok&&/ENOTEMPTY|directory not empty|rename/i.test(J)){l("ENOTEMPTY/rename failed — force-clean and retry once");try{r(B),s(C),I=o(A,H,{timeout:6e5,stream:!0}),J=`${I.stderr}
|
|
4
4
|
${I.stdout}
|
|
@@ -58,4 +58,4 @@ Done. Run: zevai --version`),d.zevaiPath&&console.log(`Binary: ${d.zevaiPath}`)
|
|
|
58
58
|
VPS has no display. Install a virtual screen then retry:
|
|
59
59
|
sudo apt-get update && sudo apt-get install -y xvfb
|
|
60
60
|
sudo systemctl restart zevairouter
|
|
61
|
-
ZevaiRouter auto-starts Xvfb when installed.`);throw c.code="NO_DISPLAY",c.cause=b,c}throw b}}async function K({engine:a=h,proxyUrl:b,headless:c=!1,windowSize:d=null,requireProxyGeoip:e=!1,timeoutMs:f=m}={}){return r(a),w(J({proxyUrl:b,headless:!0===c,windowSize:d,requireProxyGeoip:e}),{timeoutMs:f,message:`CloakBrowser launch timed out after ${Math.round(f/1e3)}s`,code:"BROWSER_LAUNCH_TIMEOUT",onLateResolve:a=>M(a)})}function L({engine:a,proxyUrl:b,headless:c=!1,windowSize:d=null}={}){return()=>K({engine:a,proxyUrl:b,headless:c,windowSize:d})}async function M(a,{timeoutMs:b=4e3}={}){if(!a)return;let c=G(a),d=Number(c?.pid),e=Number.isFinite(d)&&d>1?d:null;try{await w(Promise.resolve().then(()=>a.close()),{timeoutMs:b,message:`Browser close timed out after ${b}ms`,code:"BROWSER_CLOSE_TIMEOUT"})}catch{}let f=()=>{if(!c||null!=c.exitCode||null!=c.signalCode)return!1;if(!e)return!0;try{return process.kill(e,0),!0}catch{return!1}};if(c&&f()){let a=a=>{if(e&&"win32"!==process.platform)try{process.kill(-e,a)}catch{}try{"function"==typeof c.kill?c.kill(a):e&&process.kill(e,a)}catch{}};a("SIGTERM"),await new Promise(a=>setTimeout(a,400)),f()&&a("SIGKILL")}}},77897:(a,b,c)=>{let d=c(33873),e=c(29021);process.env.NPM_CONFIG_FUND="false",process.env.NPM_CONFIG_AUDIT="false",process.env.NPM_CONFIG_UPDATE_NOTIFIER="false",process.env.NPM_CONFIG_LOGLEVEL=process.env.NPM_CONFIG_LOGLEVEL||"error";let{ensureSqliteRuntime:f,runNpmInstall:g,getRuntimeDir:h}=c(24344),{ensureTrayRuntime:i}=c(52784),{ensureCloakbrowserRuntime:j}=c(99436),{ensureNotionTlsRuntime:k}=c(6848),{hasBuiltInNodeSqlite:l}=c(83445),m=String(process.env.ZEVAI_MINIMAL_POSTINSTALL||"").toLowerCase(),n="0"!==m&&"false"!==m,o="1"===process.env.ZEVAI_SKIP_RUNTIME_POSTINSTALL||"true"===process.env.ZEVAI_SKIP_RUNTIME_POSTINSTALL;function p(a){console.log(`[zevai] ${a}`)}function q(a){console.warn(`[zevai] ${a}`)}(async function(){if(o)return void p("Runtime warm-up skipped by ZEVAI_SKIP_RUNTIME_POSTINSTALL");if(p(n?"Minimal postinstall (ZEVAI_MINIMAL_POSTINSTALL=1) — browsers install on first use":"Preparing full runtime so all features work after this install…"),l())p("✓ Built-in node:sqlite engine ready");else try{f({silent:!0}).betterSqlite?p("✓ SQLite native engine ready"):q("SQLite native engine unavailable — the bundled sql.js fallback will be used")}catch(a){q(`SQLite native warm-up skipped: ${a.message} — the bundled fallback remains available`)}try{let a=i({silent:!0});a.systray||a.skipped?p(a.skipped?"\xb7 Native tray helper not required on Windows":"✓ System tray helper ready"):q("System tray helper unavailable — start with `zevai` in the terminal")}catch(a){q(`Tray warm-up skipped: ${a.message}`)}
|
|
61
|
+
ZevaiRouter auto-starts Xvfb when installed.`);throw c.code="NO_DISPLAY",c.cause=b,c}throw b}}async function K({engine:a=h,proxyUrl:b,headless:c=!1,windowSize:d=null,requireProxyGeoip:e=!1,timeoutMs:f=m}={}){return r(a),w(J({proxyUrl:b,headless:!0===c,windowSize:d,requireProxyGeoip:e}),{timeoutMs:f,message:`CloakBrowser launch timed out after ${Math.round(f/1e3)}s`,code:"BROWSER_LAUNCH_TIMEOUT",onLateResolve:a=>M(a)})}function L({engine:a,proxyUrl:b,headless:c=!1,windowSize:d=null}={}){return()=>K({engine:a,proxyUrl:b,headless:c,windowSize:d})}async function M(a,{timeoutMs:b=4e3}={}){if(!a)return;let c=G(a),d=Number(c?.pid),e=Number.isFinite(d)&&d>1?d:null;try{await w(Promise.resolve().then(()=>a.close()),{timeoutMs:b,message:`Browser close timed out after ${b}ms`,code:"BROWSER_CLOSE_TIMEOUT"})}catch{}let f=()=>{if(!c||null!=c.exitCode||null!=c.signalCode)return!1;if(!e)return!0;try{return process.kill(e,0),!0}catch{return!1}};if(c&&f()){let a=a=>{if(e&&"win32"!==process.platform)try{process.kill(-e,a)}catch{}try{"function"==typeof c.kill?c.kill(a):e&&process.kill(e,a)}catch{}};a("SIGTERM"),await new Promise(a=>setTimeout(a,400)),f()&&a("SIGKILL")}}},77897:(a,b,c)=>{let d=c(33873),e=c(29021);process.env.NPM_CONFIG_FUND="false",process.env.NPM_CONFIG_AUDIT="false",process.env.NPM_CONFIG_UPDATE_NOTIFIER="false",process.env.NPM_CONFIG_LOGLEVEL=process.env.NPM_CONFIG_LOGLEVEL||"error";let{ensureSqliteRuntime:f,runNpmInstall:g,getRuntimeDir:h}=c(24344),{ensureTrayRuntime:i}=c(52784),{ensureCloakbrowserRuntime:j}=c(99436),{ensureNotionTlsRuntime:k}=c(6848),{hasBuiltInNodeSqlite:l}=c(83445),m=String(process.env.ZEVAI_MINIMAL_POSTINSTALL||"").toLowerCase(),n="0"!==m&&"false"!==m,o="1"===process.env.ZEVAI_SKIP_RUNTIME_POSTINSTALL||"true"===process.env.ZEVAI_SKIP_RUNTIME_POSTINSTALL;function p(a){console.log(`[zevai] ${a}`)}function q(a){console.warn(`[zevai] ${a}`)}(async function(){if(o)return void p("Runtime warm-up skipped by ZEVAI_SKIP_RUNTIME_POSTINSTALL");if(p(n?"Minimal postinstall (ZEVAI_MINIMAL_POSTINSTALL=1) — browsers install on first use":"Preparing full runtime so all features work after this install…"),l())p("✓ Built-in node:sqlite engine ready");else try{f({silent:!0}).betterSqlite?p("✓ SQLite native engine ready"):q("SQLite native engine unavailable — the bundled sql.js fallback will be used")}catch(a){q(`SQLite native warm-up skipped: ${a.message} — the bundled fallback remains available`)}try{let a=i({silent:!0});a.systray||a.skipped?p(a.skipped?"\xb7 Native tray helper not required on Windows":"✓ System tray helper ready"):q("System tray helper unavailable — start with `zevai` in the terminal")}catch(a){q(`Tray warm-up skipped: ${a.message}`)}try{k({silent:!0}).ok?p("✓ Notion Chrome TLS transport ready"):q("Notion Chrome TLS transport unavailable — the HTTP fallback remains available")}catch(a){q(`Notion TLS warm-up skipped: ${a.message}`)}if(n)return void p("Done (minimal). Automation downloads CloakBrowser on first use.");try{let a=j({silent:!0});if(a.ok)if("function"!=typeof a.module?.ensureBinary)q("CloakBrowser package is installed but ensureBinary() is unavailable");else{let b=await a.module.ensureBinary();if(!b||!e.existsSync(b))throw Error("binary download completed without an executable path");p(`✓ CloakBrowser binary ready (${b})`),function(){try{let{getRuntimeNodeModules:a}=c(24344),b=a(),f=d.join(__dirname,"..","app","node_modules");if(!e.existsSync(d.join(f,"next")))return;for(let a of["playwright-core","cloakbrowser","mmdb-lib"]){let c=d.join(b,a),g=d.join(f,a);e.existsSync(d.join(c,"package.json"))&&(e.existsSync(g)&&e.rmSync(g,{recursive:!0,force:!0}),e.cpSync(c,g,{recursive:!0}))}p("CloakBrowser runtime linked into app bundle")}catch{}}()}else q(`CloakBrowser packages unavailable: ${a.error?.message||a.reason||"unknown"}`)}catch(a){q(`CloakBrowser binary warm-up failed: ${a.message}. Automation will retry on first use.`)}try{let a=function(){if("win32"===process.platform)return{ok:!0,skipped:"windows uses pipe shell"};try{return c(Object(function(){var a=Error("Cannot find module 'node-pty'");throw a.code="MODULE_NOT_FOUND",a}())),{ok:!0,already:!0}}catch{}return g({cwd:h(),pkgs:["node-pty@^1.1.0"],timeout:3e5}).ok?{ok:!0}:{ok:!1,reason:"native build failed (terminal still works via python PTY / pipe)"}}();a.ok?p(a.already?"✓ node-pty already available":"✓ node-pty ready (web terminal)"):a.skipped?p(`\xb7 node-pty skipped (${a.skipped})`):q(`node-pty skipped: ${a.reason||"unknown"} — terminal still works`)}catch(a){q(`node-pty skipped: ${a.message}`)}p("Runtime warm-up finished. Start with: zevai")})().catch(a=>{console.error(`[zevai] postinstall failed: ${a.stack||a.message}`),process.exitCode=1})},83445:(a,b,c)=>{"use strict";let{builtinModules:d}=c(98995);function e(a=d){return a.includes("node:sqlite")||a.includes("sqlite")}a.exports={hasBuiltInNodeSqlite:e,prepareStartupRuntime:function({trayMode:a=!1,modules:b=d,loadSqliteRuntime:f=()=>c(24344),loadTrayRuntime:g=()=>c(52784),loadNotionTlsRuntime:h=null}={}){let i=f();if(!e(b))try{i.ensureSqliteRuntime({silent:!0})}catch{}if(h)try{h().ensureNotionTlsRuntime({silent:!0,timeout:3e4})}catch{}if(a)try{g().ensureTrayRuntime({silent:!0})}catch{}return{buildEnvWithRuntime:i.buildEnvWithRuntime}}}},99436:(a,b,c)=>{"use strict";let{createRequire:d}=c(8086),e=c(29021),f=c(33873),{runNpmInstall:g,getRuntimeDir:h,getRuntimeNodeModules:i,summarizeNpmError:j,buildEnvWithRuntime:k}=c(24344),l="cloakbrowser",m="^0.5.2",n="mmdb-lib",o="^3.0.2",p="playwright-core",q="^1.54.2",r="function"==typeof require?require:c(51029);function s(){try{let a=f.join(h(),"noop.js");return d(a)}catch{return null}}let t=null;function u(a){return e.existsSync(f.join(i(),a,"package.json"))}function v(a){let b=String(a||"").trim().match(/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/);return b?{major:Number.parseInt(b[1],10),minor:Number.parseInt(b[2],10),patch:Number.parseInt(b[3],10),prerelease:b[4]?b[4].split("."):[]}:null}function w(a,b){for(let c of["major","minor","patch"])if(a[c]!==b[c])return a[c]<b[c]?-1:1;return function(a,b){if(0===a.length&&0===b.length)return 0;if(0===a.length)return 1;if(0===b.length)return -1;let c=Math.max(a.length,b.length);for(let d=0;d<c;d+=1){if(void 0===a[d])return -1;if(void 0===b[d])return 1;if(a[d]===b[d])continue;let c=/^\d+$/.test(a[d]),e=/^\d+$/.test(b[d]);if(c&&e)return Number.parseInt(a[d],10)<Number.parseInt(b[d],10)?-1:1;if(c!==e)return c?-1:1;return a[d]<b[d]?-1:1}return 0}(a.prerelease,b.prerelease)}function x(a,b){let c,d=v(a),e=String(b||"").trim().match(/^\^\s*(.+)$/),f=v(e?.[1]);return!!d&&!!f&&(!(d.prerelease.length>0)||0!==f.prerelease.length)&&(c=f.major>0?{major:f.major+1,minor:0,patch:0,prerelease:[]}:f.minor>0?{major:0,minor:f.minor+1,patch:0,prerelease:[]}:{major:0,minor:0,patch:f.patch+1,prerelease:[]},w(d,f)>=0&&0>w(d,c))}function y(a){try{let b=JSON.parse(e.readFileSync(f.join(i(),a,"package.json"),"utf8"));return"string"==typeof b.version?b.version:null}catch{return null}}function z(a,b){return!!a?.launch&&x(b,m)}function A(){try{let a=s(),b=f.join(i(),l);if(a&&e.existsSync(f.join(b,"package.json")))return a(b)}catch{}try{return r(l)}catch{}try{let a=f.join(i(),l);if(e.existsSync(f.join(a,"package.json")))return r(a)}catch{}return null}function B(){try{let a=s(),b=f.join(i(),n);if(a&&e.existsSync(f.join(b,"package.json")))return a(b)}catch{}try{return r(n)}catch{}return null}a.exports={ensureCloakbrowserRuntime:function({silent:a=!1}={}){let b=y(l);if(t?.ok&&z(t.module,b)&&B()&&u(p))return t;try{let a=k(process.env);if(a.NODE_PATH&&!process.env.NODE_PATH?.includes(i())){process.env.NODE_PATH=a.NODE_PATH;try{c(8086).Module._initPaths()}catch{}}}catch{}let d=A(),e=!z(d,b),r=!B()&&!u(n),s=!u(p);if(e||r||s){let b=[];e&&b.push(`${l}@${m}`),r&&b.push(`${n}@${o}`),s&&b.push(`${p}@${q}`),a||console.log(`[cloakbrowser] Installing ${b.join(", ")} into runtime…`);let d=g({cwd:h(),pkgs:b,timeout:3e5});if(!d.ok){let a=j(d.stderr||d.stdout||""),c=Error(`Failed to install ${b.join(", ")}. On the host run: cd "${h()}" && npm install ${b.join(" ")} — ${a}`);return c.code="CLOAKBROWSER_INSTALL_FAILED",{ok:!1,error:c}}e&&function(a){let b=`${f.join(i(),a)}${f.sep}`;for(let a of Object.keys(c.c))a.startsWith(b)&&delete c.c[a]}(l)}if(d=A(),b=y(l),!d?.launch){let a=Error(`cloakbrowser installed but launch() is missing. Reinstall: cd "${h()}" && npm install ${l}@${m} ${n}@${o} ${p}@${q}`);return a.code="CLOAKBROWSER_API_MISMATCH",{ok:!1,error:a}}if(!x(b,m)){let a=Error(`cloakbrowser version mismatch: installed ${b||"unknown"}, required ${m}. Reinstall: cd "${h()}" && npm install ${l}@${m}`);return a.code="CLOAKBROWSER_VERSION_MISMATCH",{ok:!1,error:a}}if(!B()&&!u(n)){let a=Error(`mmdb-lib is required for geoip: true. Install: cd "${h()}" && npm install ${n}@${o}`);return a.code="MMDB_MISSING",{ok:!1,error:a}}return t={ok:!0,module:d,version:b}},loadCloakbrowserModule:function(){return A()},CLOAKBROWSER_PACKAGE:l,CLOAKBROWSER_VERSION:m,MMDB_PACKAGE:n,MMDB_VERSION:o,PLAYWRIGHT_CORE_PACKAGE:p,PLAYWRIGHT_CORE_VERSION:q,__test__:{parseSemver:v,compareSemver:w,satisfiesCaretRange:x,isCloakbrowserRuntimeCompatible:z}}}};
|
|
@@ -3,7 +3,7 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
|
|
|
3
3
|
4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
|
|
4
4
|
6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
|
|
5
5
|
XcW+ML9FoCI6AOvOzwIDAQAB
|
|
6
|
-
-----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.
|
|
6
|
+
-----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.207","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":{"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","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 uses 5.0.9 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","minimatch":"file:vendor/minimatch3-secure","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","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"}')},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(78085),g=c(30022);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(47293),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
|
|
7
7
|
${l}
|
|
8
8
|
${n}
|
|
9
9
|
${k.toString("latin1")}
|