keyrouter 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -24
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +15 -15
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-injection/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-injection.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-injection.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/!KGRhc2hib2FyZCk/dashboard/prompt-injection/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/prompt-injection.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +15 -15
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/2172.js +1 -1
- package/app/.next-cli-build/server/chunks/241.js +1 -1
- package/app/.next-cli-build/server/chunks/5299.js +9 -9
- package/app/.next-cli-build/server/chunks/5330.js +1 -1
- package/app/.next-cli-build/server/chunks/6457.js +2 -2
- package/app/.next-cli-build/server/chunks/6844.js +1 -1
- package/app/.next-cli-build/server/chunks/8128.js +1 -1
- package/app/.next-cli-build/server/chunks/8682.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/9100.js +1 -1
- package/app/.next-cli-build/server/chunks/915.js +1 -1
- package/app/.next-cli-build/server/chunks/9604.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +2 -2
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{5497-b15e05f4ba4dba78.js → 5497-54a2c3dfa292cd6f.js} +1 -1
- package/app/.next-cli-build/static/chunks/761-00700c1c25957243.js +132 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-7feaa4a67a8eb771.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-f01d3cbfee3be6ee.js → page-3529b621905c9456.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-c7eb81dfb0b4fd77.js +1 -0
- package/app/.next-cli-build/static/chunks/app/landing/page-38fc3c430a1a29dc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/{layout-5422d1fa60776fe5.js → layout-47a7f93a93a7249c.js} +1 -1
- package/app/package.json +1 -1
- package/app/public/i18n/literals/fa.json +1 -1
- package/app/public/i18n/literals/id.json +1 -1
- package/app/public/i18n/literals/km.json +1 -1
- package/app/public/i18n/literals/pt-BR.json +1 -1
- package/app/public/i18n/literals/th.json +1 -1
- package/app/public/i18n/literals/zh-CN.json +1 -1
- package/app/public/icons/icon-192.svg +3 -1
- package/app/public/icons/icon-512.svg +3 -1
- package/app/src/lib/updater/updater.js +2 -2
- package/app/src/mitm/server.js +1 -1
- package/app/src/shared/utils/apiKey.js +1 -1
- package/cli.js +7 -7
- package/hooks/trayRuntime.js +1 -1
- package/package.json +1 -1
- package/src/cli/api/client.js +2 -2
- package/src/cli/commands/connect.js +4 -4
- package/src/cli/commands/xaiVideo.js +1 -1
- package/src/cli/menus/providers.js +1 -1
- package/src/cli/menus/settings.js +1 -1
- package/src/cli/tray/icon.ico +0 -0
- package/src/cli/tray/icon.png +0 -0
- package/src/cli/utils/input.js +18 -11
- package/app/.next-cli-build/static/chunks/761-3602d74d7fb3c4f7.js +0 -132
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-8e4de2642dc5b61a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-879d27966cca2817.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-a571fd8ce400407b.js +0 -1
- /package/app/.next-cli-build/static/{Ubl3m4xjT44gfS_ASKhN2 → OQlH5Y4fdrzSgUpl8Gw_9}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{Ubl3m4xjT44gfS_ASKhN2 → OQlH5Y4fdrzSgUpl8Gw_9}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{61610:(e,a,t)=>{Promise.resolve().then(t.bind(t,85309))},85309:(e,a,t)=>{"use strict";t.d(a,{default:()=>u});var s=t(95155),l=t(12115),i=t(98500),r=t.n(i),d=t(35497),o=t(3534),c=t(28777),n=t(10761);function u({toolId:e,machineId:a}){let t=o.dM[e],[i,v]=(0,l.useState)([]),[x,h]=(0,l.useState)(!0),[p,m]=(0,l.useState)({}),[f,b]=(0,l.useState)(!1),[E,j]=(0,l.useState)(!1),[P,g]=(0,l.useState)(""),[k,w]=(0,l.useState)(!1),[N,S]=(0,l.useState)(""),[y,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[a,t,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(a.ok){let e=await a.json();v(e.connections||[])}if(t.ok){let e=await t.json();b(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();j(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),g(e.tunnel?.publicUrl||""),w(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),S(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let M=()=>i.filter(e=>!1!==e.isActive),$=(0,l.useCallback)((e,a,t)=>{m(s=>s[e]?.[a]===t?s:{...s,[e]:{...s[e],[a]:t}})},[]);return t?(0,s.jsxs)("div",{className:"flex w-full flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:t.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:t.description})]}),x?(0,s.jsx)(d.Qv,{}):(()=>{let a,l,i,r=(a=M(),l=[],i=new Set,a.forEach(e=>{let a=c.Xg[e.provider]||e.provider,t=(0,c.KC)(e.provider);if(t.forEach(t=>{let s=`${a}/${t.id}`;i.has(s)||(i.add(s),l.push({value:s,label:`${a}/${t.id}`,provider:e.provider,alias:a,connectionName:e.name,modelId:t.id}))}),0===t.length){let t=e.providerSpecificData?.prefix||a,s=[];e.defaultModel&&s.push({id:e.defaultModel,name:e.defaultModel}),(e.providerSpecificData?.customModels||[]).forEach(e=>{e?.id&&!s.some(a=>a.id===e.id)&&s.push({id:e.id,name:e.name||e.id})}),0===s.length&&"active"===e.testStatus&&s.push({id:"model-id",name:`${t}/model-id`}),s.forEach(a=>{let s=`${t}/${a.id}`;i.has(s)||(i.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}}),l).length>0,d={tool:t,isExpanded:!0,onToggle:()=>{},baseUrl:E&&P?P:window.location.origin,apiKeys:y,tunnelEnabled:E,tunnelPublicUrl:P,tailscaleEnabled:k,tailscaleUrl:N};switch(e){case"claude":return(0,s.jsx)(n.Tk,{...d,activeProviders:M(),modelMappings:p[e]||{},onModelMappingChange:(a,t)=>$(e,a,t),hasActiveProviders:r,cloudEnabled:f});case"codex":return(0,s.jsx)(n.Ah,{...d,activeProviders:M(),cloudEnabled:f});case"opencode":return(0,s.jsx)(n.qO,{...d,activeProviders:M(),cloudEnabled:f});case"cowork":return(0,s.jsx)(n.Q6,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f,cloudUrl:"",tunnelEnabled:E,tunnelPublicUrl:P,tailscaleEnabled:k,tailscaleUrl:N});case"droid":return(0,s.jsx)(n.ZM,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"openclaw":return(0,s.jsx)(n.yZ,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"hermes":return(0,s.jsx)(n.RF,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"cline":return(0,s.jsx)(n.aG,{...d,activeProviders:M(),cloudEnabled:f});case"kilo":return(0,s.jsx)(n.c9,{...d,activeProviders:M(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(n.lF,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"jcode":return(0,s.jsx)(n.mW,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"grok-build":return(0,s.jsx)(n.E_,{...d,activeProviders:M(),hasActiveProviders:r,cloudEnabled:f});case"pi":case"omp":case"crush":case"forge":case"smelt":case"codewhale":return(0,s.jsx)(n.WE,{...d,activeProviders:M(),cloudEnabled:f});default:return(0,s.jsx)(n.a7,{toolId:e,...d,activeProviders:M(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"flex w-full flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[763,5772,2470,705,3557,5497,761,8441,3794,7358],()=>e(e.s=61610)),_N_E=e.O()}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F(((await r.json()).connections||[]).filter(e=>!1!==e.isActive)),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F(((await r.json()).connections||[]).filter(e=>!1!==e.isActive)),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20131${ee} \\
|
|
2
2
|
-H "Content-Type: application/json" \\
|
|
3
3
|
-H "Authorization: Bearer ${z||"YOUR_KEY"}" \\
|
|
4
4
|
-d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border",loading:"lazy",decoding:"async"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),U&&(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},27128:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=27128)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-c7eb81dfb0b4fd77.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var s=r(95155),i=r(35497),n=r(11059);let a="keyzakyy-dev/keyrouter",o=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/master/skills`,c=[{id:"keyrouter",name:"KeyRouter",description:"Setup guide + index of all capabilities. Start here.",endpoint:null,icon:"hub",isEntry:!0},{id:"keyrouter-chat",name:"Chat",description:"Chat & code generation via OpenAI or Anthropic formats, with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"keyrouter-image",name:"Image Generation",description:"Text-to-image via DALL‑E, Imagen, FLUX, MiniMax, SD WebUI.",endpoint:"/v1/images/generations",icon:"image"},{id:"keyrouter-tts",name:"Text-to-Speech",description:"Speech synthesis via OpenAI, ElevenLabs, Edge, Google, or Deepgram.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"keyrouter-stt",name:"Speech-to-Text",description:"Transcription via Whisper, Groq, Gemini, Deepgram, or AssemblyAI.",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"keyrouter-embeddings",name:"Embeddings",description:"Embeddings for RAG & semantic search via OpenAI, Gemini, or Mistral.",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"keyrouter-web-search",name:"Web Search",description:"Web & X search via Tavily, Exa, Brave, Serper, SearXNG, or PSE.",endpoint:"/v1/search",icon:"search"},{id:"keyrouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, or Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function l(e){return`${d}/${e}/SKILL.md`}function x({value:e,label:t="Copy"}){let{copied:r,copy:i}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>i(e),className:`inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md border px-2.5 font-display text-[11px] font-semibold transition-colors cursor-pointer ${r?"border-success bg-success/10 text-success":"border-text-subtle text-text-main hover:bg-surface-2"}`,title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:r?"check":"content_copy"}),r?"Copied!":t]})}function m({skill:e}){let t=l(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-xl border transition-colors ${e.isEntry?"border-border bg-surface-2/50":"border-border-subtle bg-surface hover:bg-surface-2/60"}`,children:[(0,s.jsx)("div",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-surface-2 border border-border",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h3",{className:"truncate font-display text-sm font-medium text-text-main",children:e.name}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[e.isEntry&&(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider text-text-muted",children:"START HERE"}),e.endpoint&&(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-[10px] uppercase tracking-wider text-text-muted",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted line-clamp-2",children:e.description})]}),(0,s.jsx)(x,{value:t})]})}function p(){return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-main",children:"Skills"}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-wider text-text-subtle",children:"Copy-paste agent skills for KeyRouter"})]}),(0,s.jsxs)(i.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"mb-2 font-mono text-[11px] uppercase tracking-wider text-text-subtle",children:"Paste into your AI"}),(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",l("keyrouter")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:c.map(e=>(0,s.jsx)(m,{skill:e},e.id))}),(0,s.jsx)(i.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("svg",{viewBox:"0 0 16 16",width:"20",height:"20",fill:"currentColor",className:"shrink-0 text-text-muted","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"font-display text-base font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Browse the source, README, and examples for every skill."})]})]}),(0,s.jsxs)("a",{href:`${o}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-border bg-surface-2 px-3 text-sm font-display font-medium text-text-main transition-colors hover:border-text-subtle hover:bg-surface-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted",children:"open_in_new"}),"View on GitHub"]})]})})]})}},96796:(e,t,r)=>{Promise.resolve().then(r.bind(r,64082))}},e=>{e.O(0,[763,2470,705,3557,5497,8441,3794,7358],()=>e(e.s=96796)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{8247:(e,t,s)=>{"use strict";s.d(t,{HY:()=>o,Kw:()=>i});let r={"perplexity-agent":"perplexity","gitlab-duo":"gitlab","vercel-ai-gateway":"vercel","ollama-search":"ollama","minimax-code":"minimax","minimax-code-global":"minimax","opencode-zen":"opencode","deepseek-web":"deepseek","muse-web":"muse","gemini-web":"gemini","chatgpt-web":"openai"},a=new Set;function l(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function o(e){let t=function(e){let t=l(e);if(!t||a.has(t))return"";let s=r[t]||t;return a.has(s)?"":s}(e);return t?`/providers/${t}.png`:null}function i(e){let t=l(e);t&&a.add(t);let s=r[t];s&&a.add(s)}},11059:(e,t,s)=>{"use strict";s.d(t,{C:()=>a});var r=s(12115);function a(e=2e3){let[t,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return{copied:t,copy:(0,r.useCallback)((t,r="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),s(r),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(null)},e)},[e])}}},55598:(e,t,s)=>{Promise.resolve().then(s.bind(s,85941))},57250:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(95155),a=s(12115),l=s(14051),o=s.n(l),i=s(8247);function n({src:e,providerId:t,alt:s,size:l=32,className:o="",fallbackText:d="?",fallbackColor:c}){let x=function(e,t){if(t)return(0,i.HY)(t);if(!e)return null;let s=String(e).match(/^\/providers\/([^/]+)\.png$/i);return s?(0,i.HY)(s[1]):e}(e,t),[h,m]=(0,a.useState)(!1);return!x||h?(0,r.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${o}`.trim(),style:{width:l,height:l,color:c,fontSize:Math.max(10,Math.floor(.38*l))},children:d}):(0,r.jsx)("img",{src:x,alt:s,width:l,height:l,className:o,loading:"lazy",decoding:"async",onError:()=>{let e=x.match(/^\/providers\/([^/]+)\.png$/i);e&&(0,i.Kw)(e[1]),t&&(0,i.Kw)(t),m(!0)}})}n.propTypes={src:o().string,providerId:o().string,alt:o().string,size:o().number,className:o().string,fallbackText:o().string,fallbackColor:o().string}},85941:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s(95155),a=s(39092),l=s.n(a),o=s(73321),i=s(12115);function n(){let[e,t]=(0,i.useState)(!1),s=(0,o.useRouter)();return(0,r.jsxs)("nav",{className:"fixed top-0 z-50 w-full bg-[#14141b]/80 backdrop-blur-md border-b border-[#2f2f3c]",children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-3 cursor-pointer bg-transparent border-none p-0",onClick:()=>s.push("/"),"aria-label":"Navigate to home",children:[(0,r.jsx)("div",{className:"size-8 rounded bg-linear-to-br from-white to-[#d4d4d4] flex items-center justify-center text-[#14141b]",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"hub"})}),(0,r.jsx)("h2",{className:"text-white text-xl font-bold tracking-tight",children:"KeyRouter"})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-8",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",children:"How it Works"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsxs)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors flex items-center gap-1",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:["GitHub ",(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"open_in_new"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>s.push("/dashboard"),className:"hidden sm:flex h-9 items-center justify-center rounded-lg px-4 bg-white hover:bg-[#d4d4d4] transition-all text-[#14141b] text-sm font-bold shadow-[0_0_15px_rgba(255,255,255,0.15)] hover:shadow-[0_0_20px_rgba(255,255,255,0.25)]",children:"Get Started"}),(0,r.jsx)("button",{className:"md:hidden text-white",onClick:()=>t(!e),children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e?"close":"menu"})})]})]}),e&&(0,r.jsx)("div",{className:"md:hidden border-t border-[#2f2f3c] bg-[#14141b]/95 backdrop-blur-md",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",onClick:()=>t(!1),children:"Features"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",onClick:()=>t(!1),children:"How it Works"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("button",{onClick:()=>s.push("/dashboard"),className:"h-9 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-sm font-bold",children:"Get Started"})]})})]})}function d(){return(0,r.jsxs)("section",{className:"relative pt-32 pb-20 px-6 min-h-[90vh] flex flex-col items-center justify-center overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-white/10 rounded-full blur-[120px] pointer-events-none"}),(0,r.jsxs)("div",{className:"relative z-10 max-w-4xl w-full text-center flex flex-col items-center gap-8",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#2f2f3c] bg-[#1e1e28]/50 px-3 py-1 text-xs font-medium text-white",children:[(0,r.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-white animate-pulse"}),"v1.0 is now live"]}),(0,r.jsxs)("h1",{className:"text-5xl md:text-7xl font-black leading-[1.1] tracking-tight",children:["One Endpoint for ",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:"All AI Providers"})]}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-gray-400 max-w-2xl mx-auto font-light",children:"AI endpoint proxy with web dashboard - A JavaScript port of CLIProxyAPI. Works seamlessly with Claude Code, OpenAI Codex, Cline, RooCode, and other CLI tools."}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 w-full",children:[(0,r.jsxs)("button",{className:"h-12 px-8 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-base font-bold transition-all shadow-[0_0_15px_rgba(255,255,255,0.2)] flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"rocket_launch"}),"Get Started"]}),(0,r.jsxs)("a",{href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",className:"h-12 px-8 rounded-lg border border-[#2f2f3c] bg-[#1e1e28] hover:bg-[#2f2f3c] text-white text-base font-bold transition-all flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"}),"View on GitHub"]})]})]})]})}var c=s(57250);let x=[{id:"claude",name:"Claude Code",image:"/providers/claude.png"},{id:"codex",name:"OpenAI Codex",image:"/providers/codex.png"},{id:"cline",name:"Cline",image:"/providers/cline.png"},{id:"cursor",name:"Cursor",image:"/providers/cursor.png"}],h=[{id:"openai",name:"OpenAI",color:"bg-emerald-500",textColor:"text-white"},{id:"anthropic",name:"Anthropic",color:"bg-brand-400",textColor:"text-white"},{id:"gemini",name:"Gemini",color:"bg-blue-500",textColor:"text-white"},{id:"github",name:"GitHub Copilot",color:"bg-gray-700",textColor:"text-white"}];function m(){let[e,t]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=setInterval(()=>{t(e=>(e+1)%h.length)},2e3);return()=>clearInterval(e)},[]),(0,r.jsxs)("div",{className:"mt-16 w-full max-w-4xl relative h-[360px] hidden md:flex items-center justify-center animate-[float_6s_ease-in-out_infinite]",children:[(0,r.jsxs)("div",{className:"relative z-20 w-32 h-32 rounded-full bg-[#1e1e28] border-2 border-white shadow-[0_0_40px_rgba(255,255,255,0.2)] flex flex-col items-center justify-center gap-1 group cursor-pointer hover:scale-105 transition-transform duration-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-white",children:"hub"}),(0,r.jsx)("span",{className:"text-xs font-bold text-white tracking-widest uppercase",children:"KeyRouter"}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-white/30 animate-ping opacity-20"})]}),(0,r.jsx)("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 flex flex-col gap-7",children:x.map(e=>(0,r.jsx)("div",{className:"flex items-center gap-3 opacity-70 hover:opacity-100 transition-opacity group",children:(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-[#1e1e28] border border-[#2f2f3c] flex items-center justify-center overflow-hidden p-2 hover:border-white/50 transition-all hover:scale-105",children:(0,r.jsx)(c.A,{src:e.image,alt:e.name,size:48,className:"object-contain rounded-xl max-w-[48px] max-h-[48px]",fallbackText:e.name.slice(0,2).toUpperCase()})})},e.id))}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none stroke-yellow-700",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 50 C 250 70, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 140 C 250 140, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 210 C 250 210, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 300 C 250 280, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"})]}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 50, 740 50",fill:"none",stroke:0===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:0===e?"3":"2",className:0===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 130, 740 130",fill:"none",stroke:1===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:1===e?"3":"2",className:1===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 230, 740 230",fill:"none",stroke:2===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:2===e?"3":"2",className:2===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 310, 740 310",fill:"none",stroke:3===e?"#ffffff":"rgb(75, 85, 99)",strokeWidth:3===e?"3":"2",className:3===e?"animate-pulse":""})]}),(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 flex flex-col justify-between py-6",children:h.map((t,s)=>(0,r.jsx)("div",{className:`px-4 py-2 rounded-lg ${t.color} ${t.textColor} flex items-center justify-center font-bold text-xs shadow-lg hover:scale-110 transition-all cursor-help min-w-[140px] ${e===s?"ring-4 ring-white/40 scale-110":""}`,title:t.name,children:t.name},t.id))}),(0,r.jsx)("div",{className:"md:hidden mt-8 w-full p-4 rounded-lg bg-[#1e1e28] border border-[#2f2f3c]",children:(0,r.jsx)("p",{className:"text-sm text-center text-gray-400",children:"Interactive diagram visible on desktop"})})]})}function f(){return(0,r.jsx)("section",{className:"py-24 border-y border-[#2f2f3c] bg-[#1e1e28]/30",id:"how-it-works",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"How KeyRouter Works"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Data flows seamlessly from your application through our intelligent routing layer to the best provider for the job."})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[(0,r.jsx)("div",{className:"hidden md:block absolute top-12 left-[16%] right-[16%] h-[2px] bg-linear-to-r from-gray-700 via-white to-gray-700 -z-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border border-[#2f2f3c] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-gray-300",children:"terminal"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"1. CLI & SDKs"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Your requests start from your favorite tools or our unified SDK. Just change the base URL."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-center md:text-center",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border-2 border-white flex items-center justify-center shadow-[0_0_30px_rgba(255,255,255,0.15)] z-10 mx-auto",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-white animate-pulse",children:"hub"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 text-white",children:"2. KeyRouter Hub"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Our engine analyzes the prompt, checks provider health, and routes for lowest latency or cost."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-end md:text-right",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#14141b] border border-[#2f2f3c] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"3. AI Providers"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"The request is fulfilled by OpenAI, Anthropic, Gemini, or others instantly."})]})]})]})]})})}let u=[{icon:"link",title:"Unified Endpoint",desc:"Access all providers via a single standard API URL.",colors:{border:"hover:border-blue-500/50",bg:"hover:bg-blue-500/5",iconBg:"bg-blue-500/10",iconText:"text-blue-500",titleHover:"group-hover:text-blue-400"}},{icon:"bolt",title:"Easy Setup",desc:"Get up and running in minutes with npx command.",colors:{border:"hover:border-white/50",bg:"hover:bg-white/5",iconBg:"bg-white/10",iconText:"text-white",titleHover:"group-hover:text-[#d4d4d4]"}},{icon:"shield_with_heart",title:"Model Fallback",desc:"Automatically switch providers on failure or high latency.",colors:{border:"hover:border-rose-500/50",bg:"hover:bg-rose-500/5",iconBg:"bg-rose-500/10",iconText:"text-rose-500",titleHover:"group-hover:text-rose-400"}},{icon:"monitoring",title:"Usage Tracking",desc:"Detailed analytics and cost monitoring across all models.",colors:{border:"hover:border-purple-500/50",bg:"hover:bg-purple-500/5",iconBg:"bg-purple-500/10",iconText:"text-purple-500",titleHover:"group-hover:text-purple-400"}},{icon:"key",title:"OAuth & API Keys",desc:"Securely manage credentials in one vault.",colors:{border:"hover:border-amber-500/50",bg:"hover:bg-amber-500/5",iconBg:"bg-amber-500/10",iconText:"text-amber-500",titleHover:"group-hover:text-amber-400"}},{icon:"cloud_sync",title:"Cloud Sync",desc:"Sync your configurations across devices instantly.",colors:{border:"hover:border-sky-500/50",bg:"hover:bg-sky-500/5",iconBg:"bg-sky-500/10",iconText:"text-sky-500",titleHover:"group-hover:text-sky-400"}},{icon:"terminal",title:"CLI Support",desc:"Works with Claude Code, Codex, Cline, Cursor, and more.",colors:{border:"hover:border-emerald-500/50",bg:"hover:bg-emerald-500/5",iconBg:"bg-emerald-500/10",iconText:"text-emerald-500",titleHover:"group-hover:text-emerald-400"}},{icon:"dashboard",title:"Dashboard",desc:"Visual dashboard for real-time traffic analysis.",colors:{border:"hover:border-fuchsia-500/50",bg:"hover:bg-fuchsia-500/5",iconBg:"bg-fuchsia-500/10",iconText:"text-fuchsia-500",titleHover:"group-hover:text-fuchsia-400"}}];function b(){return(0,r.jsx)("section",{className:"py-24 px-6",id:"features",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Powerful Features"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Everything you need to manage your AI infrastructure in one place, built for scale."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:u.map(e=>(0,r.jsxs)("div",{className:`p-6 rounded-xl bg-[#1e1e28] border border-[#2f2f3c] ${e.colors.border} ${e.colors.bg} transition-all duration-300 group`,children:[(0,r.jsx)("div",{className:`w-10 h-10 rounded-lg ${e.colors.iconBg} flex items-center justify-center mb-4 ${e.colors.iconText} group-hover:scale-110 transition-transform duration-300`,children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e.icon})}),(0,r.jsx)("h3",{className:`text-lg font-bold mb-2 ${e.colors.titleHover} transition-colors`,children:e.title}),(0,r.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed",children:e.desc})]},e.title))})]})})}var g=s(11059);function p(){let{copied:e,copy:t}=(0,g.C)();return(0,r.jsx)("section",{className:"py-24 px-6 bg-[#120f0d]",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-16 items-start",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Get Started in 30 Seconds"}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-8",children:"Install KeyRouter, configure your providers via web dashboard, and start routing AI requests."}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Install KeyRouter"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Run npx command to start the server instantly"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Open Dashboard"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Configure providers and API keys via web interface"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 text-white flex items-center justify-center font-bold",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Route Requests"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Point your CLI tools to http://localhost:20131"})]})]})]})]}),(0,r.jsx)("div",{className:"flex-1 w-full",children:(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden bg-[#1e1e1e] border border-[#2f2f3c] shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-[#252526] border-b border-gray-700",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-green-500"}),(0,r.jsx)("div",{className:"ml-2 text-xs text-gray-500 font-mono",children:"terminal"})]}),(0,r.jsxs)("div",{className:"p-6 font-mono text-sm leading-relaxed overflow-x-auto",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 group cursor-pointer",onClick:()=>{t("npx keyrouter","landing")},children:[(0,r.jsx)("span",{className:"text-green-400",children:"$"}),(0,r.jsx)("span",{className:"text-white",children:"npx keyrouter"}),(0,r.jsx)("span",{className:"ml-auto text-gray-500 text-xs opacity-0 group-hover:opacity-100",children:"landing"===e?"✓ Copied":"Copy"})]}),(0,r.jsxs)("div",{className:"text-gray-400 mb-6",children:[(0,r.jsx)("span",{className:"text-white",children:">"})," Starting KeyRouter...",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:">"})," Server running on ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:20131"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-white",children:">"})," Dashboard: ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:20131/dashboard"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-green-400",children:">"})," Ready to route! ✓"]}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mb-2 border-t border-gray-700 pt-4",children:"\uD83D\uDCDD Configure providers in dashboard or use environment variables"}),(0,r.jsxs)("div",{className:"text-gray-400 text-xs",children:[(0,r.jsx)("span",{className:"text-purple-400",children:"Data Location:"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" macOS/Linux:"})," ~/.keyrouter/db/data.sqlite",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" Windows:"})," %APPDATA%/keyrouter/db/data.sqlite"]})]})]})})]})})})}function j(){return(0,r.jsx)("footer",{className:"border-t border-[#2f2f3c] bg-[#120f0d] pt-16 pb-8 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-16",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,r.jsx)("div",{className:"size-6 rounded bg-white flex items-center justify-center text-[#14141b]",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"hub"})}),(0,r.jsx)("h3",{className:"text-white text-lg font-bold",children:"KeyRouter"})]}),(0,r.jsx)("p",{className:"text-gray-500 text-sm max-w-xs mb-6",children:"The unified endpoint for AI generation. Connect, route, and manage your AI providers with ease."}),(0,r.jsx)("div",{className:"flex gap-4",children:(0,r.jsx)("a",{className:"text-gray-400 hover:text-white transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"})})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Product"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"/dashboard",children:"Dashboard"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"Changelog"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Resources"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Documentation"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Legal"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:"MIT License"})]})]}),(0,r.jsxs)("div",{className:"border-t border-[#2f2f3c] pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"\xa9 2025 KeyRouter. All rights reserved."}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://github.com/keyzakyy-dev/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/keyrouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]})]})]})})}function v(){let e=(0,o.useRouter)();return(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative text-white font-sans overflow-x-hidden antialiased selection:bg-white selection:text-[#14141b]",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 fixed inset-0 z-0 overflow-hidden pointer-events-none bg-[#14141b]",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(to right, #ffffff 1px, transparent 1px), linear-gradient(to bottom, #ffffff 1px, transparent 1px)",backgroundSize:"50px 50px"},className:"jsx-3853dfda129ea3f2 absolute inset-0 opacity-[0.06]"}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute top-0 left-1/4 w-[700px] h-[700px] bg-white/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"2s",animationDuration:"22s"},className:"jsx-3853dfda129ea3f2 absolute top-1/3 right-1/4 w-[600px] h-[600px] bg-purple-500/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"4s",animationDuration:"25s"},className:"jsx-3853dfda129ea3f2 absolute bottom-0 left-1/2 w-[650px] h-[650px] bg-blue-500/8 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{background:"radial-gradient(circle at center, transparent 0%, rgba(24, 20, 17, 0.4) 100%)"},className:"jsx-3853dfda129ea3f2 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative z-10",children:[(0,r.jsx)(n,{}),(0,r.jsxs)("main",{className:"jsx-3853dfda129ea3f2",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative",children:[(0,r.jsx)(d,{}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 flex justify-center pb-20",children:(0,r.jsx)(m,{})})]}),(0,r.jsx)(p,{}),(0,r.jsx)(f,{}),(0,r.jsx)(b,{}),(0,r.jsxs)("section",{className:"jsx-3853dfda129ea3f2 py-32 px-6 relative overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute inset-0 bg-linear-to-t from-white/5 to-transparent pointer-events-none"}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 max-w-4xl mx-auto text-center relative z-10",children:[(0,r.jsx)("h2",{className:"jsx-3853dfda129ea3f2 text-4xl md:text-5xl font-black mb-6",children:"Ready to Simplify Your AI Infrastructure?"}),(0,r.jsx)("p",{className:"jsx-3853dfda129ea3f2 text-xl text-gray-400 mb-10 max-w-2xl mx-auto",children:"Join developers who are streamlining their AI integrations with KeyRouter. Open source and free to start."}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>e.push("/dashboard"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg bg-white hover:bg-[#d4d4d4] text-[#14141b] text-lg font-bold transition-all shadow-[0_0_20px_rgba(255,255,255,0.3)]",children:"Start Free"}),(0,r.jsx)("button",{onClick:()=>window.open("https://github.com/keyzakyy-dev/keyrouter#readme","_blank"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg border border-[#2f2f3c] hover:bg-[#1e1e28] text-white text-lg font-bold transition-all",children:"Read Documentation"})]})]})]})]}),(0,r.jsx)(j,{})]}),(0,r.jsx)(l(),{id:"3853dfda129ea3f2",children:"@keyframes float{0%,100%{transform:translatey(0)}50%{transform:translatey(-10px)}}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes blob{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(30px,-50px)scale(1.1)}66%{transform:translate(-20px,20px)scale(.9)}}.animate-blob{animation:blob 20s ease-in-out infinite}"})]})}}},e=>{e.O(0,[5242,8441,3794,7358],()=>e(e.s=55598)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{952:(e,t,r)=>{Promise.resolve().then(r.bind(r,30565)),Promise.resolve().then(r.bind(r,90285)),Promise.resolve().then(r.bind(r,26300)),Promise.resolve().then(r.t.bind(r,42593,23)),Promise.resolve().then(r.t.bind(r,35154,23)),Promise.resolve().then(r.t.bind(r,92369,23)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},21110:(e,t,r)=>{"use strict";r.d(t,{ThemeProvider:()=>a});var s=r(95155),n=r(12115),i=r(90085);function a({children:e}){let{initTheme:t}=(0,i.A)();return(0,n.useEffect)(()=>{t()},[t]),(0,s.jsx)(s.Fragment,{children:e})}},51743:()=>{},90085:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r(1934),n=r(31692),i=r(90620);function a(e){let t=document.documentElement,r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?r:e)?t.classList.add("dark"):t.classList.remove("dark")}let o=(0,s.v)((0,n.Zr)((e,t)=>({theme:i.B2.defaultTheme,setTheme:t=>{e({theme:t}),a(t)},toggleTheme:()=>{let r="dark"===t().theme?"light":"dark";e({theme:r}),a(r)},initTheme:()=>{a(t().theme)}}),{name:i.B2.storageKey}))},90620:(e,t,r)=>{"use strict";r.d(t,{Q2:()=>s.Q2,fg:()=>s.fg,vQ:()=>n,MA:()=>s.MA,U5:()=>m,UY:()=>l,Nu:()=>i,zN:()=>s.zN,B2:()=>o,h0:()=>a});var s=r(88105);r(28777);let n={name:"KeyRouter Proxy",description:"AI Infrastructure Management",version:"1.0.
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{952:(e,t,r)=>{Promise.resolve().then(r.bind(r,30565)),Promise.resolve().then(r.bind(r,90285)),Promise.resolve().then(r.bind(r,26300)),Promise.resolve().then(r.t.bind(r,42593,23)),Promise.resolve().then(r.t.bind(r,35154,23)),Promise.resolve().then(r.t.bind(r,92369,23)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},21110:(e,t,r)=>{"use strict";r.d(t,{ThemeProvider:()=>a});var s=r(95155),n=r(12115),i=r(90085);function a({children:e}){let{initTheme:t}=(0,i.A)();return(0,n.useEffect)(()=>{t()},[t]),(0,s.jsx)(s.Fragment,{children:e})}},51743:()=>{},90085:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r(1934),n=r(31692),i=r(90620);function a(e){let t=document.documentElement,r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?r:e)?t.classList.add("dark"):t.classList.remove("dark")}let o=(0,s.v)((0,n.Zr)((e,t)=>({theme:i.B2.defaultTheme,setTheme:t=>{e({theme:t}),a(t)},toggleTheme:()=>{let r="dark"===t().theme?"light":"dark";e({theme:r}),a(r)},initTheme:()=>{a(t().theme)}}),{name:i.B2.storageKey}))},90620:(e,t,r)=>{"use strict";r.d(t,{Q2:()=>s.Q2,fg:()=>s.fg,vQ:()=>n,MA:()=>s.MA,U5:()=>m,UY:()=>l,Nu:()=>i,zN:()=>s.zN,B2:()=>o,h0:()=>a});var s=r(88105);r(28777);let n={name:"KeyRouter Proxy",description:"AI Infrastructure Management",version:"1.0.2",versionLabel:"1.0"},i={changelogUrl:"https://raw.githubusercontent.com/keyzakyy-dev/keyrouter/refs/heads/master/CHANGELOG.md",donateUrl:"https://github.com/keyzakyy-dev/keyrouter/issues/new"},a={npmPackageName:"keyrouter",installCmd:"npm i -g keyrouter",installCmdLatest:"npm i -g keyrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20132,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20131},o={storageKey:"theme",defaultTheme:"system"},l={maxLines:200,pollIntervalMs:1e3},m=6e4},94635:(e,t,r)=>{"use strict";r.d(t,{RuntimeI18nProvider:()=>o});var s=r(95155),n=r(12115),i=r(73321),a=r(73006);function o({children:e}){let t=(0,i.usePathname)();return(0,n.useEffect)(()=>{(0,a.FE)()},[]),(0,n.useEffect)(()=>{t&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,a.wn)()})})},[t]),(0,s.jsx)(s.Fragment,{children:e})}}},e=>{e.O(0,[7843,3334,3488,2470,8441,3794,7358],()=>e(e.s=952)),_N_E=e.O()}]);
|
package/app/package.json
CHANGED
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
"Please install Open Claw CLI to use this feature.": "لطفاً برای استفاده از این ویژگی، Open Claw CLI را نصب کنید.",
|
|
866
866
|
"Please install OpenCode CLI to use auto-apply feature.": "لطفاً برای استفاده از ویژگی اعمال خودکار، OpenCode CLI را نصب کنید.",
|
|
867
867
|
"Please wait while we complete the authorization.": "لطفاً در حالی که مجوز را تکمیل میکنیم، منتظر بمانید.",
|
|
868
|
-
"Point your CLI tools to http://localhost:
|
|
868
|
+
"Point your CLI tools to http://localhost:20131": "ابزارهای CLI خود را به http://localhost:20131 هدایت کنید",
|
|
869
869
|
"Pool:": "استخر:",
|
|
870
870
|
"Popup blocked? Enter URL manually": "پنجره بازشو مسدود شد؟ URL را به صورت دستی وارد کنید",
|
|
871
871
|
"Port 443 Already In Use": "پورت ۴۴۳ در حال استفاده است",
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
"Please install Open Claw CLI to use this feature.": "Silakan instal Open Claw CLI untuk menggunakan fitur ini.",
|
|
866
866
|
"Please install OpenCode CLI to use auto-apply feature.": "Silakan instal OpenCode CLI untuk menggunakan fitur penerapan otomatis.",
|
|
867
867
|
"Please wait while we complete the authorization.": "Silakan tunggu sementara kami menyelesaikan otorisasi.",
|
|
868
|
-
"Point your CLI tools to http://localhost:
|
|
868
|
+
"Point your CLI tools to http://localhost:20131": "Arahkan alat CLI Anda ke http://localhost:20131",
|
|
869
869
|
"Pool:": "Pool:",
|
|
870
870
|
"Popup blocked? Enter URL manually": "Popup diblokir? Masukkan URL secara manual",
|
|
871
871
|
"Port 443 Already In Use": "Port 443 Sudah Digunakan",
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
"Please install Open Claw CLI to use this feature.": "សូមដំឡើង Open Claw CLI ដើម្បីប្រើមុខងារនេះ។",
|
|
868
868
|
"Please install OpenCode CLI to use auto-apply feature.": "សូមដំឡើង OpenCode CLI ដើម្បីប្រើមុខងារអនុវត្តស្វ័យប្រវត្តិ។",
|
|
869
869
|
"Please wait while we complete the authorization.": "សូមរង់ចាំ ខណៈពេលយើងបញ្ចប់ការផ្តល់សិទ្ធិ។",
|
|
870
|
-
"Point your CLI tools to http://localhost:
|
|
870
|
+
"Point your CLI tools to http://localhost:20131": "កំណត់ឧបករណ៍ CLI របស់អ្នកទៅ http://localhost:20131",
|
|
871
871
|
"Pool:": "Pool៖",
|
|
872
872
|
"Popup blocked? Enter URL manually": "Popup ត្រូវបានទប់ស្កាត់? បញ្ចូល URL ដោយដៃ",
|
|
873
873
|
"Port 443 Already In Use": "Port 443 កំពុងត្រូវបានប្រើ",
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
"Please copy the URL from the address bar and paste it in the application.": "Copie a URL da barra de endereço e cole no aplicativo.",
|
|
744
744
|
"Please enter a Proxy URL to test": "Por favor, digite uma URL de proxy para testar",
|
|
745
745
|
"Please wait while we complete the authorization.": "Aguarde enquanto concluímos a autorização.",
|
|
746
|
-
"Point your CLI tools to http://localhost:
|
|
746
|
+
"Point your CLI tools to http://localhost:20131": "Aponte suas ferramentas CLI para http://localhost:20131",
|
|
747
747
|
"Popup was blocked. After authorizing in the browser, paste the full callback URL here:": "O pop-up foi bloqueado. Depois de autorizar no navegador, cole a URL completa de callback aqui:",
|
|
748
748
|
"Port 443 Already In Use": "Porta 443 já está em uso",
|
|
749
749
|
"Port 443 is currently used by another process:": "A porta 443 está sendo usada por outro processo:",
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
"Please install Open Claw CLI to use this feature.": "กรุณาติดตั้ง Open Claw CLI เพื่อใช้คุณสมบัตินี้",
|
|
866
866
|
"Please install OpenCode CLI to use auto-apply feature.": "กรุณาติดตั้ง OpenCode CLI เพื่อใช้คุณสมบัติ auto-apply",
|
|
867
867
|
"Please wait while we complete the authorization.": "กรุณารอในขณะที่เราดำเนินการอนุมัติให้เสร็จสิ้น",
|
|
868
|
-
"Point your CLI tools to http://localhost:
|
|
868
|
+
"Point your CLI tools to http://localhost:20131": "ชี้ CLI tools ของคุณไปที่ http://localhost:20131",
|
|
869
869
|
"Pool:": "Pool:",
|
|
870
870
|
"Popup blocked? Enter URL manually": "ป๊อปอัปถูกบล็อก? ป้อน URL ด้วยตนเอง",
|
|
871
871
|
"Port 443 Already In Use": "Port 443 ถูกใช้งานอยู่แล้ว",
|
|
@@ -866,7 +866,7 @@
|
|
|
866
866
|
"Please install Open Claw CLI to use this feature.": "请安装 Open Claw CLI 才能使用此功能。",
|
|
867
867
|
"Please install OpenCode CLI to use auto-apply feature.": "请安装 OpenCode CLI 以使用自动应用功能。",
|
|
868
868
|
"Please wait while we complete the authorization.": "我们正在完成授权,请稍候。",
|
|
869
|
-
"Point your CLI tools to http://localhost:
|
|
869
|
+
"Point your CLI tools to http://localhost:20131": "将您的 CLI 工具指向 http://localhost:20131",
|
|
870
870
|
"Pool:": "代理池:",
|
|
871
871
|
"Popup blocked? Enter URL manually": "弹出窗口被拦截?请手动输入 URL",
|
|
872
872
|
"Port 443 Already In Use": "端口 443 已被占用",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 192 192">
|
|
2
2
|
<rect width="192" height="192" rx="24" fill="#0a0a0a"/>
|
|
3
|
-
<
|
|
3
|
+
<g transform="translate(64,60) scale(4)" fill="#ffffff">
|
|
4
|
+
<path d="M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0 0 18 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82zM6 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 12c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>
|
|
5
|
+
</g>
|
|
4
6
|
</svg>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
|
2
2
|
<rect width="512" height="512" rx="64" fill="#0a0a0a"/>
|
|
3
|
-
<
|
|
3
|
+
<g transform="translate(176,166) scale(10)" fill="#ffffff">
|
|
4
|
+
<path d="M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0 0 18 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82zM6 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 12c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>
|
|
5
|
+
</g>
|
|
4
6
|
</svg>
|
|
@@ -10,7 +10,7 @@ const fs = require("fs");
|
|
|
10
10
|
const os = require("os");
|
|
11
11
|
|
|
12
12
|
const packageName = process.env.UPDATER_PKG_NAME || "keyrouter";
|
|
13
|
-
const port = parseInt(process.env.UPDATER_PORT || "
|
|
13
|
+
const port = parseInt(process.env.UPDATER_PORT || "20132", 10);
|
|
14
14
|
const tailLines = parseInt(process.env.UPDATER_TAIL_LINES || "8", 10);
|
|
15
15
|
const maxRetries = parseInt(process.env.UPDATER_RETRIES || "3", 10);
|
|
16
16
|
const retryDelayMs = parseInt(process.env.UPDATER_RETRY_DELAY_MS || "5000", 10);
|
|
@@ -18,7 +18,7 @@ const lingerMs = parseInt(process.env.UPDATER_LINGER_MS || "30000", 10);
|
|
|
18
18
|
const waitMinMs = parseInt(process.env.UPDATER_WAIT_MIN_MS || "3000", 10);
|
|
19
19
|
const waitMaxMs = parseInt(process.env.UPDATER_WAIT_MAX_MS || "15000", 10);
|
|
20
20
|
const waitCheckMs = parseInt(process.env.UPDATER_WAIT_CHECK_MS || "500", 10);
|
|
21
|
-
const appPort = parseInt(process.env.UPDATER_APP_PORT || "
|
|
21
|
+
const appPort = parseInt(process.env.UPDATER_APP_PORT || "20131", 10);
|
|
22
22
|
|
|
23
23
|
// Data directory (match mitm/paths.js logic)
|
|
24
24
|
function getDataDir() {
|
package/app/src/mitm/server.js
CHANGED
|
@@ -26,7 +26,7 @@ ${c}`;qt.writeFileSync(n,y)}catch{}},file:n}}ti.exports={log:Pu,err:Ou,dumpReque
|
|
|
26
26
|
Private-Lines: `+u+`\r
|
|
27
27
|
`,s+=f;var x=va("putty-private-key-file-mac-key",t),T=Ee.util.createBuffer();mr(T,r),mr(T,n),mr(T,a),T.putInt32(i.length()),T.putBuffer(i),T.putInt32(l.length()),T.putBuffer(l);var I=Ee.hmac.create();return I.start("sha1",x),I.update(T.bytes()),s+=`\r
|
|
28
28
|
Private-MAC: `+I.digest().toHex()+`\r
|
|
29
|
-
`,s};ma.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=Ee.util.createBuffer();return mr(r,a),xt(r,e.e),xt(r,e.n),a+" "+Ee.util.encode64(r.bytes())+" "+t};ma.privateKeyToOpenSSH=function(e,t){return t?Ee.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Ee.pki.privateKeyToPem(e)};ma.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||Ee.md.md5.create(),r="ssh-rsa",n=Ee.util.createBuffer();mr(n,r),xt(n,e.e),xt(n,e.n),a.start(),a.update(n.getBytes());var s=a.digest();if(t.encoding==="hex"){var i=s.toHex();return t.delimiter?i.match(/.{2}/g).join(t.delimiter):i}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};function xt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=Ee.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function mr(e,t){e.putInt32(t.length),e.putString(t)}function va(){for(var e=Ee.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}});var Co=F((rp,mo)=>{mo.exports=Y();wt();Os();lt();qr();Ir();to();sr();io();lo();co();sn();Zr();Qt();Za();ln();go();cn();tn();za();sa();tt();Ya();vo();vn();ae()});var To=F((ap,So)=>{var Eo=require("path"),Je=require("fs"),Ze=Co(),{MITM_DIR:Ca}=ar(),Ft=Eo.join(Ca,"rootCA.key"),Bt=Eo.join(Ca,"rootCA.crt");function xo(e){try{let t=Ze.pki.certificateFromPem(Je.readFileSync(e,"utf8")),a=new Date(Date.now()+720*60*60*1e3);return t.validity.notAfter<a}catch{return!0}}function wc(){let e=Je.existsSync(Ft)&&Je.existsSync(Bt);if(e&&!xo(Bt))return console.log("\u2705 Root CA already exists"),{key:Ft,cert:Bt};if(e){console.log("\u{1F510} Root CA expired or expiring soon \u2014 regenerating...");try{Je.unlinkSync(Ft)}catch{}try{Je.unlinkSync(Bt)}catch{}}Je.existsSync(Ca)||Je.mkdirSync(Ca,{recursive:!0}),console.log("\u{1F510} Generating Root CA certificate...");let t=Ze.pki.rsa.generateKeyPair(2048),a=Ze.pki.createCertificate();a.publicKey=t.publicKey,a.serialNumber="01",a.validity.notBefore=new Date,a.validity.notAfter=new Date,a.validity.notAfter.setFullYear(a.validity.notBefore.getFullYear()+10);let r=[{name:"commonName",value:"KeyRouter MITM Root CA"},{name:"organizationName",value:"KeyRouter"},{name:"countryName",value:"US"}];a.setSubject(r),a.setIssuer(r),a.setExtensions([{name:"basicConstraints",cA:!0,critical:!0},{name:"keyUsage",keyCertSign:!0,cRLSign:!0,critical:!0},{name:"subjectKeyIdentifier"}]),a.sign(t.privateKey,Ze.md.sha256.create());let n=Ze.pki.privateKeyToPem(t.privateKey),s=Ze.pki.certificateToPem(a);return Je.writeFileSync(Ft,n),Je.writeFileSync(Bt,s),console.log("\u2705 Root CA generated successfully"),{key:Ft,cert:Bt}}function Rc(){if(!Je.existsSync(Ft)||!Je.existsSync(Bt))throw new Error("Root CA not found. Generate it first.");let e=Je.readFileSync(Ft,"utf8"),t=Je.readFileSync(Bt,"utf8");return{key:Ze.pki.privateKeyFromPem(e),cert:Ze.pki.certificateFromPem(t)}}function Lc(e,t){let a=Ze.pki.rsa.generateKeyPair(2048),r=Ze.pki.createCertificate();return r.publicKey=a.publicKey,r.serialNumber=Math.floor(Math.random()*1e6).toString(),r.validity.notBefore=new Date,r.validity.notAfter=new Date,r.validity.notAfter.setFullYear(r.validity.notBefore.getFullYear()+1),r.setSubject([{name:"commonName",value:e}]),r.setIssuer(t.cert.subject.attributes),r.setExtensions([{name:"basicConstraints",cA:!1},{name:"keyUsage",digitalSignature:!0,keyEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0},{name:"subjectAltName",altNames:[{type:2,value:e},{type:2,value:`*.${e}`}]}]),r.sign(t.key,Ze.md.sha256.create()),{key:Ze.pki.privateKeyToPem(a.privateKey),cert:Ze.pki.certificateToPem(r)}}So.exports={generateRootCA:wc,loadRootCA:Rc,generateLeafCert:Lc,isCertExpired:xo,ROOT_CA_CERT_PATH:Bt,ROOT_CA_KEY_PATH:Ft}});var Io=F((op,Ao)=>{var np=require("path"),ip=require("fs"),{MITM_DIR:sp}=ar(),{generateRootCA:kc,loadRootCA:Dc,generateLeafCert:Uc}=To();function Pc(){return kc()}function Oc(e){try{let t=Dc(),a=Uc(e,t);return{key:a.key,cert:a.cert}}catch(t){return console.error(`Failed to generate cert for ${e}:`,t.message),null}}Ao.exports={generateCert:Pc,getCertForDomain:Oc}});var No=F((up,_o)=>{var Bo=require("fs"),Vc=require("path"),{DATA_DIR:Fc}=ar(),bo=Vc.join(Fc,"mitm","aliases.json");function Kc(){try{return Bo.existsSync(bo)?JSON.parse(Bo.readFileSync(bo,"utf-8")):null}catch{return null}}function Mc(e){return Kc()?.[e]||null}_o.exports={getMitmAlias:Mc}});var Lo=F((lp,Ro)=>{"use strict";var er="2.24.0";function qc(e){return!e||typeof e!="object"||Array.isArray(e)?!1:String(e.ideName||"").toLowerCase()==="antigravity"||String(e.ideType||"").toUpperCase()==="ANTIGRAVITY"?!0:Object.prototype.hasOwnProperty.call(e,"ideVersion")}function wo(e,t){return typeof e!="string"||!e.includes("antigravity/")?e:e.replace(/antigravity\/[^\s]+/,`antigravity/${t}`)}function Hc(e,t,a){if(!(a?.includes(":generateContent")||a?.includes(":streamGenerateContent")))return{bodyBuffer:e,headers:t,applied:!1,version:er};let n={...t},s=wo(n["user-agent"],er),i=s!==n["user-agent"];i&&(n["user-agent"]=s);try{let o=JSON.parse(e.toString());return qc(o?.metadata)?(o.metadata.ideVersion=er,{bodyBuffer:Buffer.from(JSON.stringify(o)),headers:n,applied:!0,version:er}):{bodyBuffer:e,headers:n,applied:i,version:er}}catch{return{bodyBuffer:e,headers:n,applied:i,version:er}}}Ro.exports={ANTIGRAVITY_IDE_VERSION:er,applyAntigravityIdeVersionOverride:Hc,rewriteAntigravityUserAgent:wo}});var xa=F((cp,Uo)=>{var{log:Ea,err:fp}=Gt(),ko="http://localhost:
|
|
29
|
+
`,s};ma.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=Ee.util.createBuffer();return mr(r,a),xt(r,e.e),xt(r,e.n),a+" "+Ee.util.encode64(r.bytes())+" "+t};ma.privateKeyToOpenSSH=function(e,t){return t?Ee.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Ee.pki.privateKeyToPem(e)};ma.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||Ee.md.md5.create(),r="ssh-rsa",n=Ee.util.createBuffer();mr(n,r),xt(n,e.e),xt(n,e.n),a.start(),a.update(n.getBytes());var s=a.digest();if(t.encoding==="hex"){var i=s.toHex();return t.delimiter?i.match(/.{2}/g).join(t.delimiter):i}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};function xt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=Ee.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function mr(e,t){e.putInt32(t.length),e.putString(t)}function va(){for(var e=Ee.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}});var Co=F((rp,mo)=>{mo.exports=Y();wt();Os();lt();qr();Ir();to();sr();io();lo();co();sn();Zr();Qt();Za();ln();go();cn();tn();za();sa();tt();Ya();vo();vn();ae()});var To=F((ap,So)=>{var Eo=require("path"),Je=require("fs"),Ze=Co(),{MITM_DIR:Ca}=ar(),Ft=Eo.join(Ca,"rootCA.key"),Bt=Eo.join(Ca,"rootCA.crt");function xo(e){try{let t=Ze.pki.certificateFromPem(Je.readFileSync(e,"utf8")),a=new Date(Date.now()+720*60*60*1e3);return t.validity.notAfter<a}catch{return!0}}function wc(){let e=Je.existsSync(Ft)&&Je.existsSync(Bt);if(e&&!xo(Bt))return console.log("\u2705 Root CA already exists"),{key:Ft,cert:Bt};if(e){console.log("\u{1F510} Root CA expired or expiring soon \u2014 regenerating...");try{Je.unlinkSync(Ft)}catch{}try{Je.unlinkSync(Bt)}catch{}}Je.existsSync(Ca)||Je.mkdirSync(Ca,{recursive:!0}),console.log("\u{1F510} Generating Root CA certificate...");let t=Ze.pki.rsa.generateKeyPair(2048),a=Ze.pki.createCertificate();a.publicKey=t.publicKey,a.serialNumber="01",a.validity.notBefore=new Date,a.validity.notAfter=new Date,a.validity.notAfter.setFullYear(a.validity.notBefore.getFullYear()+10);let r=[{name:"commonName",value:"KeyRouter MITM Root CA"},{name:"organizationName",value:"KeyRouter"},{name:"countryName",value:"US"}];a.setSubject(r),a.setIssuer(r),a.setExtensions([{name:"basicConstraints",cA:!0,critical:!0},{name:"keyUsage",keyCertSign:!0,cRLSign:!0,critical:!0},{name:"subjectKeyIdentifier"}]),a.sign(t.privateKey,Ze.md.sha256.create());let n=Ze.pki.privateKeyToPem(t.privateKey),s=Ze.pki.certificateToPem(a);return Je.writeFileSync(Ft,n),Je.writeFileSync(Bt,s),console.log("\u2705 Root CA generated successfully"),{key:Ft,cert:Bt}}function Rc(){if(!Je.existsSync(Ft)||!Je.existsSync(Bt))throw new Error("Root CA not found. Generate it first.");let e=Je.readFileSync(Ft,"utf8"),t=Je.readFileSync(Bt,"utf8");return{key:Ze.pki.privateKeyFromPem(e),cert:Ze.pki.certificateFromPem(t)}}function Lc(e,t){let a=Ze.pki.rsa.generateKeyPair(2048),r=Ze.pki.createCertificate();return r.publicKey=a.publicKey,r.serialNumber=Math.floor(Math.random()*1e6).toString(),r.validity.notBefore=new Date,r.validity.notAfter=new Date,r.validity.notAfter.setFullYear(r.validity.notBefore.getFullYear()+1),r.setSubject([{name:"commonName",value:e}]),r.setIssuer(t.cert.subject.attributes),r.setExtensions([{name:"basicConstraints",cA:!1},{name:"keyUsage",digitalSignature:!0,keyEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0},{name:"subjectAltName",altNames:[{type:2,value:e},{type:2,value:`*.${e}`}]}]),r.sign(t.key,Ze.md.sha256.create()),{key:Ze.pki.privateKeyToPem(a.privateKey),cert:Ze.pki.certificateToPem(r)}}So.exports={generateRootCA:wc,loadRootCA:Rc,generateLeafCert:Lc,isCertExpired:xo,ROOT_CA_CERT_PATH:Bt,ROOT_CA_KEY_PATH:Ft}});var Io=F((op,Ao)=>{var np=require("path"),ip=require("fs"),{MITM_DIR:sp}=ar(),{generateRootCA:kc,loadRootCA:Dc,generateLeafCert:Uc}=To();function Pc(){return kc()}function Oc(e){try{let t=Dc(),a=Uc(e,t);return{key:a.key,cert:a.cert}}catch(t){return console.error(`Failed to generate cert for ${e}:`,t.message),null}}Ao.exports={generateCert:Pc,getCertForDomain:Oc}});var No=F((up,_o)=>{var Bo=require("fs"),Vc=require("path"),{DATA_DIR:Fc}=ar(),bo=Vc.join(Fc,"mitm","aliases.json");function Kc(){try{return Bo.existsSync(bo)?JSON.parse(Bo.readFileSync(bo,"utf-8")):null}catch{return null}}function Mc(e){return Kc()?.[e]||null}_o.exports={getMitmAlias:Mc}});var Lo=F((lp,Ro)=>{"use strict";var er="2.24.0";function qc(e){return!e||typeof e!="object"||Array.isArray(e)?!1:String(e.ideName||"").toLowerCase()==="antigravity"||String(e.ideType||"").toUpperCase()==="ANTIGRAVITY"?!0:Object.prototype.hasOwnProperty.call(e,"ideVersion")}function wo(e,t){return typeof e!="string"||!e.includes("antigravity/")?e:e.replace(/antigravity\/[^\s]+/,`antigravity/${t}`)}function Hc(e,t,a){if(!(a?.includes(":generateContent")||a?.includes(":streamGenerateContent")))return{bodyBuffer:e,headers:t,applied:!1,version:er};let n={...t},s=wo(n["user-agent"],er),i=s!==n["user-agent"];i&&(n["user-agent"]=s);try{let o=JSON.parse(e.toString());return qc(o?.metadata)?(o.metadata.ideVersion=er,{bodyBuffer:Buffer.from(JSON.stringify(o)),headers:n,applied:!0,version:er}):{bodyBuffer:e,headers:n,applied:i,version:er}}catch{return{bodyBuffer:e,headers:n,applied:i,version:er}}}Ro.exports={ANTIGRAVITY_IDE_VERSION:er,applyAntigravityIdeVersionOverride:Hc,rewriteAntigravityUserAgent:wo}});var xa=F((cp,Uo)=>{var{log:Ea,err:fp}=Gt(),ko="http://localhost:20131",Gc=String(process.env.MITM_ROUTER_BASE||ko).trim().replace(/\/+$/,"")||ko,Do=process.env.ROUTER_API_KEY,zc=new Set(["host","content-length","connection","transfer-encoding","content-type","authorization"]);async function Qc(e,t="/v1/chat/completions",a={}){let r={};for(let[s,i]of Object.entries(a))zc.has(s.toLowerCase())||(r[s]=i);return await fetch(`${Gc}${t}`,{method:"POST",headers:{...r,"Content-Type":"application/json",...Do&&{Authorization:`Bearer ${Do}`}},body:JSON.stringify(e)})}async function $c(e,t,a){let r=e.headers.get("content-type")||"application/json",n=e.status||200,s={"Content-Type":r,"Cache-Control":"no-cache",Connection:"keep-alive"};if(r.includes("text/event-stream")&&(s["X-Accel-Buffering"]="no"),t.writeHead(n,s),a&&a.writeHeader(e.status,Object.fromEntries(e.headers)),!e.body){let u=await e.text().catch(()=>"");a&&(a.writeChunk(u),a.end()),t.end(u);return}let i=e.body.getReader(),o=new TextDecoder;for(;;){let{done:u,value:l}=await i.read();if(u){a&&a.end(),t.end();break}a&&a.writeChunk(l),t.write(o.decode(l,{stream:!0}))}}async function Yc(e,t,a,r){let n=e.headers.get("content-type")||"application/json",s={"Content-Type":n,"Cache-Control":"no-cache",Connection:"keep-alive"};if(n.includes("text/event-stream")&&(s["X-Accel-Buffering"]="no"),t.writeHead(200,s),!e.body){t.end(await e.text().catch(()=>""));return}let i=e.body.getReader(),o=new TextDecoder("utf-8",{fatal:!1}),u="";for(;;){let{done:l,value:f}=await i.read();if(l)break;u+=o.decode(f,{stream:!0});let c=u.split(`
|
|
30
30
|
`);u=c.pop()||"";for(let v of c){let y=v.trim();if(!y||!y.startsWith("data:"))continue;let g=y.slice(5).trim();if(g!=="[DONE]"){process.env.DEBUG_MITM&&Ea(`[SSE in] ${g.slice(0,200)}`);try{let C=JSON.parse(g),x=a(C,r);if(x!=null){let T=Array.isArray(x)?x:[x];for(let I of T){if(process.env.DEBUG_MITM){let b=I.length||I.byteLength||0;Ea(`[write binary frame] (${b}B) first 20B: ${Array.from(I.slice(0,20)).join(",")}`)}t.write(Buffer.from(I))}}}catch{}}}}try{let l=a(null,r);if(l!=null){let f=Array.isArray(l)?l:[l];for(let c of f)t.write(c)}}catch{}t.end()}async function jc(e,t,a,r){let n={"Content-Type":"application/vnd.amazon.eventstream","Cache-Control":"no-cache",Connection:"keep-alive"};if(t.writeHead(200,n),!e.body){t.end(await e.text().catch(()=>""));return}let s=e.body.getReader(),i=new TextDecoder("utf-8",{fatal:!1}),o="";for(;;){let{done:u,value:l}=await s.read();if(u)break;o+=i.decode(l,{stream:!0});let f=o.split(`
|
|
31
31
|
`);o=f.pop()||"";for(let c of f){let v=c.trim();if(!v||!v.startsWith("data:"))continue;let y=v.slice(5).trim();if(y!=="[DONE]"){process.env.DEBUG_MITM&&Ea(`[SSE in] ${y.slice(0,200)}`);try{let g=JSON.parse(y),C=a(g,r);if(C!=null){let x=Array.isArray(C)?C:[C];for(let T of x){if(process.env.DEBUG_MITM){let I=T.length||T.byteLength||0;Ea(`[write binary frame] (${I}B) first 20B: ${Array.from(T.slice(0,20)).join(",")}`)}t.write(Buffer.from(T))}}}catch{}}}}try{let u=a(null,r);if(u!=null){let l=Array.isArray(u)?u:[u];for(let f of l)t.write(f)}}catch{}t.end()}Uo.exports={fetchRouter:Qc,pipeSSE:$c,pipeTransformedSSE:Yc,pipeTransformedEventStream:jc}});var Oo=F((hp,Po)=>{var{err:Wc,createResponseDumper:Xc}=Gt(),{IS_DEV:Jc}=Er(),{fetchRouter:Zc,pipeSSE:eh}=xa();async function th(e,t,a,r){let n=Jc?Xc(e,"intercept-antigravity"):null,s=e.url.includes(":streamGenerateContent");try{let i=JSON.parse(a.toString());i.model&&(i.model=r);let o=await Zc(i,"/v1/chat/completions",e.headers);await eh(o,t,n)}catch(i){Wc(`[antigravity] ${i.message}`),n&&(n.writeChunk(`
|
|
32
32
|
[ERROR] ${i.message}
|
package/cli.js
CHANGED
|
@@ -106,7 +106,7 @@ try { ensureTrayRuntime({ silent: true }); } catch {}
|
|
|
106
106
|
const APP_NAME = pkg.name; // Use from package.json
|
|
107
107
|
const INSTALL_CMD_LATEST = `npm i -g ${APP_NAME}@latest --prefer-online`;
|
|
108
108
|
|
|
109
|
-
const DEFAULT_PORT =
|
|
109
|
+
const DEFAULT_PORT = 20131;
|
|
110
110
|
const DEFAULT_HOST = "0.0.0.0";
|
|
111
111
|
|
|
112
112
|
// First non-internal IPv4 — the address remote peers actually reach when bound to 0.0.0.0.
|
|
@@ -169,7 +169,7 @@ Options:
|
|
|
169
169
|
|
|
170
170
|
Commands:
|
|
171
171
|
connect <server-url> Configure Claude Code for a remote keyrouter server
|
|
172
|
-
(npx keyrouter connect http://host:
|
|
172
|
+
(npx keyrouter connect http://host:20131 — no install needed)
|
|
173
173
|
show [tool…] Show each CLI tool's current keyrouter config and models
|
|
174
174
|
(e.g. keyrouter show claude)
|
|
175
175
|
xai video --prompt "..." --output video.mp4
|
|
@@ -590,13 +590,13 @@ async function showInterfaceMenu(latestVersion) {
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
menuItems.push(
|
|
593
|
-
{ label: "Web UI (Open in Browser)", icon: "
|
|
594
|
-
{ label: "Terminal UI (Interactive CLI)", icon: "
|
|
595
|
-
{ label: "Hide to Tray (Background)", icon: "
|
|
596
|
-
{ label: "Exit", icon: "
|
|
593
|
+
{ label: "Web UI (Open in Browser)", icon: "🖥️" },
|
|
594
|
+
{ label: "Terminal UI (Interactive CLI)", icon: "⌨️" },
|
|
595
|
+
{ label: "Hide to Tray (Background)", icon: "🗔" },
|
|
596
|
+
{ label: "Exit", icon: "✕" }
|
|
597
597
|
);
|
|
598
598
|
|
|
599
|
-
const selected = await selectMenu(
|
|
599
|
+
const selected = await selectMenu(`⚡ KeyRouter — Choose Interface [v${pkg.version}]`, menuItems, 0, subtitle);
|
|
600
600
|
|
|
601
601
|
const offset = latestVersion ? 1 : 0;
|
|
602
602
|
|
package/hooks/trayRuntime.js
CHANGED
|
@@ -32,7 +32,7 @@ const LEGACY_SYSTRAY_PKG = "systray";
|
|
|
32
32
|
// cgo compiles AppKit against the runner's SDK, so this value tracks that image:
|
|
33
33
|
// when GitHub updates it the sha changes, the workflow refuses to publish, and
|
|
34
34
|
// this constant must be bumped in the same change as the re-upload.
|
|
35
|
-
const ARM64_TRAY_URL = "https://github.com/
|
|
35
|
+
const ARM64_TRAY_URL = "https://github.com/keyzakyy-dev/keyrouter/releases/download/tray-binaries/tray_darwin_arm64";
|
|
36
36
|
const ARM64_TRAY_SHA256 = "487e3c365aaa1eb6ad295bf3989711e975b52cee07505bf641c8559954881c81";
|
|
37
37
|
const ARM64_RETRY_COOLDOWN_MS = 24 * 60 * 60 * 1000;
|
|
38
38
|
|
package/package.json
CHANGED
package/src/cli/api/client.js
CHANGED
|
@@ -9,7 +9,7 @@ const { machineIdSync } = require("node-machine-id");
|
|
|
9
9
|
// Default configuration
|
|
10
10
|
const DEFAULT_CONFIG = {
|
|
11
11
|
host: "localhost",
|
|
12
|
-
port:
|
|
12
|
+
port: 20131,
|
|
13
13
|
protocol: "http:",
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -226,7 +226,7 @@ async function getOAuthAuthUrl(provider) {
|
|
|
226
226
|
// Codex requires fixed port 1455 and path /auth/callback
|
|
227
227
|
const redirectUri = provider === "codex"
|
|
228
228
|
? "http://localhost:1455/auth/callback"
|
|
229
|
-
: "http://localhost:
|
|
229
|
+
: "http://localhost:20131/callback";
|
|
230
230
|
return makeRequest("GET", `/api/oauth/${provider}/authorize?redirect_uri=${encodeURIComponent(redirectUri)}`);
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -18,8 +18,8 @@ Usage: keyrouter connect <server-url> [options]
|
|
|
18
18
|
Configure CLI tools on THIS machine to use a remote keyrouter server.
|
|
19
19
|
No local server is started. Run without installing:
|
|
20
20
|
|
|
21
|
-
npx keyrouter connect http://<server-host>:
|
|
22
|
-
npx keyrouter connect http://<server-host>:
|
|
21
|
+
npx keyrouter connect http://<server-host>:20131
|
|
22
|
+
npx keyrouter connect http://<server-host>:20131 --tools claude,codex,opencode
|
|
23
23
|
|
|
24
24
|
Options:
|
|
25
25
|
--tools <list> Comma-separated tools to configure (prompted if omitted
|
|
@@ -45,8 +45,8 @@ Models come from the server's own CLI-tools config (set on its dashboard).
|
|
|
45
45
|
Nothing is hardcoded: a Claude tier the server leaves unset is left unset,
|
|
46
46
|
and a non-Claude tool with no model anywhere is skipped. Flags override:
|
|
47
47
|
|
|
48
|
-
npx keyrouter connect http://<server-host>:
|
|
49
|
-
npx keyrouter connect http://<server-host>:
|
|
48
|
+
npx keyrouter connect http://<server-host>:20131 --tools claude --sonnet cc/claude-sonnet-5-5
|
|
49
|
+
npx keyrouter connect http://<server-host>:20131 --tools codex,opencode --model ocg/deepseek-flash
|
|
50
50
|
`;
|
|
51
51
|
|
|
52
52
|
function parseArgs(argv) {
|
|
@@ -13,7 +13,7 @@ const https = require("https");
|
|
|
13
13
|
const fs = require("fs");
|
|
14
14
|
const path = require("path");
|
|
15
15
|
|
|
16
|
-
const DEFAULT_PORT =
|
|
16
|
+
const DEFAULT_PORT = 20131;
|
|
17
17
|
const DEFAULT_HOST = "127.0.0.1";
|
|
18
18
|
const DEFAULT_MODEL = "xai/grok-imagine-video";
|
|
19
19
|
const DEFAULT_TIMEOUT_SEC = 600;
|
|
@@ -514,7 +514,7 @@ async function handleAddOAuthConnection(providerId) {
|
|
|
514
514
|
console.log(` ${COLORS.bold}${COLORS.cyan}2.${COLORS.reset} Complete authorization in browser`);
|
|
515
515
|
console.log();
|
|
516
516
|
console.log(` ${COLORS.bold}${COLORS.cyan}3.${COLORS.reset} Copy the callback URL from address bar`);
|
|
517
|
-
console.log(` ${COLORS.dim}(looks like: http://localhost:
|
|
517
|
+
console.log(` ${COLORS.dim}(looks like: http://localhost:20131/callback?code=...)${COLORS.reset}`);
|
|
518
518
|
console.log();
|
|
519
519
|
|
|
520
520
|
const callbackUrl = await prompt(" Paste callback URL: ");
|
|
@@ -32,7 +32,7 @@ async function showSettingsMenu(breadcrumb = []) {
|
|
|
32
32
|
lines.push(` Endpoint: ${COLORS.green}${tunnel.publicUrl}/v1${COLORS.reset}`);
|
|
33
33
|
lines.push(` Tunnel: ${COLORS.green}ON${COLORS.reset} ${COLORS.dim}(${tunnel.shortId})${COLORS.reset}`);
|
|
34
34
|
} else {
|
|
35
|
-
lines.push(` Endpoint: http://localhost:
|
|
35
|
+
lines.push(` Endpoint: http://localhost:20131/v1`);
|
|
36
36
|
lines.push(` Tunnel: ${COLORS.red}OFF${COLORS.reset} ${COLORS.dim}(local only)${COLORS.reset}`);
|
|
37
37
|
}
|
|
38
38
|
|
package/src/cli/tray/icon.ico
CHANGED
|
Binary file
|
package/src/cli/tray/icon.png
CHANGED
|
Binary file
|
package/src/cli/utils/input.js
CHANGED
|
@@ -101,24 +101,31 @@ async function selectMenu(title, items, defaultIndex = 0, subtitle = "", headerC
|
|
|
101
101
|
if (!isActive) return;
|
|
102
102
|
process.stdout.write("\x1b[2J\x1b[H");
|
|
103
103
|
const width = Math.min(process.stdout.columns || 40, 40);
|
|
104
|
-
console.log(`\n${COLORS.terracotta}${"=".repeat(width)}${COLORS.reset}`);
|
|
105
|
-
console.log(` ${COLORS.bright}${COLORS.terracotta}${title}${COLORS.reset}`);
|
|
106
|
-
if (subtitle) console.log(` ${COLORS.dim}${subtitle}${COLORS.reset}`);
|
|
107
|
-
console.log(`${COLORS.terracotta}${"=".repeat(width)}${COLORS.reset}`);
|
|
108
|
-
if (breadcrumb.length > 0) console.log(` ${COLORS.dim}${breadcrumb.join(" > ")}${COLORS.reset}`);
|
|
109
|
-
console.log();
|
|
110
|
-
if (headerContent) { console.log(headerContent); console.log(); }
|
|
111
|
-
|
|
112
104
|
const isWin = process.platform === "win32";
|
|
105
|
+
const hz = isWin ? "=" : "─";
|
|
106
|
+
const tl = isWin ? "=" : "┌";
|
|
107
|
+
const tr = isWin ? "=" : "┐";
|
|
108
|
+
const bl = isWin ? "=" : "└";
|
|
109
|
+
const br = isWin ? "=" : "┘";
|
|
110
|
+
const bar = hz.repeat(Math.max(width - 2, 0));
|
|
111
|
+
|
|
112
|
+
console.log(`\n${COLORS.cyan}${tl}${bar}${tr}${COLORS.reset}`);
|
|
113
|
+
console.log(`${COLORS.cyan}│${COLORS.reset} ${COLORS.bright}${COLORS.cyan}${title}${COLORS.reset}`);
|
|
114
|
+
if (breadcrumb.length > 0) console.log(`${COLORS.cyan}│${COLORS.reset} ${COLORS.dim}${breadcrumb.join(" > ")}${COLORS.reset}`);
|
|
115
|
+
if (subtitle) console.log(`${COLORS.cyan}│${COLORS.reset} ${COLORS.dim}${subtitle}${COLORS.reset}`);
|
|
116
|
+
console.log(`${COLORS.cyan}│${COLORS.reset}`);
|
|
117
|
+
if (headerContent) { console.log(headerContent); }
|
|
118
|
+
|
|
113
119
|
items.forEach((item, index) => {
|
|
114
120
|
const isSelected = index === selectedIndex;
|
|
115
|
-
const icon = isSelected ? (isWin ? ">" : "
|
|
121
|
+
const icon = isSelected ? (isWin ? ">" : "▶") : (isWin ? " " : "○");
|
|
116
122
|
if (isSelected) {
|
|
117
|
-
console.log(
|
|
123
|
+
console.log(`${COLORS.cyan}│${COLORS.reset} ${COLORS.bright}${COLORS.bgBlue}${icon} ${item.label}${COLORS.reset}`);
|
|
118
124
|
} else {
|
|
119
|
-
console.log(
|
|
125
|
+
console.log(`${COLORS.cyan}│${COLORS.reset} ${COLORS.dim}${icon}${COLORS.reset} ${item.label}`);
|
|
120
126
|
}
|
|
121
127
|
});
|
|
128
|
+
console.log(`${COLORS.cyan}${bl}${bar}${br}${COLORS.reset}`);
|
|
122
129
|
};
|
|
123
130
|
|
|
124
131
|
const cleanup = () => {
|