@agent-relay/dashboard-server 2.0.82 → 2.0.84
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/dist/index.d.ts +3 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -23
- package/dist/index.js.map +1 -1
- package/dist/lib/attachment-storage.d.ts +10 -0
- package/dist/lib/attachment-storage.d.ts.map +1 -0
- package/dist/lib/attachment-storage.js +53 -0
- package/dist/lib/attachment-storage.js.map +1 -0
- package/dist/lib/broadcast.d.ts +18 -0
- package/dist/lib/broadcast.d.ts.map +1 -0
- package/dist/lib/broadcast.js +118 -0
- package/dist/lib/broadcast.js.map +1 -0
- package/dist/lib/channel-state.d.ts +32 -0
- package/dist/lib/channel-state.d.ts.map +1 -0
- package/dist/lib/channel-state.js +146 -0
- package/dist/lib/channel-state.js.map +1 -0
- package/dist/lib/cli-auth.d.ts +40 -0
- package/dist/lib/cli-auth.d.ts.map +1 -0
- package/dist/lib/cli-auth.js +144 -0
- package/dist/lib/cli-auth.js.map +1 -0
- package/dist/lib/cloud-persistence.d.ts +6 -0
- package/dist/lib/cloud-persistence.d.ts.map +1 -0
- package/dist/lib/cloud-persistence.js +130 -0
- package/dist/lib/cloud-persistence.js.map +1 -0
- package/dist/lib/data-assembly.d.ts +136 -0
- package/dist/lib/data-assembly.d.ts.map +1 -0
- package/dist/lib/data-assembly.js +550 -0
- package/dist/lib/data-assembly.js.map +1 -0
- package/dist/lib/file-search.d.ts +8 -0
- package/dist/lib/file-search.d.ts.map +1 -0
- package/dist/lib/file-search.js +90 -0
- package/dist/lib/file-search.js.map +1 -0
- package/dist/lib/identity.d.ts +54 -0
- package/dist/lib/identity.d.ts.map +1 -0
- package/dist/lib/identity.js +124 -0
- package/dist/lib/identity.js.map +1 -0
- package/dist/lib/log-line-cleaner.d.ts +20 -0
- package/dist/lib/log-line-cleaner.d.ts.map +1 -0
- package/dist/lib/log-line-cleaner.js +117 -0
- package/dist/lib/log-line-cleaner.js.map +1 -0
- package/dist/lib/log-reader.d.ts +14 -0
- package/dist/lib/log-reader.d.ts.map +1 -0
- package/dist/lib/log-reader.js +80 -0
- package/dist/lib/log-reader.js.map +1 -0
- package/dist/lib/message-id.d.ts +30 -0
- package/dist/lib/message-id.d.ts.map +1 -0
- package/dist/lib/message-id.js +50 -0
- package/dist/lib/message-id.js.map +1 -0
- package/dist/lib/process-metrics.d.ts +11 -0
- package/dist/lib/process-metrics.d.ts.map +1 -0
- package/dist/lib/process-metrics.js +252 -0
- package/dist/lib/process-metrics.js.map +1 -0
- package/dist/lib/proxy-route-table.d.ts +16 -0
- package/dist/lib/proxy-route-table.d.ts.map +1 -0
- package/dist/lib/proxy-route-table.js +73 -0
- package/dist/lib/proxy-route-table.js.map +1 -0
- package/dist/lib/send-strategy.d.ts +61 -0
- package/dist/lib/send-strategy.d.ts.map +1 -0
- package/dist/lib/send-strategy.js +134 -0
- package/dist/lib/send-strategy.js.map +1 -0
- package/dist/lib/server-state.d.ts +115 -0
- package/dist/lib/server-state.d.ts.map +1 -0
- package/dist/lib/server-state.js +138 -0
- package/dist/lib/server-state.js.map +1 -0
- package/dist/lib/spawned-agents.d.ts +35 -0
- package/dist/lib/spawned-agents.d.ts.map +1 -0
- package/dist/lib/spawned-agents.js +323 -0
- package/dist/lib/spawned-agents.js.map +1 -0
- package/dist/lib/types.d.ts +117 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +12 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +71 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +332 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/websocket-runtime.d.ts +17 -0
- package/dist/lib/websocket-runtime.d.ts.map +1 -0
- package/dist/lib/websocket-runtime.js +76 -0
- package/dist/lib/websocket-runtime.js.map +1 -0
- package/dist/mocks/fixtures.d.ts +2 -2
- package/dist/mocks/fixtures.js +1 -1
- package/dist/mocks/routes.d.ts.map +1 -1
- package/dist/mocks/routes.js +30 -3
- package/dist/mocks/routes.js.map +1 -1
- package/dist/mocks/types.d.ts +1 -1
- package/dist/mocks/types.js +1 -1
- package/dist/proxy-server.d.ts +7 -33
- package/dist/proxy-server.d.ts.map +1 -1
- package/dist/proxy-server.js +292 -200
- package/dist/proxy-server.js.map +1 -1
- package/dist/relaycast-provider-helpers.d.ts +40 -0
- package/dist/relaycast-provider-helpers.d.ts.map +1 -0
- package/dist/relaycast-provider-helpers.js +284 -0
- package/dist/relaycast-provider-helpers.js.map +1 -0
- package/dist/relaycast-provider-types.d.ts +116 -0
- package/dist/relaycast-provider-types.d.ts.map +1 -0
- package/dist/relaycast-provider-types.js +6 -0
- package/dist/relaycast-provider-types.js.map +1 -0
- package/dist/relaycast-provider.d.ts +42 -0
- package/dist/relaycast-provider.d.ts.map +1 -0
- package/dist/relaycast-provider.js +277 -0
- package/dist/relaycast-provider.js.map +1 -0
- package/dist/routes/agents.d.ts +7 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +180 -0
- package/dist/routes/agents.js.map +1 -0
- package/dist/routes/auth.d.ts +45 -0
- package/dist/routes/auth.d.ts.map +1 -0
- package/dist/routes/auth.js +261 -0
- package/dist/routes/auth.js.map +1 -0
- package/dist/routes/broker-proxy.d.ts +7 -0
- package/dist/routes/broker-proxy.d.ts.map +1 -0
- package/dist/routes/broker-proxy.js +114 -0
- package/dist/routes/broker-proxy.js.map +1 -0
- package/dist/routes/channels-integrated.d.ts +84 -0
- package/dist/routes/channels-integrated.d.ts.map +1 -0
- package/dist/routes/channels-integrated.js +644 -0
- package/dist/routes/channels-integrated.js.map +1 -0
- package/dist/routes/channels.d.ts +7 -0
- package/dist/routes/channels.d.ts.map +1 -0
- package/dist/routes/channels.js +453 -0
- package/dist/routes/channels.js.map +1 -0
- package/dist/routes/data.d.ts +7 -0
- package/dist/routes/data.d.ts.map +1 -0
- package/dist/routes/data.js +108 -0
- package/dist/routes/data.js.map +1 -0
- package/dist/routes/decisions.d.ts +31 -0
- package/dist/routes/decisions.d.ts.map +1 -0
- package/dist/routes/decisions.js +109 -0
- package/dist/routes/decisions.js.map +1 -0
- package/dist/routes/fleet.d.ts +24 -0
- package/dist/routes/fleet.d.ts.map +1 -0
- package/dist/routes/fleet.js +131 -0
- package/dist/routes/fleet.js.map +1 -0
- package/dist/routes/health.d.ts +7 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +55 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/history-relaycast.d.ts +8 -0
- package/dist/routes/history-relaycast.d.ts.map +1 -0
- package/dist/routes/history-relaycast.js +165 -0
- package/dist/routes/history-relaycast.js.map +1 -0
- package/dist/routes/history.d.ts +13 -0
- package/dist/routes/history.d.ts.map +1 -0
- package/dist/routes/history.js +205 -0
- package/dist/routes/history.js.map +1 -0
- package/dist/routes/messaging.d.ts +31 -0
- package/dist/routes/messaging.d.ts.map +1 -0
- package/dist/routes/messaging.js +182 -0
- package/dist/routes/messaging.js.map +1 -0
- package/dist/routes/metrics.d.ts +26 -0
- package/dist/routes/metrics.d.ts.map +1 -0
- package/dist/routes/metrics.js +276 -0
- package/dist/routes/metrics.js.map +1 -0
- package/dist/routes/reactions.d.ts +9 -0
- package/dist/routes/reactions.d.ts.map +1 -0
- package/dist/routes/reactions.js +76 -0
- package/dist/routes/reactions.js.map +1 -0
- package/dist/routes/relay-config.d.ts +4 -0
- package/dist/routes/relay-config.d.ts.map +1 -0
- package/dist/routes/relay-config.js +50 -0
- package/dist/routes/relay-config.js.map +1 -0
- package/dist/routes/settings.d.ts +6 -0
- package/dist/routes/settings.d.ts.map +1 -0
- package/dist/routes/settings.js +119 -0
- package/dist/routes/settings.js.map +1 -0
- package/dist/routes/spawn.d.ts +74 -0
- package/dist/routes/spawn.d.ts.map +1 -0
- package/dist/routes/spawn.js +520 -0
- package/dist/routes/spawn.js.map +1 -0
- package/dist/routes/system.d.ts +21 -0
- package/dist/routes/system.d.ts.map +1 -0
- package/dist/routes/system.js +186 -0
- package/dist/routes/system.js.map +1 -0
- package/dist/routes/tasks.d.ts +27 -0
- package/dist/routes/tasks.d.ts.map +1 -0
- package/dist/routes/tasks.js +103 -0
- package/dist/routes/tasks.js.map +1 -0
- package/dist/routes/ui.d.ts +6 -0
- package/dist/routes/ui.d.ts.map +1 -0
- package/dist/routes/ui.js +114 -0
- package/dist/routes/ui.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +337 -6072
- package/dist/server.js.map +1 -1
- package/dist/services/broker-spawn-reader.d.ts +40 -0
- package/dist/services/broker-spawn-reader.d.ts.map +1 -0
- package/dist/services/broker-spawn-reader.js +155 -0
- package/dist/services/broker-spawn-reader.js.map +1 -0
- package/dist/services/health-worker-manager.d.ts +9 -60
- package/dist/services/health-worker-manager.d.ts.map +1 -1
- package/dist/services/health-worker-manager.js +18 -148
- package/dist/services/health-worker-manager.js.map +1 -1
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +3 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/metrics.d.ts +11 -104
- package/dist/services/metrics.d.ts.map +1 -1
- package/dist/services/metrics.js +21 -190
- package/dist/services/metrics.js.map +1 -1
- package/dist/services/needs-attention.d.ts +21 -22
- package/dist/services/needs-attention.d.ts.map +1 -1
- package/dist/services/needs-attention.js +46 -71
- package/dist/services/needs-attention.js.map +1 -1
- package/dist/services/user-bridge.d.ts +0 -3
- package/dist/services/user-bridge.d.ts.map +1 -1
- package/dist/services/user-bridge.js +0 -5
- package/dist/services/user-bridge.js.map +1 -1
- package/dist/start.d.ts +4 -4
- package/dist/start.js +96 -89
- package/dist/start.js.map +1 -1
- package/dist/types/index.d.ts +13 -16
- package/dist/types/index.d.ts.map +1 -1
- package/dist/websocket/bridge.d.ts +12 -0
- package/dist/websocket/bridge.d.ts.map +1 -0
- package/dist/websocket/bridge.js +33 -0
- package/dist/websocket/bridge.js.map +1 -0
- package/dist/websocket/logs.d.ts +30 -0
- package/dist/websocket/logs.d.ts.map +1 -0
- package/dist/websocket/logs.js +577 -0
- package/dist/websocket/logs.js.map +1 -0
- package/dist/websocket/main.d.ts +15 -0
- package/dist/websocket/main.d.ts.map +1 -0
- package/dist/websocket/main.js +84 -0
- package/dist/websocket/main.js.map +1 -0
- package/dist/websocket/mock.d.ts +6 -0
- package/dist/websocket/mock.d.ts.map +1 -0
- package/dist/websocket/mock.js +49 -0
- package/dist/websocket/mock.js.map +1 -0
- package/dist/websocket/presence.d.ts +74 -0
- package/dist/websocket/presence.d.ts.map +1 -0
- package/dist/websocket/presence.js +330 -0
- package/dist/websocket/presence.js.map +1 -0
- package/dist/websocket/proxy.d.ts +6 -0
- package/dist/websocket/proxy.d.ts.map +1 -0
- package/dist/websocket/proxy.js +39 -0
- package/dist/websocket/proxy.js.map +1 -0
- package/dist/websocket/standalone.d.ts +17 -0
- package/dist/websocket/standalone.d.ts.map +1 -0
- package/dist/websocket/standalone.js +268 -0
- package/dist/websocket/standalone.js.map +1 -0
- package/out/404.html +1 -1
- package/out/_next/static/chunks/1028-da5d75e35d1420f1.js +1 -0
- package/out/_next/static/chunks/1528-78b17000a7e10bc6.js +2 -0
- package/out/_next/static/chunks/1695-4a5d33ba715e09b4.js +1 -0
- package/out/_next/static/chunks/1705-36c2180d00a4a569.js +1 -0
- package/out/_next/static/chunks/1dd3208c-e1f87c7b3dc1a820.js +1 -0
- package/out/_next/static/chunks/3663-47290254b8f6f5dd.js +1 -0
- package/out/_next/static/chunks/3677-4b225baf4801d9b9.js +73 -0
- package/out/_next/static/chunks/5118-7e8ada2df38eef07.js +1 -0
- package/out/_next/static/chunks/5888-15cbe97c90ed5fae.js +1 -0
- package/out/_next/static/chunks/6773-a45343a98df3abb5.js +1 -0
- package/out/_next/static/chunks/6940-b824612b605e79b3.js +9 -0
- package/out/_next/static/chunks/7894-f4a15249082a680d.js +1 -0
- package/out/_next/static/chunks/9175-b3617c1e5cbfed0e.js +1 -0
- package/out/_next/static/chunks/9372-1a804b8d08c7a236.js +1 -0
- package/out/_next/static/chunks/{ab6c8a12-0a58072fbb505134.js → ab6c8a12-91438a812d94ecf0.js} +1 -1
- package/out/_next/static/chunks/app/_not-found/page-8e8842f82d204726.js +1 -0
- package/out/_next/static/chunks/app/about/page-b78577a7da8fa459.js +1 -0
- package/out/_next/static/chunks/app/app/[[...slug]]/page-3dffd65b6344f53e.js +1 -0
- package/out/_next/static/chunks/app/app/onboarding/page-b89be9aa6264a5e1.js +1 -0
- package/out/_next/static/chunks/app/blog/go-to-bed-wake-up-to-a-finished-product/page-fbd00893ef69e499.js +1 -0
- package/out/_next/static/chunks/app/blog/let-them-cook-multi-agent-orchestration/page-de2ea13649d0b6d3.js +1 -0
- package/out/_next/static/chunks/app/blog/page-a08e263c57a156fa.js +1 -0
- package/out/_next/static/chunks/app/careers/page-02228e1d6969b232.js +1 -0
- package/out/_next/static/chunks/app/changelog/page-1b5c1d79efc6e53a.js +1 -0
- package/out/_next/static/chunks/app/cloud/link/page-99654edffffb3af2.js +1 -0
- package/out/_next/static/chunks/app/complete-profile/page-59d146e5ddeafc5c.js +1 -0
- package/out/_next/static/chunks/app/connect-repos/page-995e16a976a6632c.js +1 -0
- package/out/_next/static/chunks/app/contact/page-273396a5ad57bcee.js +1 -0
- package/out/_next/static/chunks/app/dev/cli-tools/page-a71b80dcb2d5fc8d.js +1 -0
- package/out/_next/static/chunks/app/dev/log-viewer/page-46a6151ae1be0796.js +1 -0
- package/out/_next/static/chunks/app/docs/page-7c7cb603b24b7c40.js +1 -0
- package/out/_next/static/chunks/app/history/page-0c5cab1dab4e8886.js +1 -0
- package/out/_next/static/chunks/app/layout-96d72ba8ef8a43a0.js +1 -0
- package/out/_next/static/chunks/app/login/page-0ccbab34213df842.js +1 -0
- package/out/_next/static/chunks/app/metrics/page-8616272aeab9c8b0.js +1 -0
- package/out/_next/static/chunks/app/page-09ce10603ad9a251.js +1 -0
- package/out/_next/static/chunks/app/pricing/page-91c975079120c941.js +1 -0
- package/out/_next/static/chunks/app/privacy/{page-c21d51ac2dee3a88.js → page-a49ab271cc686644.js} +1 -1
- package/out/_next/static/chunks/app/providers/{page-59114505f4353512.js → page-d775d6eb5bc29e96.js} +1 -1
- package/out/_next/static/chunks/app/providers/setup/[provider]/page-ec4ef3cd80de807e.js +1 -0
- package/out/_next/static/chunks/app/security/page-d9da9bd9191e8f95.js +1 -0
- package/out/_next/static/chunks/app/signup/page-930eca0bf5fd299d.js +1 -0
- package/out/_next/static/chunks/app/terms/page-3e4827620b98613c.js +1 -0
- package/out/_next/static/chunks/framework-648e1ae7da590300.js +1 -0
- package/out/_next/static/chunks/{main-acb1b24265295d6a.js → main-2b1990080c292d92.js} +1 -1
- package/out/_next/static/chunks/main-app-9f6b7ff9e754a8f5.js +1 -0
- package/out/_next/static/chunks/pages/_app-a077b72e02273ab1.js +1 -0
- package/out/_next/static/chunks/pages/_error-84001666436a04e4.js +1 -0
- package/out/_next/static/chunks/{webpack-dd93b81e2659669c.js → webpack-7586035f1585f2db.js} +1 -1
- package/out/_next/static/css/eb9fc69d1e3d2bed.css +1 -0
- package/out/_next/static/{IxfA6RZu4trcsEMYlkQra → g3G0LMdB7lxcrU5mdM54m}/_buildManifest.js +1 -1
- package/out/about.html +2 -2
- package/out/about.txt +2 -2
- package/out/app/onboarding.html +1 -1
- package/out/app/onboarding.txt +2 -2
- package/out/app.html +1 -1
- package/out/app.txt +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +3 -3
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.html +2 -2
- package/out/blog/let-them-cook-multi-agent-orchestration.txt +2 -2
- package/out/blog.html +2 -2
- package/out/blog.txt +1 -1
- package/out/careers.html +2 -2
- package/out/careers.txt +2 -2
- package/out/changelog.html +2 -2
- package/out/changelog.txt +2 -2
- package/out/cloud/link.html +1 -1
- package/out/cloud/link.txt +2 -2
- package/out/complete-profile.html +2 -2
- package/out/complete-profile.txt +2 -2
- package/out/connect-repos.html +1 -1
- package/out/connect-repos.txt +2 -2
- package/out/contact.html +2 -2
- package/out/contact.txt +2 -2
- package/out/dev/cli-tools.html +1 -0
- package/out/dev/cli-tools.txt +7 -0
- package/out/dev/log-viewer.html +23 -0
- package/out/dev/log-viewer.txt +7 -0
- package/out/docs.html +2 -2
- package/out/docs.txt +2 -2
- package/out/history.html +1 -1
- package/out/history.txt +2 -2
- package/out/index.html +1 -1
- package/out/index.txt +2 -2
- package/out/login.html +2 -2
- package/out/login.txt +2 -2
- package/out/metrics.html +1 -1
- package/out/metrics.txt +2 -2
- package/out/pricing.html +2 -2
- package/out/pricing.txt +2 -2
- package/out/privacy.html +2 -2
- package/out/privacy.txt +2 -2
- package/out/providers/setup/claude.html +1 -1
- package/out/providers/setup/claude.txt +2 -2
- package/out/providers/setup/codex.html +1 -1
- package/out/providers/setup/codex.txt +2 -2
- package/out/providers/setup/cursor.html +1 -1
- package/out/providers/setup/cursor.txt +2 -2
- package/out/providers.html +1 -1
- package/out/providers.txt +2 -2
- package/out/security.html +2 -2
- package/out/security.txt +2 -2
- package/out/signup.html +2 -2
- package/out/signup.txt +2 -2
- package/out/terms.html +2 -2
- package/out/terms.txt +2 -2
- package/package.json +10 -11
- package/out/_next/static/chunks/11-9a2993a37266dcb3.js +0 -9
- package/out/_next/static/chunks/118-ae2b650136a5a5fc.js +0 -1
- package/out/_next/static/chunks/1dd3208c-40ab0fc0f60392b8.js +0 -1
- package/out/_next/static/chunks/202-fc0763dd7488e58f.js +0 -1
- package/out/_next/static/chunks/259-83b77fa1b91ba5aa.js +0 -1
- package/out/_next/static/chunks/407-0c82986cf79c8ecb.js +0 -1
- package/out/_next/static/chunks/528-f5f676996d613c25.js +0 -2
- package/out/_next/static/chunks/663-ddb04081febc3678.js +0 -1
- package/out/_next/static/chunks/687-88b6b139a6bb0e2e.js +0 -1
- package/out/_next/static/chunks/695-51d25b1988644374.js +0 -1
- package/out/_next/static/chunks/773-54a2641043c81e55.js +0 -1
- package/out/_next/static/chunks/app/_not-found/page-6da9b72091e5b511.js +0 -1
- package/out/_next/static/chunks/app/about/page-fff7c6457683f243.js +0 -1
- package/out/_next/static/chunks/app/app/[[...slug]]/page-f7eca1b66fb4249b.js +0 -1
- package/out/_next/static/chunks/app/app/onboarding/page-129abc5da2e67971.js +0 -1
- package/out/_next/static/chunks/app/blog/go-to-bed-wake-up-to-a-finished-product/page-5d5f28fd126b692f.js +0 -1
- package/out/_next/static/chunks/app/blog/let-them-cook-multi-agent-orchestration/page-b194f207fbd91862.js +0 -1
- package/out/_next/static/chunks/app/blog/page-b9bd9d8703fca76a.js +0 -1
- package/out/_next/static/chunks/app/careers/page-a4bd8d5f4de8f4eb.js +0 -1
- package/out/_next/static/chunks/app/changelog/page-9a1f6ad1743d63c5.js +0 -1
- package/out/_next/static/chunks/app/cloud/link/page-0844c5699b027c3b.js +0 -1
- package/out/_next/static/chunks/app/complete-profile/page-39ed5a67916beb87.js +0 -1
- package/out/_next/static/chunks/app/connect-repos/page-297eddee0c39f2a3.js +0 -1
- package/out/_next/static/chunks/app/contact/page-3c1dd8690217fade.js +0 -1
- package/out/_next/static/chunks/app/docs/page-1875e981f2c3fd13.js +0 -1
- package/out/_next/static/chunks/app/history/page-2d5c5695c9e8b40c.js +0 -1
- package/out/_next/static/chunks/app/layout-0a4b99656da25511.js +0 -1
- package/out/_next/static/chunks/app/login/page-f69c076f5a6fc520.js +0 -1
- package/out/_next/static/chunks/app/metrics/page-bebbee055669a17e.js +0 -1
- package/out/_next/static/chunks/app/page-0ee604f7070d14c0.js +0 -1
- package/out/_next/static/chunks/app/pricing/page-eeae7d594af333b6.js +0 -1
- package/out/_next/static/chunks/app/providers/setup/[provider]/page-daf9b3e05e77ae19.js +0 -1
- package/out/_next/static/chunks/app/security/page-cd562730fe84a0a2.js +0 -1
- package/out/_next/static/chunks/app/signup/page-c242ca08101a84ff.js +0 -1
- package/out/_next/static/chunks/app/terms/page-c7001720e7941dc6.js +0 -1
- package/out/_next/static/chunks/framework-3664cab31236a9fa.js +0 -1
- package/out/_next/static/chunks/main-app-7f73a939a312a228.js +0 -1
- package/out/_next/static/chunks/pages/_app-10a93ab5b7c32eb3.js +0 -1
- package/out/_next/static/chunks/pages/_error-2d792b2a41857be4.js +0 -1
- package/out/_next/static/css/8968d98ed4c4d33f.css +0 -1
- /package/out/_next/static/{IxfA6RZu4trcsEMYlkQra → g3G0LMdB7lxcrU5mdM54m}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2363],{7756:function(e,a,t){Promise.resolve().then(t.bind(t,7343))},7343:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return x}});var c=t(7573),s=t(3146),r=t.n(s),n=t(7653),l=t(1695),d=t(5118);function o(){return(0,c.jsx)("div",{className:"relative min-h-screen flex items-center justify-center p-8 bg-bg-deep overflow-hidden",children:(0,c.jsxs)("div",{className:"bg-gradient-to-br from-bg-secondary to-bg-primary border border-accent-cyan/15 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:[(0,c.jsx)("div",{className:"w-12 h-12 mx-auto mb-6 border-3 border-accent-cyan/20 border-t-accent-cyan rounded-full animate-spin"}),(0,c.jsx)("p",{className:"text-center text-text-secondary",children:"Loading..."})]})})}function i(){var e;let a=(0,l.useSearchParams)(),[t,s]=(0,n.useState)("loading"),[o,i]=(0,n.useState)(null),[x,f]=(0,n.useState)(null),[b,m]=(0,n.useState)(""),[p,u]=(0,n.useState)(!1),[h,y]=(0,n.useState)([]),[j,g]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=a.get("code"),t=a.get("machine"),c=a.get("name");if(!e||!t||!c){s("error"),m("Invalid link URL. Please run agent-relay cloud link again.");return}i({code:e,machineId:t,machineName:c}),w()},[a]);let w=async()=>{try{var e,a;let t=await d.api.get("/api/auth/session");if(t.authenticated&&(null===(e=t.user)||void 0===e?void 0:e.id)){let e=await d.api.get("/api/workspaces");y(e.workspaces||[]),(null===(a=e.workspaces)||void 0===a?void 0:a.length)===1&&g(e.workspaces[0].id),s("ready")}else s("auth-required")}catch(e){console.error("Auth check failed:",e),s("auth-required")}},k=async()=>{if(o){if(h.length>0&&!j){m("Please select a workspace");return}s("linking"),m("");try{let e={machineId:o.machineId,name:o.machineName,workspaceId:j,metadata:{linkedVia:"cli",userAgent:navigator.userAgent}},a=await d.api.post("/api/brokers/link",e);f({apiKey:a.apiKey,brokerId:a.brokerId,workspaceId:a.workspaceId}),s("success")}catch(a){console.error("Link failed:",a);let e=(null==a?void 0:a.message)||"Failed to link machine. Please try again.";"string"==typeof e&&e.includes("HTTP 404")?m("BREAKING CHANGE: daemon link endpoints were removed. Cloud API must expose POST /api/brokers/link."):m(e),s("error")}}},N=(0,n.useCallback)(async()=>{if(null==x?void 0:x.apiKey)try{await navigator.clipboard.writeText(x.apiKey),u(!0),setTimeout(()=>u(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[null==x?void 0:x.apiKey]);return(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf relative min-h-screen flex items-center justify-center p-8 bg-bg-deep overflow-hidden",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf fixed inset-0 pointer-events-none",children:[(0,c.jsx)("div",{style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px)",backgroundSize:"80px 80px",maskImage:"radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 80%)",animation:"grid-drift 20s linear infinite"},className:"jsx-9cb8c5914f4e0cdf absolute inset-0 opacity-30"}),(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-accent-cyan/10 rounded-full blur-3xl animate-pulse-glow"}),(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf absolute inset-0",children:[...Array(20)].map((e,a)=>(0,c.jsx)("div",{style:{left:"".concat(100*Math.random(),"%"),top:"".concat(100*Math.random(),"%"),animation:"particle-float ".concat(3+4*Math.random(),"s ease-in-out infinite"),animationDelay:"".concat(5*Math.random(),"s")},className:"jsx-9cb8c5914f4e0cdf absolute w-0.5 h-0.5 bg-accent-cyan rounded-full shadow-glow-cyan opacity-0"},a))})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf relative z-10 w-full max-width-[600px] animate-slide-up",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf text-center mb-12",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf inline-flex mb-6 text-accent-cyan animate-pulse",children:(0,c.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",className:"jsx-9cb8c5914f4e0cdf drop-shadow-glow-cyan",children:[(0,c.jsx)("path",{d:"M16 4L28 11V21L16 28L4 21V11L16 4Z",stroke:"currentColor",strokeWidth:"2",className:"jsx-9cb8c5914f4e0cdf"}),(0,c.jsx)("circle",{cx:"16",cy:"16",r:"4",fill:"currentColor",className:"jsx-9cb8c5914f4e0cdf"})]})}),(0,c.jsx)("h1",{className:"jsx-9cb8c5914f4e0cdf font-display text-4xl font-bold mb-3 bg-gradient-to-r from-text-primary to-accent-cyan bg-clip-text text-transparent",children:"Link Machine"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-xl text-text-secondary",children:"Connect this machine to Agent Relay Cloud"})]}),"loading"===t&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-bg-primary border border-accent-cyan/15 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf w-12 h-12 mx-auto mb-6 border-3 border-accent-cyan/20 border-t-accent-cyan rounded-full animate-spin"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-center text-text-secondary",children:"Verifying session..."})]}),"auth-required"===t&&(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-bg-primary border border-accent-cyan/15 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf text-center",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf text-5xl mb-6 animate-bounce",children:"\uD83D\uDD10"}),(0,c.jsx)("h2",{className:"jsx-9cb8c5914f4e0cdf font-display text-2xl font-semibold mb-4 text-text-primary",children:"Authentication Required"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-text-secondary mb-8 leading-relaxed",children:"Sign in to link this machine to your Agent Relay account."}),(0,c.jsx)("button",{onClick:()=>{let e=window.location.href;window.location.href="/login?return=".concat(encodeURIComponent(e))},className:"jsx-9cb8c5914f4e0cdf w-full flex items-center justify-center gap-3 px-8 py-4 bg-gradient-to-r from-accent-cyan to-accent-cyan/80 hover:from-accent-cyan/90 hover:to-accent-cyan/70 text-text-inverse font-display font-semibold text-lg rounded-xl shadow-glow-cyan transition-all duration-200 hover:-translate-y-0.5 hover:shadow-xl",children:"Sign In with GitHub"})]})}),"ready"===t&&o&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-bg-primary border border-accent-cyan/15 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-black/30 border border-border-subtle rounded-xl p-6 mb-8",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf flex justify-between items-center py-3 border-b border-border-subtle",children:[(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf text-sm font-medium text-text-secondary",children:"Machine Name"}),(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf text-base font-medium text-text-primary",children:o.machineName})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf flex justify-between items-center pt-3",children:[(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf text-sm font-medium text-text-secondary",children:"Machine ID"}),(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf font-mono text-sm text-accent-cyan",children:o.machineId})]})]}),h.length>0&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf mb-8",children:[(0,c.jsx)("label",{className:"jsx-9cb8c5914f4e0cdf block text-sm font-medium text-text-secondary mb-3",children:"Select Workspace"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-sm text-text-muted mb-4",children:"Local agents from this machine will appear in the selected workspace's dashboard."}),(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf space-y-2",children:h.map(e=>(0,c.jsxs)("button",{onClick:()=>g(e.id),className:"jsx-9cb8c5914f4e0cdf "+"w-full flex items-center gap-3 p-4 rounded-xl border transition-all ".concat(j===e.id?"bg-accent-cyan/10 border-accent-cyan/50 shadow-glow-cyan":"bg-black/20 border-border-subtle hover:border-accent-cyan/30"),children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf "+"w-3 h-3 rounded-full ".concat("running"===e.status?"bg-success":"bg-gray-500")}),(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf text-text-primary font-medium",children:e.name}),j===e.id&&(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf ml-auto text-accent-cyan",children:"✓"})]},e.id))}),b&&!b.includes("Failed")&&(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf mt-2 text-sm text-error",children:b})]}),0===h.length&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf flex gap-4 bg-accent-cyan/8 border border-accent-cyan/20 rounded-xl p-5 mb-8",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf text-2xl flex-shrink-0",children:"\uD83D\uDCC1"}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf",children:[(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-text-primary text-[15px] leading-relaxed mb-2",children:"No workspaces found. Create a workspace first to link this machine."}),(0,c.jsx)("a",{href:"/app",className:"jsx-9cb8c5914f4e0cdf text-accent-cyan hover:underline text-sm",children:"Go to Dashboard →"})]})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf flex gap-4 bg-warning/8 border border-warning/20 rounded-xl p-5 mb-8",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf text-2xl flex-shrink-0 animate-kill-pulse",children:"⚠️"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-text-primary text-[15px] leading-relaxed",children:"This will generate an API key that grants full access to your Agent Relay account. Keep it secure and never share it publicly."})]}),(0,c.jsxs)("button",{onClick:k,disabled:0===h.length,className:"jsx-9cb8c5914f4e0cdf "+"w-full flex items-center justify-center gap-3 px-8 py-4 font-display font-semibold text-lg rounded-xl transition-all duration-200 ".concat(0===h.length?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-gradient-to-r from-accent-cyan to-success hover:from-accent-cyan/90 hover:to-success/90 text-text-inverse shadow-glow-cyan hover:-translate-y-0.5 hover:shadow-2xl animate-pulse-glow"),children:[(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf text-xl",children:"\uD83D\uDD17"}),(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf",children:"Link This Machine"})]})]}),"linking"===t&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-bg-primary border border-accent-cyan/15 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf relative w-30 h-30 mx-auto mb-8",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf absolute inset-0 border-3 border-accent-cyan rounded-full animate-ping opacity-75"}),(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf absolute inset-10 bg-accent-cyan rounded-full shadow-glow-cyan animate-pulse"})]}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-center text-lg text-text-secondary",children:"Generating API key..."})]}),"success"===t&&x&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-success/5 border border-success/30 rounded-2xl p-12 shadow-xl backdrop-blur-xl",children:[(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf text-center mb-10",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf inline-flex items-center justify-center w-16 h-16 mb-6 bg-gradient-to-r from-success to-accent-cyan text-text-inverse text-3xl font-bold rounded-full shadow-glow-green animate-bounce",children:"✓"}),(0,c.jsx)("h2",{className:"jsx-9cb8c5914f4e0cdf font-display text-2xl font-semibold mb-3 text-text-primary",children:"Machine Linked Successfully"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-text-secondary",children:"Copy this API key and paste it into your terminal"}),x.workspaceId&&(0,c.jsxs)("p",{className:"jsx-9cb8c5914f4e0cdf mt-2 text-sm text-accent-cyan",children:["Linked to workspace: ",(null===(e=h.find(e=>e.id===x.workspaceId))||void 0===e?void 0:e.name)||"Unknown"]})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf mb-10",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf font-mono text-xs font-semibold uppercase tracking-wide text-accent-cyan mb-3",children:"API Key"}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf relative flex items-center gap-4 bg-black/50 border-2 border-accent-cyan/30 rounded-xl p-5 shadow-glow-cyan",children:[(0,c.jsx)("code",{className:"jsx-9cb8c5914f4e0cdf flex-1 font-mono text-[15px] text-success break-all select-all drop-shadow-glow-green",children:x.apiKey}),(0,c.jsx)("button",{onClick:N,title:"Copy to clipboard",className:"jsx-9cb8c5914f4e0cdf "+"flex-shrink-0 w-11 h-11 flex items-center justify-center rounded-lg text-xl transition-all duration-200 ".concat(p?"bg-success/20 border border-success/50 text-success":"bg-accent-cyan/15 border border-accent-cyan/30 text-accent-cyan hover:bg-accent-cyan/25 hover:border-accent-cyan/50 hover:scale-105"),children:p?"✓":"\uD83D\uDCCB"})]})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-black/30 border border-border-subtle rounded-xl p-6 mb-6",children:[(0,c.jsx)("h3",{className:"jsx-9cb8c5914f4e0cdf font-display text-lg font-semibold mb-4 text-text-primary",children:"Next Steps:"}),(0,c.jsxs)("ol",{className:"jsx-9cb8c5914f4e0cdf space-y-2 text-text-secondary leading-relaxed pl-5",children:[(0,c.jsx)("li",{className:"jsx-9cb8c5914f4e0cdf",children:"Copy the API key above"}),(0,c.jsx)("li",{className:"jsx-9cb8c5914f4e0cdf",children:"Return to your terminal"}),(0,c.jsx)("li",{className:"jsx-9cb8c5914f4e0cdf",children:"Paste the key when prompted"}),(0,c.jsx)("li",{className:"jsx-9cb8c5914f4e0cdf",children:"Your machine is now linked to Agent Relay Cloud"})]})]}),(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf p-5 bg-warning/8 border border-warning/20 rounded-xl text-text-primary text-[15px] leading-relaxed",children:[(0,c.jsx)("strong",{className:"jsx-9cb8c5914f4e0cdf text-warning font-semibold",children:"Important:"})," This key will only be shown once. Store it securely if you need it later. You can regenerate a new key by running"," ",(0,c.jsx)("code",{className:"jsx-9cb8c5914f4e0cdf font-mono text-sm px-1.5 py-0.5 bg-black/30 rounded text-accent-cyan",children:"agent-relay cloud link"})," ","again."]})]}),"error"===t&&(0,c.jsxs)("div",{className:"jsx-9cb8c5914f4e0cdf bg-gradient-to-br from-bg-secondary to-error/5 border border-error/30 rounded-2xl p-12 shadow-xl backdrop-blur-xl text-center",children:[(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf inline-flex items-center justify-center w-16 h-16 mb-6 bg-error/15 text-error text-3xl font-bold rounded-full border-2 border-error/30",children:"✕"}),(0,c.jsx)("h2",{className:"jsx-9cb8c5914f4e0cdf font-display text-2xl font-semibold mb-4 text-text-primary",children:"Link Failed"}),(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf text-error mb-8 leading-relaxed",children:b}),(0,c.jsx)("button",{onClick:()=>window.location.reload(),className:"jsx-9cb8c5914f4e0cdf w-full px-8 py-4 bg-bg-hover hover:bg-bg-active border border-border-light hover:border-border-medium text-text-primary font-display font-semibold text-lg rounded-xl transition-all duration-200",children:"Try Again"})]}),(0,c.jsx)("div",{className:"jsx-9cb8c5914f4e0cdf mt-8 text-center",children:(0,c.jsxs)("a",{href:"/app",className:"jsx-9cb8c5914f4e0cdf inline-flex items-center gap-2 text-text-secondary hover:text-accent-cyan transition-colors duration-200",children:[(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf",children:"←"}),(0,c.jsx)("span",{className:"jsx-9cb8c5914f4e0cdf",children:"Back to Dashboard"})]})})]}),(0,c.jsx)(r(),{id:"9cb8c5914f4e0cdf",children:"@-webkit-keyframes grid-drift{0%{-webkit-transform:translate(0,0);transform:translate(0,0)}100%{-webkit-transform:translate(80px,80px);transform:translate(80px,80px)}}@-moz-keyframes grid-drift{0%{-moz-transform:translate(0,0);transform:translate(0,0)}100%{-moz-transform:translate(80px,80px);transform:translate(80px,80px)}}@-o-keyframes grid-drift{0%{-o-transform:translate(0,0);transform:translate(0,0)}100%{-o-transform:translate(80px,80px);transform:translate(80px,80px)}}@keyframes grid-drift{0%{-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}100%{-webkit-transform:translate(80px,80px);-moz-transform:translate(80px,80px);-o-transform:translate(80px,80px);transform:translate(80px,80px)}}@-webkit-keyframes particle-float{0%{opacity:0;-webkit-transform:translatey(0);transform:translatey(0)}10%{opacity:.6}90%{opacity:.6}100%{opacity:0;-webkit-transform:translatey(-100px);transform:translatey(-100px)}}@-moz-keyframes particle-float{0%{opacity:0;-moz-transform:translatey(0);transform:translatey(0)}10%{opacity:.6}90%{opacity:.6}100%{opacity:0;-moz-transform:translatey(-100px);transform:translatey(-100px)}}@-o-keyframes particle-float{0%{opacity:0;-o-transform:translatey(0);transform:translatey(0)}10%{opacity:.6}90%{opacity:.6}100%{opacity:0;-o-transform:translatey(-100px);transform:translatey(-100px)}}@keyframes particle-float{0%{opacity:0;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}10%{opacity:.6}90%{opacity:.6}100%{opacity:0;-webkit-transform:translatey(-100px);-moz-transform:translatey(-100px);-o-transform:translatey(-100px);transform:translatey(-100px)}}"})]})}function x(){return(0,c.jsx)(n.Suspense,{fallback:(0,c.jsx)(o,{}),children:(0,c.jsx)(i,{})})}}},function(e){e.O(0,[6773,5118,1293,1528,1744],function(){return e(e.s=7756)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9593],{725:function(e,t,s){Promise.resolve().then(s.bind(s,7597))},7597:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return i}});var a=s(7573),r=s(7653),n=s(5634);function i(){let[e,t]=(0,r.useState)(""),[s,i]=(0,r.useState)(!0),[l,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[u,x]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{var e;let t=await fetch("/api/auth/me",{credentials:"include"});if(!t.ok){window.location.href="/login";return}let s=await t.json();if(null===(e=s.user)||void 0===e?void 0:e.email){window.location.href="/app";return}x(s.user),i(!1)}catch(e){console.error("Error checking session:",e),window.location.href="/login"}})()},[]);let m=async t=>{t.preventDefault(),d(""),o(!0);try{let t=(await fetch("/api/auth/session",{credentials:"include"})).headers.get("x-csrf-token"),s=await fetch("/api/auth/email/set-email",{method:"POST",headers:{"Content-Type":"application/json",...t&&{"x-csrf-token":t}},credentials:"include",body:JSON.stringify({email:e})}),a=await s.json();if(!s.ok){d(a.error||"Failed to set email"),o(!1);return}window.location.href="/app"}catch(e){console.error("Error setting email:",e),d("Failed to connect. Please try again."),o(!1)}};return s?(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:(0,a.jsx)("div",{className:"relative z-10 w-full max-w-md",children:(0,a.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,a.jsx)(n.K7,{size:48,withGlow:!0}),(0,a.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Agent Relay"}),(0,a.jsx)("p",{className:"mt-2 text-text-muted",children:"Loading..."})]})})}):(0,a.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"fixed inset-0 opacity-10",children:(0,a.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,a.jsx)(n.K7,{size:48,withGlow:!0}),(0,a.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Almost there!"}),(0,a.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Please provide your email to complete your account setup"})]}),(0,a.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:[u&&(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-6 pb-6 border-b border-border-subtle",children:[u.avatarUrl?(0,a.jsx)("img",{src:u.avatarUrl,alt:u.githubUsername||"User",className:"w-12 h-12 rounded-full"}):(0,a.jsx)("div",{className:"w-12 h-12 rounded-full bg-bg-secondary flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-text-muted",fill:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-white",children:u.githubUsername}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Connected via GitHub"})]})]}),c&&(0,a.jsx)("div",{className:"mb-4 p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,a.jsx)("p",{className:"text-error text-sm",children:c})}),(0,a.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-text-secondary mb-2",children:"Email Address"}),(0,a.jsx)("input",{type:"email",id:"email",value:e,onChange:e=>t(e.target.value),required:!0,disabled:l,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"you@example.com"}),(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"We'll use this email to notify you about important updates and account activity."})]}),(0,a.jsx)("button",{type:"submit",disabled:l||!e,className:"w-full py-4 px-6 bg-accent-cyan hover:bg-accent-cyan/90 rounded-xl text-black font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,a.jsx)("span",{children:"Saving..."})]}):(0,a.jsx)("span",{children:"Continue"})})]})]})]})]})}},5634:function(e,t,s){"use strict";s.d(t,{K7:function(){return r}});var a=s(7573);function r(e){let{size:t=24,className:s="",withGlow:r=!1}=e;return(0,a.jsxs)("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"\n transition-all duration-300\n ".concat(r?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(s,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,a.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,a.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,a.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,a.jsx)("path",{d:"M50 20 C 80 20 80 50 50 50 L 80 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:"0.7"})]})}s(7653)}},function(e){e.O(0,[1293,1528,1744],function(){return e(e.s=725)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6070],{7271:function(e,t,s){Promise.resolve().then(s.bind(s,8232))},8232:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return a}});var n=s(7573),r=s(7653),i=s(5888),o=s(5634);function a(){let[e,t]=(0,r.useState)("checking"),[s,a]=(0,r.useState)(null),[l,c]=(0,r.useState)([]),[d,x]=(0,r.useState)(null),[h,u]=(0,r.useState)(""),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/auth/session",{credentials:"include"});if(!(await s.json()).authenticated){window.location.href="/login";return}if(!e)return;let n=await fetch("/api/auth/nango/repo-session",{credentials:"include"}),r=await n.json();if(!e)return;if(!n.ok||!r.sessionToken){if((null==r?void 0:r.sessionExpired)||(null==r?void 0:r.code)==="SESSION_EXPIRED"){window.location.href="/login";return}a("Failed to initialize. Please refresh the page."),t("error");return}m.current=new i.ZP({connectSessionToken:r.sessionToken}),t("ready")}catch(t){e&&(window.location.href="/login")}})(),()=>{e=!1}},[]);let p=async e=>{let t=await fetch("/api/auth/nango/repo-status/".concat(e),{credentials:"include"});if(!t.ok)throw Error("Status not ready");return t.json()},f=async e=>{try{t("polling"),u("Syncing repositories...");let s=Date.now(),n=async()=>{if(Date.now()-s>3e5)throw Error("Connection timed out. Please try again.");try{let s=await p(e);if(s.pendingApproval){t("pending-approval"),x(s.message||"Waiting for organization admin approval");return}if(s.ready&&s.repos){c(s.repos),t("success");return}return await new Promise(e=>setTimeout(e,2e3)),n()}catch(e){return await new Promise(e=>setTimeout(e,2e3)),n()}};await n()}catch(e){console.error("[AUTH] Error:",e),a(e instanceof Error?e.message:"Connection failed"),t("error"),u("")}},g=async()=>{if(!m.current){a("Not ready. Please refresh the page.");return}t("connecting"),a(null),u("Connecting to GitHub...");try{let e=await m.current.auth("github-app-oauth");if(e&&"connectionId"in e)await f(e.connectionId);else throw Error("No connection ID returned")}catch(o){var e,s;console.error("GitHub App auth error:",o);let n="user_cancelled"===o.type||(null===(e=o.message)||void 0===e?void 0:e.includes("closed")),r=null===(s=o.message)||void 0===s?void 0:s.includes("invalid_oauth_state");if(n||r){u(""),r&&a("Session expired. Click Connect to try again."),fetch("/api/auth/nango/repo-session",{credentials:"include"}).then(e=>e.json()).then(e=>{e.sessionToken&&(m.current=new i.ZP({connectSessionToken:e.sessionToken}),t("ready"))});return}a(o.message||"Connection failed"),t("error"),u("")}},b=async()=>{a(null),c([]),x(null),u(""),t("checking");try{let e=await fetch("/api/auth/nango/repo-session",{credentials:"include"}),s=await e.json();if(!e.ok||!s.sessionToken){if((null==s?void 0:s.sessionExpired)||(null==s?void 0:s.code)==="SESSION_EXPIRED"){window.location.href="/login";return}a("Failed to initialize. Please refresh the page."),t("error");return}m.current=new i.ZP({connectSessionToken:s.sessionToken}),t("ready")}catch(e){a("Failed to initialize. Please refresh the page."),t("error")}},j=()=>{window.location.href="/app"};if("checking"===e)return(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading..."})]})});let w="connecting"===e||"polling"===e;return(0,n.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 opacity-10",children:(0,n.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,n.jsxs)("div",{className:"relative z-10 w-full max-w-lg",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)(o.K7,{size:48,withGlow:!0}),(0,n.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Connect Repositories"}),(0,n.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Connect your GitHub repositories to enable agent access"})]}),(0,n.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:"success"===e?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-success/20 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-4 text-center",children:"Repositories Connected!"}),(0,n.jsx)("div",{className:"max-h-60 overflow-y-auto mb-6 space-y-2",children:l.map(e=>(0,n.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-bg-tertiary rounded-lg",children:[(0,n.jsx)("svg",{className:"w-5 h-5 text-text-muted flex-shrink-0",fill:"currentColor",viewBox:"0 0 16 16",children:(0,n.jsx)("path",{d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8z"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("p",{className:"text-white font-medium truncate",children:e.fullName}),(0,n.jsx)("p",{className:"text-text-muted text-sm",children:e.isPrivate?"Private":"Public"})]})]},e.id))}),(0,n.jsx)("button",{onClick:j,className:"w-full py-3 px-4 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-xl hover:shadow-glow-cyan transition-all",children:"Continue to Dashboard"})]}):"pending-approval"===e?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-warning/20 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-warning",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Approval Pending"}),(0,n.jsx)("p",{className:"text-text-muted mb-6",children:d}),(0,n.jsx)("p",{className:"text-sm text-text-muted mb-6",children:"An organization admin needs to approve the GitHub App installation."}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("button",{onClick:b,className:"flex-1 py-3 px-4 bg-bg-tertiary border border-border-subtle rounded-xl text-white font-medium hover:bg-bg-hover transition-colors",children:"Try Again"}),(0,n.jsx)("button",{onClick:j,className:"flex-1 py-3 px-4 bg-bg-tertiary border border-border-subtle rounded-xl text-white font-medium hover:bg-bg-hover transition-colors",children:"Skip for Now"})]})]}):"error"===e?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-error/20 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Connection Failed"}),(0,n.jsx)("p",{className:"text-text-muted mb-6",children:s}),(0,n.jsx)("button",{onClick:b,className:"w-full py-3 px-4 bg-bg-tertiary border border-border-subtle rounded-xl text-white font-medium hover:bg-bg-hover transition-colors",children:"Try Again"})]}):"polling"===e?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 flex items-center justify-center",children:(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Syncing Repositories"}),(0,n.jsx)("p",{className:"text-text-muted",children:h||"Fetching your repositories..."})]}):(0,n.jsxs)("div",{children:[s&&(0,n.jsx)("div",{className:"mb-4 p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,n.jsx)("p",{className:"text-error text-sm",children:s})}),(0,n.jsxs)("div",{className:"mb-6 p-4 bg-bg-tertiary rounded-lg border border-border-subtle",children:[(0,n.jsx)("h3",{className:"font-medium text-white mb-2",children:"What this enables:"}),(0,n.jsxs)("ul",{className:"space-y-2 text-sm text-text-muted",children:[(0,n.jsxs)("li",{className:"flex items-start gap-2",children:[(0,n.jsx)("svg",{className:"w-4 h-4 text-success mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,n.jsx)("span",{children:"Agents can clone and work on your repositories"})]}),(0,n.jsxs)("li",{className:"flex items-start gap-2",children:[(0,n.jsx)("svg",{className:"w-4 h-4 text-success mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,n.jsx)("span",{children:"Create issues, PRs, and comments on your behalf"})]}),(0,n.jsxs)("li",{className:"flex items-start gap-2",children:[(0,n.jsx)("svg",{className:"w-4 h-4 text-success mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,n.jsx)("span",{children:"Secure token management - we never store your password"})]})]})]}),(0,n.jsx)("button",{onClick:g,disabled:"ready"!==e||w,className:"w-full py-4 px-6 bg-[#24292e] hover:bg-[#2f363d] border border-[#444d56] rounded-xl text-white font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("span",{children:h||"Connecting..."})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})}),(0,n.jsx)("span",{children:"Connect GitHub Repositories"})]})}),(0,n.jsx)("button",{onClick:j,className:"w-full mt-3 py-3 px-4 text-text-muted hover:text-white transition-colors text-sm",children:"Skip for now"})]})}),(0,n.jsx)("div",{className:"mt-6 text-center",children:(0,n.jsx)("a",{href:"/app",className:"text-text-muted hover:text-white transition-colors",children:"Back to dashboard"})})]})]})}},5634:function(e,t,s){"use strict";s.d(t,{K7:function(){return r}});var n=s(7573);function r(e){let{size:t=24,className:s="",withGlow:r=!1}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"\n transition-all duration-300\n ".concat(r?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(s,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,n.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,n.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,n.jsx)("path",{d:"M50 20 C 80 20 80 50 50 50 L 80 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:"0.7"})]})}s(7653)}},function(e){e.O(0,[5888,1293,1528,1744],function(){return e(e.s=7271)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1327],{8078:function(n,u,e){Promise.resolve().then(e.bind(e,2514))},2514:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.KN,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=8078)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6295],{1092:function(e,s,t){Promise.resolve().then(t.bind(t,425))},1695:function(e,s,t){"use strict";var a=t(1219);t.o(a,"useRouter")&&t.d(s,{useRouter:function(){return a.useRouter}}),t.o(a,"useSearchParams")&&t.d(s,{useSearchParams:function(){return a.useSearchParams}})},425:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return p}});var a=t(7573),n=t(7653),r=t(1695),o=t(5118),d=t(1705);let i=0,l=e=>(i+=1,"".concat(e.id,"-").concat(Date.now().toString(36),"-").concat(i.toString().padStart(3,"0")));function c(e){var s;let{tool:t,className:r="",nameGenerator:i=l}=e,[c,m]=(0,n.useState)("idle"),[u,x]=(0,n.useState)(null),[p,g]=(0,n.useState)(null),[f,b]=(0,n.useState)(""),[h,j]=(0,n.useState)(!1),[N,w]=(0,n.useState)(null),v=(0,n.useRef)(null);(0,n.useEffect)(()=>{v.current=p},[p]),(0,n.useEffect)(()=>()=>{let e=v.current;e&&o.api.releaseAgent(e)},[]);let y="spawning"===c||"stopping"===c,C=(0,n.useCallback)(async()=>{if(y)return;if("running"===c&&p){m("stopping"),x(null);try{let e=await o.api.releaseAgent(p);if(!e.success){m("error"),x(e.error||"Failed to stop ".concat(t.name)),w(null);return}g(null),b(""),w(null),m("idle")}catch(e){m("error"),x("Failed to stop ".concat(t.name))}return}m("spawning"),x(null);let e=i(t);try{let s=await o.api.spawnAgent({name:e,cli:t.command,task:t.task});if(!s.success){m("error"),x(s.error||"Failed to launch ".concat(t.name));return}g(s.name),w(null),m("running")}catch(e){m("error"),x("Failed to launch ".concat(t.name))}},[p,y,i,c,t]),S=(0,n.useCallback)(async e=>{if(e.preventDefault(),!p)return;let s=f.trim();if(s&&!h){j(!0),w(null);try{let e=await o.api.sendMessage({to:p,message:s});if(!e.success){w(e.error||"Failed to send message to ".concat(t.name));return}b("")}catch(e){w("Failed to send message to ".concat(t.name))}finally{j(!1)}}},[p,f,h,t.name]),L=function(e){switch(e){case"spawning":return"starting";case"stopping":return"stopping";case"running":return"running";case"error":return"error";default:return"idle"}}(c),k=(s=t.name,"running"===c?"Stop ".concat(s):"spawning"===c||"stopping"===c?"".concat("spawning"===c?"Starting":"Stopping"," ").concat(s,"..."):"Launch ".concat(s));return(0,a.jsxs)("section",{className:"rounded-xl border border-[#2a2d35] bg-gradient-to-b from-[#0d0f14] to-[#0a0c10] p-4 min-w-0 ".concat(r),"data-tool-id":t.id,children:[(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-[#e6edf3]",children:t.name}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-[#8b949e]",children:["Command: ",t.command]}),t.description&&(0,a.jsx)("p",{className:"mt-2 text-xs text-[#8b949e]",children:t.description})]}),(0,a.jsx)("div",{className:"text-xs text-[#8b949e]",children:(0,a.jsx)("span",{className:"rounded-full px-2 py-1 uppercase tracking-wider ".concat("running"===c?"bg-[#3fb950]/20 text-[#3fb950]":"error"===c?"bg-[#f85149]/20 text-[#f85149]":"bg-[#30363d]/50 text-[#8b949e]"),children:L})})]}),(0,a.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:C,disabled:y,className:"rounded-lg px-3 py-2 text-xs font-semibold transition-all ".concat("running"===c?"bg-[#f85149]/20 text-[#fba8a8] hover:bg-[#f85149]/30":"bg-accent-cyan/20 text-accent-cyan hover:bg-accent-cyan/30"),children:k}),p&&(0,a.jsxs)("span",{className:"text-xs text-[#8b949e]",children:["Agent: ",(0,a.jsx)("span",{className:"text-[#c9d1d9]",children:p})]})]}),u&&(0,a.jsx)("div",{className:"mb-3 rounded-md border border-[#f85149]/40 bg-[#3d1d20] px-3 py-2 text-xs text-[#f85149]",role:"status","aria-live":"polite",children:u}),"running"===c&&p?(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("form",{className:"flex gap-2",onSubmit:S,children:[(0,a.jsx)("input",{type:"text",value:f,onChange:e=>b(e.target.value),placeholder:"Message ".concat(p),className:"min-w-0 flex-1 rounded-lg border border-[#30363d] bg-[#0d1117] px-2 py-2 text-xs text-[#c9d1d9] placeholder:text-[#6e7681] focus:border-[#58a6ff] focus:outline-none focus:ring-1 focus:ring-[#58a6ff]/40",disabled:h,autoComplete:"off"}),(0,a.jsx)("button",{type:"submit",className:"rounded-lg bg-[#58a6ff]/20 px-3 py-2 text-xs font-semibold text-[#79c0ff] transition-all hover:bg-[#58a6ff]/30 disabled:cursor-not-allowed disabled:opacity-50",disabled:!f.trim()||h,children:h?"Sending…":"Send"})]}),N&&(0,a.jsx)("div",{className:"mt-2 rounded-md border border-[#f85149]/40 bg-[#3d1d20] px-3 py-2 text-xs text-[#f85149]",children:N})]}):(0,a.jsx)("div",{className:"mb-3 rounded-lg border border-dashed border-[#30363d] px-3 py-2 text-xs text-[#8b949e]",children:"Start the session to send a message."}),"running"===c&&p?(0,a.jsx)(d.L,{agentName:p,maxHeight:"320px",showHeader:!0,suppressNoisyOutput:!1},"log-viewer-".concat(t.id,"-").concat(p)):(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-[#30363d] px-3 py-4 text-xs text-[#8b949e]",children:"No active session for this tool. Launch it to start a real log stream."})]})}let m=[{id:"claude",name:"Claude",command:"claude",description:"Spawns a real Claude CLI tool and streams its process logs."},{id:"codex",name:"Codex",command:"codex",description:"Spawns a real Codex CLI tool and streams its process logs."},{id:"gemini",name:"Gemini",command:"gemini",description:"Spawns a real Gemini CLI tool and streams its process logs."},{id:"cursor",name:"Cursor",command:"cursor",description:"Spawns a real Cursor CLI tool and streams its process logs."},{id:"opencode",name:"OpenCode",command:"opencode",description:"Spawns a real OpenCode CLI tool and streams its process logs."},{id:"droid",name:"Droid",command:"droid",description:"Spawns a real Droid CLI tool and streams its process logs."}];function u(){let e=(0,r.useSearchParams)(),s=e.get("tool")||e.get("cli"),t=null==s?void 0:s.trim().toLowerCase(),n=t?m.filter(e=>e.id===t||e.command.toLowerCase()===t||e.name.toLowerCase()===t):m,o=0===n.length?m:n;return(0,a.jsxs)("div",{className:"min-h-screen bg-[#0a0c10] text-[#c9d1d9]",children:[(0,a.jsx)("div",{className:"border-b border-[#21262d] bg-[#0d1117]",children:(0,a.jsx)("div",{className:"mx-auto max-w-[1400px] px-6 py-5",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#58a6ff]"}),"CLI Tool Harness"]}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-[#8b949e]",children:[s?"Focused tool: ".concat(s):"Real CLI launch + live XTerm log stream per tool."," No mocks."]})]}),(0,a.jsx)("span",{className:"rounded-md bg-[#3fb950]/20 px-2.5 py-1 text-xs font-medium text-[#3fb950]",children:"Manual + integration testing"})]})})}),(0,a.jsx)("main",{className:"mx-auto max-w-[1400px] px-6 py-6",children:(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[0===n.length&&(0,a.jsxs)("div",{className:"rounded-lg border border-[#3fb950]/40 bg-[#1f2937] px-3 py-4 text-sm text-[#7c8594]",children:['No matching tool found for "',s,'". Showing all available tools.']}),o.map(e=>(0,a.jsx)(c,{tool:e},e.id))]})})]})}function x(){return(0,a.jsxs)("div",{className:"min-h-screen bg-[#0a0c10] text-[#c9d1d9]",children:[(0,a.jsx)("div",{className:"border-b border-[#21262d] bg-[#0d1117]",children:(0,a.jsx)("div",{className:"mx-auto max-w-[1400px] px-6 py-5",children:(0,a.jsxs)("h1",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#58a6ff]"}),"CLI Tool Harness"]})})}),(0,a.jsx)("main",{className:"mx-auto max-w-[1400px] px-6 py-6",children:(0,a.jsx)("div",{className:"rounded-lg border border-[#58a6ff]/30 bg-[#1f2937] px-3 py-4 text-sm text-[#7c8594]",children:"Initializing CLI tools…"})})]})}function p(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(x,{}),children:(0,a.jsx)(u,{})})}}},function(e){e.O(0,[3440,6940,5118,1705,1293,1528,1744],function(){return e(e.s=1092)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8468],{3354:function(e,t,n){Promise.resolve().then(n.bind(n,4395))},4395:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var s=n(7573),a=n(7653),o=n(8906);function r(e){let{fixture:t,streaming:n=!1}=e,[r,l]=(0,a.useState)([]),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=!1;if(!n){l(t.lines);return}return l([]),(async()=>{for(let n of t.lines){if(e||(n.delay&&await new Promise(e=>setTimeout(e,n.delay)),e))break;l(e=>[...e,n])}})(),()=>{e=!0}},[t,n]),(0,a.useEffect)(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[r]);let i=r.filter(e=>{let t=(0,o.hL)(e.content).trim();return!(0===t.length||(0,o.ED)(t))});return(0,s.jsxs)("div",{className:"rounded-lg overflow-hidden border border-[#2a2d35]",style:{background:"linear-gradient(180deg, #0d0f14 0%, #12151c 100%)",boxShadow:"inset 0 1px 0 rgba(255,255,255,0.02), 0 4px 12px rgba(0,0,0,0.3)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-[#2a2d35]",style:{background:"linear-gradient(180deg, #161b22 0%, #0d1117 100%)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-[#8b949e]",children:[(0,s.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,s.jsx)("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),(0,s.jsx)("span",{className:"text-xs font-medium text-accent-cyan",children:"Inline Mode"}),(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded-full bg-[#238636]/20 text-[10px] text-[#3fb950] uppercase tracking-wider",children:"mock"})]}),(0,s.jsxs)("span",{className:"text-[10px] text-[#6e7681] font-mono",children:[i.length," lines"]})]}),(0,s.jsxs)("div",{ref:c,className:"font-mono text-xs leading-relaxed p-3 overflow-y-auto",style:{maxHeight:"400px"},children:[i.map((e,t)=>{let n=(0,o.hL)(e.content),a="stderr"===e.type?"text-[#f85149]":"system"===e.type?"text-[#58a6ff] italic":"text-[#c9d1d9]";return(0,s.jsx)("div",{className:"".concat(a," leading-5 whitespace-pre-wrap break-all"),children:n},t)}),0===i.length&&(0,s.jsxs)("div",{className:"text-[#484f58] italic flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#484f58] animate-pulse"}),n?"Streaming...":"No output"]})]})]})}var l=n(1705);let c=[{name:"Edge Cases",description:"Malformed escapes, Unicode, long lines, stderr, spinners",lines:[{content:"Warning: deprecated API usage\n",type:"stderr"},{content:"Error: ENOENT: no such file or directory\n",type:"stderr",delay:100},{content:"[Connected to agent log stream]\n",type:"system"},{content:"[38;5;216mThis had a color code[0m but ESC bytes were stripped\n",type:"stdout",delay:100},{content:"[?25hCursor show command leaked\n",type:"stdout",delay:100},{content:"[2KLine erase leaked\n",type:"stdout",delay:100},{content:"\uD83D\uDE80 Deploying to production...\n",type:"stdout",delay:200},{content:"✅ Deploy complete! \uD83C\uDF89 (took 2.3s)\n",type:"stdout",delay:200},{content:"日本語テスト: 成功\n",type:"stdout",delay:100},{content:"中文测试: 通过\n",type:"stdout",delay:100},{content:"Long line: "+"abcdefghij".repeat(50)+"\n",type:"stdout",delay:100},{content:"Downloading... 10%\r",type:"stdout",delay:50},{content:"Downloading... 30%\r",type:"stdout",delay:50},{content:"Downloading... 50%\r",type:"stdout",delay:50},{content:"Downloading... 70%\r",type:"stdout",delay:50},{content:"Downloading... 90%\r",type:"stdout",delay:50},{content:"Downloading... 100%\n",type:"stdout",delay:50},{content:"⠋",type:"stdout",delay:80},{content:"\r⠙",type:"stdout",delay:80},{content:"\r⠹",type:"stdout",delay:80},{content:"\r⠸",type:"stdout",delay:80},{content:"\r⠼",type:"stdout",delay:80},{content:"\r\x1b[2K",type:"stdout"},{content:"Done!\n",type:"stdout"},{content:"Typo\b\b\b\bFixed text here\n",type:"stdout",delay:100},{content:"\x1b[1m\x1b[4mBold and underlined\x1b[0m normal \x1b[31mred\x1b[0m \x1b[42mgreen bg\x1b[0m\n",type:"stdout"},{content:"\x1b[38;5;196m\x1b[48;5;232m Red on dark \x1b[0m \x1b[38;5;46m\x1b[48;5;17m Green on navy \x1b[0m\n",type:"stdout"}]},{name:"Streaming",description:"Simulates real-time streaming with delays to test auto-scroll and buffering",lines:Array.from({length:50},(e,t)=>({content:"\x1b[2m".concat(String(t+1).padStart(3,"0"),"\x1b[22m \x1b[").concat(t%2==0?"36":"33","m[").concat(new Date(Date.now()+200*t).toISOString().slice(11,23),"]\x1b[0m Processing item ").concat(t+1,"/50...\n"),type:"stdout",delay:200}))}];function i(){let[e,t]=(0,a.useState)(c),[n,o]=(0,a.useState)(c[0]),[i,d]=(0,a.useState)(!1),[x,m]=(0,a.useState)(0),[p,u]=(0,a.useState)([]),[g,h]=(0,a.useState)(!0),f=()=>new URLSearchParams(window.location.search).get("api")||"";(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{let t=f(),n=await fetch("".concat(t,"/api/logs"));if(!n.ok)throw Error("HTTP ".concat(n.status));let s=await n.json();if(e)return;let a=(s.agents||[]).filter(e=>!e.startsWith("step-"));u(a.map(e=>({name:e})))}catch(e){console.warn("Could not fetch log agents from /api/logs — using static fixtures only")}finally{e||h(!1)}})(),()=>{e=!0}},[]);let y=async n=>{let s=e.find(e=>e.name===n);if(s){o(s),m(e=>e+1);return}u(e=>e.map(e=>e.name===n?{...e,loading:!0}:e));try{let e=f(),s=await fetch("".concat(e,"/api/logs/").concat(encodeURIComponent(n)));if(!s.ok)throw Error("HTTP ".concat(s.status));let a=await s.json();if(!a.found||!a.content){console.warn("No log content found for ".concat(n));return}let r=function(e,t){let n=t.split("\n").map(e=>({content:e+"\n",type:"stdout"}));return{name:e,description:"Real log output from ".concat(e," worker"),lines:n}}(n,a.content);t(e=>[...e,r]),o(r),m(e=>e+1)}catch(e){console.error("Failed to load log for ".concat(n,":"),e)}finally{u(e=>e.map(e=>e.name===n?{...e,loading:!1}:e))}},b=e=>{o(e),m(e=>e+1)},w=n.lines.map(e=>({content:e.content,delay:e.delay}));return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0c10] text-[#c9d1d9]",children:[(0,s.jsx)("div",{className:"border-b border-[#21262d] bg-[#0d1117]",children:(0,s.jsx)("div",{className:"max-w-[1600px] mx-auto px-6 py-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h1",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-accent-cyan",children:[(0,s.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,s.jsx)("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),"Log Viewer Test Page"]}),(0,s.jsx)("p",{className:"text-sm text-[#8b949e] mt-1",children:"Isolated rendering tests — static fixtures + real worker logs"})]}),(0,s.jsx)("span",{className:"px-2 py-1 rounded-md bg-[#d29922]/20 text-[#d29922] text-xs font-medium uppercase tracking-wider",children:"Dev Only"})]})})}),(0,s.jsx)("div",{className:"border-b border-[#21262d] bg-[#0d1117]/50",children:(0,s.jsxs)("div",{className:"max-w-[1600px] mx-auto px-6 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-[#8b949e] uppercase tracking-wider font-medium",children:"Static:"}),(0,s.jsx)("div",{className:"flex gap-1",children:c.map(e=>(0,s.jsx)("button",{onClick:()=>b(e),className:"px-3 py-1.5 rounded-lg text-xs font-medium transition-all ".concat(n.name===e.name?"bg-accent-cyan/20 text-accent-cyan shadow-[0_0_8px_rgba(0,217,255,0.15)]":"bg-[#21262d] text-[#8b949e] hover:text-[#c9d1d9] hover:bg-[#30363d]"),children:e.name},e.name))})]}),(0,s.jsx)("div",{className:"w-px h-6 bg-[#30363d]"}),(0,s.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:i,onChange:e=>{d(e.target.checked),m(e=>e+1)},className:"sr-only"}),(0,s.jsx)("div",{className:"w-8 h-4 rounded-full transition-colors ".concat(i?"bg-accent-cyan":"bg-[#30363d]"),children:(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-white mt-0.5 transition-transform ".concat(i?"translate-x-4.5 ml-[18px]":"translate-x-0.5 ml-[2px]")})}),(0,s.jsx)("span",{className:"text-xs text-[#8b949e]",children:"Streaming"})]}),(0,s.jsxs)("button",{onClick:()=>{m(e=>e+1)},className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[#21262d] text-[#8b949e] hover:text-[#c9d1d9] hover:bg-[#30363d] transition-all flex items-center gap-1.5",children:[(0,s.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("polyline",{points:"1 4 1 10 7 10"}),(0,s.jsx)("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),"Replay"]})]}),p.length>0&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,s.jsx)("span",{className:"text-xs text-[#8b949e] uppercase tracking-wider font-medium",children:"Real Logs:"}),(0,s.jsx)("div",{className:"flex gap-1 flex-wrap",children:p.map(t=>{let a=e.some(e=>e.name===t.name),o=n.name===t.name;return(0,s.jsx)("button",{onClick:()=>y(t.name),disabled:t.loading,className:"px-3 py-1.5 rounded-lg text-xs font-medium transition-all ".concat(o?"bg-[#3fb950]/20 text-[#3fb950] shadow-[0_0_8px_rgba(63,185,80,0.15)]":a?"bg-[#238636]/10 text-[#3fb950] hover:bg-[#238636]/20":"bg-[#21262d] text-[#8b949e] hover:text-[#c9d1d9] hover:bg-[#30363d]"," ").concat(t.loading?"opacity-50 cursor-wait":""),children:t.loading?"...":t.name},t.name)})}),g&&(0,s.jsx)("span",{className:"text-[10px] text-[#6e7681] animate-pulse",children:"Loading agents..."})]}),!g&&0===p.length&&(0,s.jsx)("div",{className:"mt-2 text-[10px] text-[#484f58]",children:"No real log agents found — start the dashboard server to load worker logs"}),(0,s.jsx)("p",{className:"text-xs text-[#6e7681] mt-2",children:n.description})]})}),(0,s.jsx)("div",{className:"max-w-[1600px] mx-auto px-6 py-6",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-sm font-medium text-[#8b949e] mb-3 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-[#58a6ff]"}),"Inline Mode",(0,s.jsx)("span",{className:"text-[10px] text-[#6e7681]",children:"(sanitized text, no ANSI)"})]}),(0,s.jsx)(r,{fixture:n,streaming:i},"inline-".concat(x))]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-sm font-medium text-[#8b949e] mb-3 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-[#3fb950]"}),"XTerm Panel Mode",(0,s.jsx)("span",{className:"text-[10px] text-[#6e7681]",children:"(production component, mock data)"})]}),(0,s.jsx)(l.L,{agentName:n.name,mockData:w,mockStreaming:i,maxHeight:"400px",suppressNoisyOutput:!0},"xterm-".concat(x))]})]})})]})}},2446:function(e,t,n){"use strict";n.d(t,{HE:function(){return a},bR:function(){return o}});var s=n(4859);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/ws",t=s.env.NEXT_PUBLIC_WS_URL;if(t)return t.endsWith("/")?"".concat(t.slice(0,-1)).concat(e):"".concat(t).concat(e);window.location.hostname;let n="https:"===window.location.protocol?"wss:":"ws:";return"".concat(n,"//").concat(window.location.host).concat(e)}function o(){return s.env.NEXT_PUBLIC_API_URL||""}s.env.NEXT_PUBLIC_DEV_SERVER_PORT},8906:function(e,t,n){"use strict";n.d(t,{ED:function(){return l},hL:function(){return a}});let s="✳✢✶✻✺✹✸✷⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⣾⣽⣻⢿⡿⣟⣯⣷◐◓◑◒●○◉◎◉\xb7⎿⎽⎾⎷⏺⏵⏢✢✣";function a(e){if(!e)return"";let t=e;t=(t=(t=(t=(t=(t=(t=(t=t.replace(RegExp("\\x1b\\].*?(?:\\x07|\\x1b\\\\)","gs"),"")).replace(RegExp("\\x1bP.*?\\x1b\\\\","gs"),"")).replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g,"")).replace(/\x1b[@-Z\\-_]/g,"")).replace(/^\[\??\d+[hlKJHfABCDGPXsu]/gm,"")).replace(/\[\d+(?:;\d+)*m/g,"")).replace(/\r\n/g,"\n")).split("\n").map(e=>{if(!e.includes("\r"))return e;let t=e.split("\r");return t[t.length-1]}).join("\n");let n="";for(;n!==t;)n=t,t=t.replace(/[^\x08]\x08/g,"");return(t=(t=t.replace(/\x08+/g,"")).replace(/\x1b/g,"")).replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")}RegExp("[".concat(s,"]"),"g"),new RegExp("[".concat(s,"]"));let o=/^[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⣾⣽⣻⢿⡿⣟⣯⣷◐◓◑◒●○◉◎✳✢✶✻✺✹✸✷⏢|\\\/\-*.\u2800-\u28FF]+$/,r=/^[✳✢✶✻✺✹✸✷⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏●○*]?\s*(?:Nebulizing|Simmering|Percolating|Brewing|Distilling|Crystallizing|Synthesizing|Composing|Weaving|Forging|Manifesting|Conjuring|Materializing|Transmuting|Catalyzing|Combobulating|Orbiting|Bypassing|Bypass|Thinking|Thinking…|Running|Working)\s*…?\s*$/i;function l(e){return!!(e.length<=2&&o.test(e)||r.test(e))}}},function(e){e.O(0,[3440,6940,1705,1293,1528,1744],function(){return e(e.s=3354)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2726],{1941:function(n,u,e){Promise.resolve().then(e.bind(e,1682))},1682:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.kO,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=1941)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8811],{5938:function(e,t,s){Promise.resolve().then(s.bind(s,1184))},1184:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return c}});var r=s(7573),a=s(7653),n=s(8146),i=s(5118),l=s(5493);function c(){let[e,t]=(0,a.useState)(null),[s,l]=(0,a.useState)([]),[c,m]=(0,a.useState)([]),[p,k]=(0,a.useState)([]),[C,S]=(0,a.useState)(null),[M,B]=(0,a.useState)(!1),[W,H]=(0,a.useState)(null),[L,A]=(0,a.useState)(""),[D,E]=(0,a.useState)(""),[T,P]=(0,a.useState)(null),[U,_]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&!U&&(_(!0),(async()=>{let e=await i.api.getHistoryStats();e.success&&e.data&&S(e.data)})())},[e,U]),(0,a.useEffect)(()=>{e&&(async()=>{B(!0),H(null);try{if("conversations"===e){let e=await i.api.getHistoryConversations();e.success&&e.data?l(e.data.conversations):H(e.error||"Failed to fetch conversations")}else if("sessions"===e){let e=await i.api.getHistorySessions({agent:D||void 0,limit:100});e.success&&e.data?m(e.data.sessions):H(e.error||"Failed to fetch sessions")}else if("messages"===e){let e={limit:200,order:"desc"};if(L&&(e.search=L),T){let[r,a]=T.participants,n=await i.api.getHistoryMessages({...e,from:r,to:a}),l=await i.api.getHistoryMessages({...e,from:a,to:r});if(n.success&&l.success){var t,s;let e=[...(null===(t=n.data)||void 0===t?void 0:t.messages)||[],...(null===(s=l.data)||void 0===s?void 0:s.messages)||[]].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime());k(e)}}else{let t=await i.api.getHistoryMessages(e);t.success&&t.data?k(t.data.messages):H(t.error||"Failed to fetch messages")}}}catch(e){H("Failed to load data")}finally{B(!1)}})()},[e,D,L,T]);let F=(0,a.useCallback)(e=>{P(e),t("messages")},[]),G=(0,a.useCallback)(()=>{P(null),t("conversations")},[]),z=(0,a.useCallback)(e=>{"conversations"===e&&P(null),t(e)},[]);return(0,r.jsxs)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 bg-sidebar-bg border-b border-sidebar-border px-4 md:px-8 py-4",children:(0,r.jsxs)("div",{className:"max-w-[1400px] mx-auto flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)(n.default,{href:"/",className:"flex items-center gap-2 text-text-muted text-sm font-medium px-3 py-2 rounded-md transition-all hover:text-accent hover:bg-accent/10",children:[(0,r.jsx)(g,{}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Dashboard"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-accent/80 to-accent rounded-lg flex items-center justify-center border border-accent/30",children:(0,r.jsx)(b,{})}),(0,r.jsxs)("div",{className:"text-lg font-semibold tracking-tight",children:["Conversation ",(0,r.jsx)("span",{className:"text-accent",children:"History"})]})]})]}),C&&"number"==typeof C.messageCount&&(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-4 text-sm",children:[(0,r.jsx)(d,{label:"Messages",value:C.messageCount}),(0,r.jsx)(d,{label:"Sessions",value:C.sessionCount}),(0,r.jsx)(d,{label:"Agents",value:C.uniqueAgents})]})]})}),(0,r.jsxs)("main",{className:"max-w-[1400px] mx-auto px-4 md:px-8 py-6",children:[(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center gap-4 mb-6",children:[(0,r.jsxs)("div",{className:"flex gap-1 bg-bg-secondary rounded-lg p-1 border border-border",children:[(0,r.jsxs)(o,{active:"conversations"===e,onClick:()=>z("conversations"),children:[(0,r.jsx)(y,{}),"Conversations"]}),(0,r.jsxs)(o,{active:"sessions"===e,onClick:()=>z("sessions"),children:[(0,r.jsx)(v,{}),"Sessions"]}),(0,r.jsxs)(o,{active:"messages"===e,onClick:()=>z("messages"),children:[(0,r.jsx)(N,{}),"Messages"]})]}),(0,r.jsxs)("div",{className:"flex-1 flex items-center gap-3",children:["messages"===e&&(0,r.jsx)("div",{className:"flex-1 max-w-md",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(j,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,r.jsx)("input",{type:"text",placeholder:"Search messages...",value:L,onChange:e=>A(e.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-bg-secondary border border-border rounded-lg text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:border-accent transition-colors"})]})}),"sessions"===e&&(0,r.jsx)("div",{className:"flex-1 max-w-md",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(j,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,r.jsx)("input",{type:"text",placeholder:"Filter by agent name...",value:D,onChange:e=>E(e.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-bg-secondary border border-border rounded-lg text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:border-accent transition-colors"})]})}),T&&(0,r.jsxs)("button",{onClick:G,className:"flex items-center gap-2 px-4 py-2 text-sm text-text-muted hover:text-text-primary bg-bg-secondary border border-border rounded-lg transition-colors hover:bg-bg-tertiary",children:[(0,r.jsx)(g,{}),"Back to conversations"]})]})]}),e?M?(0,r.jsx)("div",{className:"flex items-center justify-center h-[60vh]",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 border-2 border-border border-t-accent rounded-full animate-spin"}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"Loading history..."})]})}):W?(0,r.jsx)("div",{className:"flex items-center justify-center h-[60vh]",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-error/10 flex items-center justify-center",children:(0,r.jsx)(w,{})}),(0,r.jsx)("p",{className:"text-text-secondary",children:W}),(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"px-5 py-2.5 bg-accent text-white rounded-lg text-sm font-medium transition-colors hover:bg-accent-hover",children:"Retry"})]})}):"conversations"===e?(0,r.jsx)(x,{conversations:s,onConversationClick:F}):"sessions"===e?(0,r.jsx)(f,{sessions:c}):(0,r.jsx)(u,{messages:p,conversationTitle:T?"".concat(T.participants[0]," & ").concat(T.participants[1]):void 0}):(0,r.jsx)(h,{icon:(0,r.jsx)(y,{className:"w-12 h-12"}),title:"Conversation History",description:"Select a tab above to browse conversations, sessions, or messages."})]})]})}function o(e){let{active:t,onClick:s,children:a}=e;return(0,r.jsx)("button",{onClick:s,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md transition-colors ".concat(t?"bg-accent text-white":"text-text-muted hover:text-text-primary hover:bg-bg-tertiary"),children:a})}function d(e){let{label:t,value:s}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-bg-secondary/50 border border-border/50 rounded-lg",children:[(0,r.jsxs)("span",{className:"text-text-muted text-xs",children:[t,":"]}),(0,r.jsx)("span",{className:"text-accent font-mono font-semibold",children:s})]})}function x(e){let{conversations:t,onConversationClick:s}=e;return 0===t.length?(0,r.jsx)(h,{icon:(0,r.jsx)(y,{className:"w-12 h-12"}),title:"No conversations yet",description:"Start messaging between agents to see conversation history here."}):(0,r.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:t.map((e,t)=>{let[a,n]=e.participants,i=(0,l.GW)(a),c=(0,l.GW)(n);return(0,r.jsxs)("div",{onClick:()=>s(e),className:"p-5 bg-bg-secondary border border-border rounded-xl cursor-pointer transition-all hover:border-accent/50 hover:bg-bg-tertiary group",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,r.jsxs)("div",{className:"flex -space-x-2",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-xs font-bold border-2 border-bg-secondary",style:{backgroundColor:i.primary,color:i.text},children:(0,l.hP)(a)}),(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-xs font-bold border-2 border-bg-secondary",style:{backgroundColor:c.primary,color:c.text},children:(0,l.hP)(n)})]}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"font-semibold text-text-primary truncate",children:[a," & ",n]}),(0,r.jsxs)("div",{className:"text-xs text-text-muted",children:[e.messageCount," messages"]})]}),(0,r.jsx)("div",{className:"text-xs text-text-muted",children:p(e.lastTimestamp)})]}),(0,r.jsx)("p",{className:"text-sm text-text-muted truncate",children:e.lastMessage}),(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-xs text-accent opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,r.jsx)("span",{children:"View conversation"}),(0,r.jsx)(k,{})]})]},t)})})}function f(e){let{sessions:t}=e;return 0===t.length?(0,r.jsx)(h,{icon:(0,r.jsx)(v,{className:"w-12 h-12"}),title:"No sessions found",description:"Agent sessions will appear here when agents connect."}):(0,r.jsx)("div",{className:"bg-bg-secondary border border-border rounded-xl overflow-hidden",children:(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[700px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"bg-bg-tertiary border-b border-border",children:[(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Agent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Status"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"CLI"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Messages"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Started"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Duration"})]})}),(0,r.jsx)("tbody",{children:t.map(e=>{let t=(0,l.GW)(e.agentName);return(0,r.jsxs)("tr",{className:"border-b border-border/50 last:border-0 transition-colors hover:bg-bg-hover",children:[(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-xs font-semibold",style:{backgroundColor:t.primary,color:t.text},children:(0,l.hP)(e.agentName)}),(0,r.jsx)("span",{className:"font-medium text-text-primary",children:e.agentName})]})}),(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(m,{isActive:e.isActive,closedBy:e.closedBy})}),(0,r.jsx)("td",{className:"py-3 px-4",children:e.cli&&(0,r.jsx)("span",{className:"text-xs px-2 py-1 bg-bg-tertiary text-text-muted rounded font-mono",children:e.cli})}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent",children:e.messageCount}),(0,r.jsx)("td",{className:"py-3 px-4 text-sm text-text-muted",children:new Date(e.startedAt).toLocaleString()}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:e.duration})]},e.id)})})]})})})}function m(e){let{isActive:t,closedBy:s}=e;if(t)return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full bg-success/15 text-success",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 bg-success rounded-full animate-pulse"}),"Active"]});let a={agent:{label:"Closed",className:"bg-text-muted/10 text-text-muted"},disconnect:{label:"Disconnected",className:"bg-warning/15 text-warning"},error:{label:"Error",className:"bg-error/15 text-error"}},n=s?a[s]:a.agent;return(0,r.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-full ".concat(n.className),children:n.label})}function u(e){let{messages:t,conversationTitle:s}=e;return 0===t.length?(0,r.jsx)(h,{icon:(0,r.jsx)(N,{className:"w-12 h-12"}),title:"No messages found",description:s?"No messages in this conversation yet.":"Try adjusting your search or filters."}):(0,r.jsxs)("div",{className:"space-y-4",children:[s&&(0,r.jsx)("h3",{className:"text-lg font-semibold text-text-primary mb-4",children:s}),t.map(e=>{let t=(0,l.GW)(e.from);return(0,r.jsx)("div",{className:"p-4 bg-bg-secondary border border-border rounded-xl transition-colors hover:border-border-dark",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"shrink-0 w-9 h-9 rounded-lg flex items-center justify-center text-xs font-bold",style:{backgroundColor:t.primary,color:t.text},children:(0,l.hP)(e.from)}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[(0,r.jsx)("span",{className:"font-semibold text-accent",children:e.from}),(0,r.jsx)("span",{className:"text-text-muted",children:"to"}),(0,r.jsx)("span",{className:"font-medium text-text-primary",children:"*"===e.to?"Everyone":e.to}),e.isBroadcast&&(0,r.jsx)("span",{className:"text-[10px] px-2 py-0.5 bg-warning/15 text-warning rounded-full font-medium",children:"Broadcast"}),e.isUrgent&&(0,r.jsx)("span",{className:"text-[10px] px-2 py-0.5 bg-error/15 text-error rounded-full font-medium",children:"Urgent"}),e.thread&&(0,r.jsx)("span",{className:"text-[10px] px-2 py-0.5 bg-accent/15 text-accent rounded-full font-medium",children:e.thread}),(0,r.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:p(e.timestamp)})]}),(0,r.jsx)("p",{className:"text-sm text-text-primary whitespace-pre-wrap break-words",children:e.content})]})]})},e.id)})]})}function h(e){let{icon:t,title:s,description:a}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[(0,r.jsx)("div",{className:"text-text-muted opacity-50 mb-4",children:t}),(0,r.jsx)("h3",{className:"text-lg font-semibold text-text-primary mb-2",children:s}),(0,r.jsx)("p",{className:"text-sm text-text-muted max-w-md",children:a})]})}function p(e){let t=new Date(e),s=new Date().getTime()-t.getTime(),r=Math.floor(s/6e4),a=Math.floor(s/36e5),n=Math.floor(s/864e5);return r<1?"just now":r<60?"".concat(r,"m ago"):a<24?"".concat(a,"h ago"):n<7?"".concat(n,"d ago"):t.toLocaleDateString()}function g(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})})}function b(){return(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}function j(e){let{className:t}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function y(e){let{className:t}=e;return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,children:(0,r.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function v(e){let{className:t}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,children:[(0,r.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,r.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,r.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,r.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}function N(e){let{className:t}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,children:[(0,r.jsx)("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),(0,r.jsx)("polyline",{points:"22,6 12,13 2,6"})]})}function w(){return(0,r.jsx)("svg",{className:"w-6 h-6 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}function k(){return(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,r.jsx)("polyline",{points:"12 5 19 12 12 19"})]})}},5493:function(e,t,s){"use strict";s.d(t,{GW:function(){return c},hP:function(){return o},oU:function(){return l},yh:function(){return n}});let r={backend:{primary:"#1264a3",light:"#e8f4fd",dark:"#0d4f82",text:"#ffffff"},frontend:{primary:"#7c3aed",light:"#f3e8ff",dark:"#5b21b6",text:"#ffffff"},infra:{primary:"#ea580c",light:"#fff7ed",dark:"#c2410c",text:"#ffffff"},lead:{primary:"#2bac76",light:"#ecfdf5",dark:"#059669",text:"#ffffff"},test:{primary:"#0d9488",light:"#f0fdfa",dark:"#0f766e",text:"#ffffff"},data:{primary:"#dc2626",light:"#fef2f2",dark:"#b91c1c",text:"#ffffff"},api:{primary:"#2563eb",light:"#eff6ff",dark:"#1d4ed8",text:"#ffffff"},worker:{primary:"#9333ea",light:"#faf5ff",dark:"#7e22ce",text:"#ffffff"},monitor:{primary:"#0891b2",light:"#ecfeff",dark:"#0e7490",text:"#ffffff"},security:{primary:"#be123c",light:"#fff1f2",dark:"#9f1239",text:"#ffffff"}},a=[{primary:"#6366f1",light:"#eef2ff",dark:"#4f46e5",text:"#ffffff"},{primary:"#ec4899",light:"#fdf2f8",dark:"#db2777",text:"#ffffff"},{primary:"#14b8a6",light:"#f0fdfa",dark:"#0d9488",text:"#ffffff"},{primary:"#f59e0b",light:"#fffbeb",dark:"#d97706",text:"#000000"},{primary:"#8b5cf6",light:"#f5f3ff",dark:"#7c3aed",text:"#ffffff"},{primary:"#06b6d4",light:"#ecfeff",dark:"#0891b2",text:"#ffffff"},{primary:"#f43f5e",light:"#fff1f2",dark:"#e11d48",text:"#ffffff"},{primary:"#84cc16",light:"#f7fee7",dark:"#65a30d",text:"#000000"}],n={online:"#22c55e",offline:"#6b7280",busy:"#eab308",processing:"#6366f1",error:"#ef4444",attention:"#ef4444",stuck:"#f97316"};function i(e){return e.toLowerCase().split("-").filter(Boolean)}function l(e){return i(e)[0]||e.toLowerCase()}function c(e){let t=l(e);return t in r?r[t]:a[function(e){let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s),t&=t;return Math.abs(t)}(t)%a.length]}function o(e){let t=i(e);return 0===t.length?e.substring(0,2).toUpperCase():t.length>=2?(t[0][0]+t[1][0]).toUpperCase():t[0].substring(0,2).toUpperCase()}}},function(e){e.O(0,[3663,5118,1293,1528,1744],function(){return e(e.s=5938)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{678:function(n,e,u){Promise.resolve().then(u.t.bind(u,2625,23))},2625:function(){}},function(n){n.O(0,[9387,1293,1528,1744],function(){return n(n.s=678)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{957:function(e,t,n){Promise.resolve().then(n.bind(n,5024))},1695:function(e,t,n){"use strict";var r=n(1219);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},5024:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(7573),s=n(7653),a=n(1695),i=n(5888),o=n(5634);function c(){return(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:(0,r.jsx)("div",{className:"relative z-10 w-full max-w-md",children:(0,r.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,r.jsx)(o.K7,{size:48,withGlow:!0}),(0,r.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Agent Relay"}),(0,r.jsx)("p",{className:"mt-2 text-text-muted",children:"Loading..."})]})})})}function l(){let e=(0,a.useSearchParams)(),[t,n]=(0,s.useState)("github"),[c,l]=(0,s.useState)(!1),[d,u]=(0,s.useState)(!1),[h,x]=(0,s.useState)(""),[m,f]=(0,s.useState)(""),[p,g]=(0,s.useState)(""),[b,w]=(0,s.useState)(""),y=e.get("return"),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/auth/nango/login-session",{credentials:"include"}),n=await t.json();if(!e)return;if(!t.ok||!n.sessionToken){l(!0);return}j.current=new i.ZP({connectSessionToken:n.sessionToken}),l(!0)}catch(t){e&&(console.error("Init error:",t),l(!0))}})(),()=>{e=!1}},[]);let v=async e=>{let t=await fetch("/api/auth/nango/login-status/".concat(e),{credentials:"include"});if(!t.ok)throw Error("Auth status not ready");return t.json()},N=async e=>{try{x("Completing authentication...");let t=Date.now(),n=async()=>{if(Date.now()-t>3e4)throw Error("Authentication timed out. Please try again.");try{let t=await v(e);if(t&&t.ready){if(t.needsEmail){window.location.href="/complete-profile";return}y?window.location.href=y:window.location.href=t.hasRepos?"/app":"/connect-repos";return}return await new Promise(e=>setTimeout(e,1e3)),n()}catch(e){return await new Promise(e=>setTimeout(e,1e3)),n()}};await n()}catch(e){console.error("[AUTH] Authentication error:",e),f(e instanceof Error?e.message:"Authentication failed"),u(!1),x("")}},k=async()=>{if(!j.current){f("GitHub login not available. Please use email login or refresh the page.");return}u(!0),f(""),x("Connecting to GitHub...");try{let e=await j.current.auth("github");if(e&&"connectionId"in e)await N(e.connectionId);else throw Error("No connection ID returned")}catch(t){var e;if(console.error("GitHub auth error:",t),"user_cancelled"===t.type||(null===(e=t.message)||void 0===e?void 0:e.includes("closed"))){u(!1),x(""),fetch("/api/auth/nango/login-session",{credentials:"include"}).then(e=>e.json()).then(e=>{e.sessionToken&&(j.current=new i.ZP({connectSessionToken:e.sessionToken}),l(!0))});return}f(t.message||"Authentication failed"),u(!1),x("")}},C=async e=>{e.preventDefault(),f(""),u(!0),x("Signing in...");try{let e=(await fetch("/api/auth/session",{credentials:"include"})).headers.get("x-csrf-token"),t=await fetch("/api/auth/email/login",{method:"POST",headers:{"Content-Type":"application/json",...e&&{"x-csrf-token":e}},credentials:"include",body:JSON.stringify({email:p,password:b})}),r=await t.json();if(!t.ok){"GITHUB_ACCOUNT"===r.code?(f(r.error),n("github")):f(r.error||"Login failed"),u(!1),x("");return}x("Login successful! Redirecting..."),y?window.location.href=y:window.location.href="/app"}catch(e){console.error("Email login error:",e),f("Failed to connect. Please try again."),u(!1),x("")}},S=!c||d;return(0,r.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"fixed inset-0 opacity-10",children:(0,r.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,r.jsx)(o.K7,{size:48,withGlow:!0}),(0,r.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Agent Relay"}),(0,r.jsx)("p",{className:"mt-2 text-text-muted",children:"Sign in to continue"})]}),(0,r.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:[(0,r.jsxs)("div",{className:"flex mb-6 bg-bg-secondary/50 rounded-lg p-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>n("github"),className:"flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ".concat("github"===t?"bg-bg-primary text-white shadow-sm":"text-text-muted hover:text-white"),children:"GitHub"}),(0,r.jsx)("button",{type:"button",onClick:()=>n("email"),className:"flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ".concat("email"===t?"bg-bg-primary text-white shadow-sm":"text-text-muted hover:text-white"),children:"Email"})]}),(0,r.jsxs)("div",{children:[m&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,r.jsx)("p",{className:"text-error text-sm",children:m})}),"github"===t?(0,r.jsx)("button",{type:"button",onClick:k,disabled:S,className:"w-full py-4 px-6 bg-[#24292e] hover:bg-[#2f363d] border border-[#444d56] rounded-xl text-white font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:c?d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,r.jsx)("span",{children:h||"Connecting..."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})}),(0,r.jsx)("span",{children:"Continue with GitHub"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,r.jsx)("span",{children:"Loading..."})]})}):(0,r.jsxs)("form",{onSubmit:C,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-text-secondary mb-2",children:"Email"}),(0,r.jsx)("input",{type:"email",id:"email",value:p,onChange:e=>g(e.target.value),required:!0,disabled:d,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"you@example.com"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),(0,r.jsx)("input",{type:"password",id:"password",value:b,onChange:e=>w(e.target.value),required:!0,disabled:d,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"Enter your password"})]}),(0,r.jsx)("button",{type:"submit",disabled:S||!p||!b,className:"w-full py-4 px-6 bg-accent-cyan hover:bg-accent-cyan/90 rounded-xl text-black font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,r.jsx)("span",{children:h||"Signing in..."})]}):(0,r.jsx)("span",{children:"Sign in with Email"})})]}),(0,r.jsxs)("p",{className:"mt-6 text-center text-text-muted text-sm",children:["By signing in, you agree to our"," ",(0,r.jsx)("a",{href:"/terms",className:"text-accent-cyan hover:underline",children:"Terms of Service"})," ","and"," ",(0,r.jsx)("a",{href:"/privacy",className:"text-accent-cyan hover:underline",children:"Privacy Policy"})]})]})]}),(0,r.jsx)("div",{className:"mt-6 text-center",children:(0,r.jsxs)("p",{className:"text-text-muted",children:["Don't have an account?"," ",(0,r.jsx)("a",{href:"/signup",className:"text-accent-cyan hover:underline font-medium",children:"Sign up"})]})}),(0,r.jsx)("div",{className:"mt-4 text-center",children:(0,r.jsx)("a",{href:"/",className:"text-text-muted hover:text-white transition-colors text-sm",children:"Back to home"})})]})]})}function d(){return(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)(c,{}),children:(0,r.jsx)(l,{})})}},5634:function(e,t,n){"use strict";n.d(t,{K7:function(){return s}});var r=n(7573);function s(e){let{size:t=24,className:n="",withGlow:s=!1}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"\n transition-all duration-300\n ".concat(s?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(n,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,r.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,r.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,r.jsx)("path",{d:"M50 20 C 80 20 80 50 50 50 L 80 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:"0.7"})]})}n(7653)}},function(e){e.O(0,[5888,1293,1528,1744],function(){return e(e.s=957)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2860],{2205:function(e,t,s){Promise.resolve().then(s.bind(s,3082))},3082:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var r=s(7573),n=s(7653),a=s(8146),l=s(5118);let c=["#4a9eff","#b388ff","#ff9e40","#00e676","#ff5c5c","#00ffc8"];function i(e){let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);return c[Math.abs(t)%c.length]}function o(e){return e.slice(0,2).toUpperCase()}function d(e){return e<60?"".concat(e,"s"):e<3600?"".concat(Math.floor(e/60),"m"):e<86400?"".concat(Math.floor(e/3600),"h ").concat(Math.floor(e%3600/60),"m"):"".concat(Math.floor(e/86400),"d ").concat(Math.floor(e%86400/3600),"h")}function x(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function m(){var e,t,s,c;let[i,o]=(0,n.useState)(null),[m,N]=(0,n.useState)(null),[M,L]=(0,n.useState)(null),[S,A]=(0,n.useState)(!0),[B,C]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{let e=()=>{try{let e=localStorage.getItem("dashboard-settings");if(e){let t=JSON.parse(e).theme||"dark";"system"===t&&(t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");let s=document.documentElement;s.classList.remove("theme-light","theme-dark"),s.classList.add("theme-".concat(t)),s.style.colorScheme=t}}catch(e){}};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,n.useEffect)(()=>{let e=(0,l.$3)(),t=async()=>{try{let t=await fetch("/api/auth/session",{credentials:"include"});if(404!==t.status&&(C(!0),!e))return window.location.href="/app",!1;return!0}catch(e){return!0}},s=async()=>{try{if(!await t())return;let[e,s]=await Promise.all([fetch((0,l.kG)("/api/metrics"),{credentials:"include"}),fetch((0,l.kG)("/api/metrics/agents"),{credentials:"include"})]);if(!e.ok)throw Error("Failed to fetch metrics");let r=await e.json();if(o(r),s.ok){let e=await s.json();N(e)}L(null)}catch(e){L(e instanceof Error?e.message:"Failed to load metrics")}finally{A(!1)}};s();let r=setInterval(s,5e3);return()=>clearInterval(r)},[]),S)return(0,r.jsx)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[(0,r.jsx)("div",{className:"w-8 h-8 border-2 border-border border-t-accent rounded-full animate-spin"}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"Loading metrics..."})]})});if(M||!i)return(0,r.jsx)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-error/10 flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-6 h-6 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,r.jsx)("p",{className:"text-text-secondary",children:M||"No metrics available"}),(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"px-5 py-2.5 bg-accent text-white rounded-lg text-sm font-medium transition-colors hover:bg-accent-hover",children:"Retry"})]})});let E=(null!==(s=null===(e=i.sessions)||void 0===e?void 0:e.errorRate)&&void 0!==s?s:0)<=1?"healthy":(null!==(c=null===(t=i.sessions)||void 0===t?void 0:t.errorRate)&&void 0!==c?c:0)<=5?"warning":"critical";return(0,r.jsxs)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 bg-sidebar-bg border-b border-sidebar-border px-4 md:px-8 py-4",children:(0,r.jsxs)("div",{className:"max-w-[1400px] mx-auto flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)(a.default,{href:"/app",className:"flex items-center gap-2 text-text-muted text-sm font-medium px-3 py-2 rounded-md transition-all hover:text-accent hover:bg-accent/10",children:[(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Dashboard"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-accent/80 to-accent rounded-lg flex items-center justify-center border border-accent/30",children:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",children:[(0,r.jsx)("path",{d:"M3 3v18h18"}),(0,r.jsx)("path",{d:"M18 17V9"}),(0,r.jsx)("path",{d:"M13 17V5"}),(0,r.jsx)("path",{d:"M8 17v-3"})]})}),(0,r.jsxs)("div",{className:"text-lg font-semibold tracking-tight",children:["Agent ",(0,r.jsx)("span",{className:"text-accent",children:"Metrics"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-success/10 border border-success/30 rounded-full",children:[(0,r.jsx)("span",{className:"w-2 h-2 bg-success rounded-full animate-pulse shadow-[0_0_8px_rgba(43,172,118,0.5)]"}),(0,r.jsx)("span",{className:"text-success text-xs font-semibold font-mono tracking-wide",children:"LIVE"})]})]})}),(0,r.jsxs)("main",{className:"max-w-[1400px] mx-auto px-4 md:px-8 py-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,r.jsx)(u,{label:"Total Agents",value:i.totalAgents,subtext:"".concat(i.onlineAgents," online / ").concat(i.offlineAgents," offline"),accent:"cyan"}),(0,r.jsx)(u,{label:"Online Now",value:i.onlineAgents,subtext:"".concat(i.totalAgents>0?Math.round(i.onlineAgents/i.totalAgents*100):0,"% availability"),accent:"green"}),(0,r.jsx)(u,{label:"Total Messages",value:i.totalMessages.toLocaleString(),subtext:"all time",accent:"purple"}),(0,r.jsx)(u,{label:"Avg. Throughput",value:i.throughput.avgMessagesPerMinute,subtext:"messages / minute",accent:"orange"})]}),(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsx)(h,{title:"Message Throughput"}),(0,r.jsx)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,r.jsx)(g,{value:i.throughput.messagesLastMinute,label:"Last Minute",max:10}),(0,r.jsx)(g,{value:i.throughput.messagesLastHour,label:"Last Hour",max:100}),(0,r.jsx)(g,{value:i.throughput.messagesLast24Hours,label:"Last 24 Hours",max:1e3}),(0,r.jsx)(g,{value:i.throughput.avgMessagesPerMinute,label:"Avg / Min",max:5})]})})]}),i.sessions&&(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)(h,{title:"Session Lifecycle"}),(0,r.jsx)(p,{rate:i.sessions.errorRate||0,status:E})]}),(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-5 mb-6",children:[(0,r.jsx)(b,{value:i.sessions.totalSessions,label:"Total Sessions",accent:"purple"}),(0,r.jsx)(b,{value:i.sessions.activeSessions,label:"Active",accent:"blue"}),(0,r.jsx)(b,{value:i.sessions.closedByAgent,label:"Clean Close",accent:"green"}),(0,r.jsx)(b,{value:i.sessions.closedByDisconnect,label:"Disconnect",accent:"orange"}),(0,r.jsx)(b,{value:i.sessions.closedByError,label:"Error",accent:"red"})]}),i.sessions.recentSessions&&i.sessions.recentSessions.length>0&&(0,r.jsx)("div",{className:"overflow-x-auto -mx-6 px-6",children:(0,r.jsxs)("table",{className:"w-full min-w-[500px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Agent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Status"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Messages"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Started"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Duration"})]})}),(0,r.jsx)("tbody",{children:i.sessions.recentSessions.slice(0,5).map((e,t)=>{let s=new Date(e.startedAt),n=Math.floor(((e.endedAt?new Date(e.endedAt):new Date).getTime()-s.getTime())/1e3);return(0,r.jsxs)("tr",{className:"border-b border-border/50 last:border-0",children:[(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(f,{name:e.agentName})}),(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(v,{closedBy:e.closedBy})}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent",children:e.messageCount}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:x(e.startedAt)}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:d(n)})]},t)})})]})})]})]}),(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsx)(h,{title:"Agent Health"}),(0,r.jsx)("div",{className:"bg-bg-secondary border border-border rounded-lg overflow-hidden",children:0===i.agents.length?(0,r.jsxs)("div",{className:"py-12 text-center",children:[(0,r.jsxs)("svg",{className:"w-12 h-12 mx-auto mb-4 text-text-muted opacity-50",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"No agents registered yet"})]}):(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[700px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"bg-bg-tertiary border-b border-border",children:[(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Agent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Status"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Sent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Received"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Uptime"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Last Seen"})]})}),(0,r.jsx)("tbody",{children:i.agents.map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/50 last:border-0 transition-colors hover:bg-bg-hover",children:[(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(f,{name:e.name})}),(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(j,{isOnline:e.isOnline})}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent",children:e.messagesSent.toLocaleString()}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent-purple",children:e.messagesReceived.toLocaleString()}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:d(e.uptimeSeconds)}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:x(e.lastSeen)})]},e.name))})]})})})]}),m&&m.agents.length>0&&(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)(h,{title:"Agent Memory & Resources"}),m.system&&(0,r.jsx)(y,{system:m.system})]}),(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,r.jsx)(w,{label:"Total Agents",value:m.agents.length,subtext:"being monitored",accent:"cyan"}),(0,r.jsx)(w,{label:"Healthy",value:m.agents.filter(e=>"normal"===e.alertLevel).length,subtext:"normal memory",accent:"green"}),(0,r.jsx)(w,{label:"Warning",value:m.agents.filter(e=>"warning"===e.alertLevel).length,subtext:"elevated usage",accent:"orange"}),(0,r.jsx)(w,{label:"Critical",value:m.agents.filter(e=>"critical"===e.alertLevel||"oom_imminent"===e.alertLevel).length,subtext:"needs attention",accent:"red"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:m.agents.map(e=>(0,r.jsx)(k,{agent:e},e.name))})]})]}),(0,r.jsxs)("div",{className:"text-center py-4 text-text-muted text-xs font-mono",children:["Last updated: ",x(i.timestamp)]})]})]})}function u(e){let{label:t,value:s,subtext:n,accent:a}=e;return(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-5 transition-all hover:border-border-dark hover:bg-bg-tertiary group",children:[(0,r.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:t}),(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({cyan:"text-accent",green:"text-success",purple:"text-accent-purple",orange:"text-warning"}[a]," transition-transform group-hover:scale-105 origin-left"),children:s}),(0,r.jsx)("div",{className:"text-xs text-text-muted font-mono mt-2",children:n})]})}function h(e){let{title:t}=e;return(0,r.jsxs)("h2",{className:"flex items-center gap-2.5 text-xs font-semibold uppercase tracking-wider text-text-muted mb-3",children:[(0,r.jsx)("span",{className:"w-[3px] h-3.5 bg-accent rounded-sm"}),t]})}function g(e){let{value:t,label:s,max:n}=e,a=Math.min(t/n*100,100);return(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"font-mono text-4xl font-bold text-accent leading-none",children:t}),(0,r.jsx)("div",{className:"text-xs text-text-muted uppercase tracking-wide mt-2",children:s}),(0,r.jsx)("div",{className:"h-1 bg-border rounded-full mt-3 overflow-hidden",children:(0,r.jsx)("div",{className:"h-full bg-gradient-to-r from-accent to-accent-purple rounded-full transition-all duration-500",style:{width:"".concat(a,"%")}})})]})}function b(e){let{value:t,label:s,accent:n}=e;return(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({purple:"text-accent-purple",blue:"text-accent",green:"text-success",orange:"text-warning",red:"text-error"}[n]," leading-none"),children:t}),(0,r.jsx)("div",{className:"text-[11px] text-text-muted uppercase tracking-wide mt-2",children:s})]})}function p(e){let{rate:t,status:s}=e;return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold font-mono border ".concat({healthy:"bg-success/15 text-success border-success/30",warning:"bg-warning/15 text-warning border-warning/30",critical:"bg-error/15 text-error border-error/30"}[s]),children:[t.toFixed(1),"% error rate"]})}function f(e){let{name:t}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-white text-xs font-semibold",style:{backgroundColor:i(t)},children:o(t)}),(0,r.jsx)("span",{className:"font-semibold font-mono text-sm",children:t})]})}function j(e){let{isOnline:t}=e;return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ".concat(t?"bg-success/15 text-success":"bg-bg-hover text-text-muted"),children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(t?"bg-success":"bg-text-muted")}),t?"Online":"Offline"]})}function v(e){let{closedBy:t}=e,s={agent:{label:"Clean",className:"bg-success/15 text-success"},disconnect:{label:"Disconnect",className:"bg-warning/15 text-warning"},error:{label:"Error",className:"bg-error/15 text-error"},active:{label:"Active",className:"bg-accent/15 text-accent"}}[t||"active"];return(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-lg text-[11px] font-medium ".concat(s.className),children:s.label})}function N(e){if(0===e)return"0 B";let t=Math.floor(Math.log(Math.abs(e))/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(1)," ").concat(["B","KB","MB","GB","TB"][t])}function y(e){let{system:t}=e,s=Math.round((t.totalMemory-t.freeMemory)/t.totalMemory*100);return(0,r.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5 bg-bg-tertiary border border-border rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("svg",{className:"w-4 h-4 text-accent",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),(0,r.jsx)("rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",fill:"currentColor",opacity:"0.3"})]}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"System:"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-24 h-2 bg-border rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all ".concat(s>90?"bg-error":s>70?"bg-warning":"bg-accent"),style:{width:"".concat(s,"%")}})}),(0,r.jsxs)("span",{className:"text-xs font-mono text-text-muted",children:[s,"%"]})]}),(0,r.jsxs)("span",{className:"text-xs font-mono text-text-muted",children:[N(t.freeMemory)," free"]})]})}function w(e){let{label:t,value:s,subtext:n,accent:a}=e;return(0,r.jsxs)("div",{className:"bg-bg-tertiary border border-border/50 rounded-lg p-4 text-center",children:[(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({cyan:"text-accent",green:"text-success",orange:"text-warning",red:"text-error"}[a]," leading-none"),children:s}),(0,r.jsx)("div",{className:"text-[11px] text-text-muted uppercase tracking-wide mt-2",children:t}),(0,r.jsx)("div",{className:"text-xs text-text-muted mt-1",children:n})]})}function k(e){var t;let{agent:s}=e,n=s.rssBytes?s.rssBytes/1048576:0,a={normal:{bg:"bg-success/10",border:"border-success/30",text:"text-success",label:"Healthy"},warning:{bg:"bg-warning/10",border:"border-warning/30",text:"text-warning",label:"Warning"},critical:{bg:"bg-error/10",border:"border-error/30",text:"text-error",label:"Critical"},oom_imminent:{bg:"bg-error/20",border:"border-error/50",text:"text-error",label:"OOM Risk"}}[s.alertLevel||"normal"],l={growing:{icon:"↑",color:"text-warning",label:"Growing"},stable:{icon:"→",color:"text-success",label:"Stable"},shrinking:{icon:"↓",color:"text-accent",label:"Shrinking"},unknown:{icon:"?",color:"text-text-muted",label:"Unknown"}}[s.trend||"unknown"];return(0,r.jsxs)("div",{className:"".concat(a.bg," border ").concat(a.border," rounded-lg p-4 transition-all hover:scale-[1.01]"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white text-sm font-semibold",style:{backgroundColor:i(s.name)},children:o(s.name)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold font-mono text-sm text-text-primary",children:s.name}),(0,r.jsxs)("div",{className:"text-xs text-text-muted",children:["PID: ",s.pid||"N/A"," • ",s.status]})]})]}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ".concat(a.bg," ").concat(a.text),children:a.label})})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Memory Usage"}),(0,r.jsx)("span",{className:"text-sm font-mono font-semibold text-text-primary",children:N(s.rssBytes||0)})]}),(0,r.jsx)("div",{className:"h-3 bg-bg-primary rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all duration-500 ".concat("critical"===s.alertLevel||"oom_imminent"===s.alertLevel?"bg-gradient-to-r from-error to-error/70":"warning"===s.alertLevel?"bg-gradient-to-r from-warning to-warning/70":"bg-gradient-to-r from-accent to-accent-purple"),style:{width:"".concat(Math.min(n/2048*100,100),"%")}})}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"0"}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"2 GB"})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("div",{className:"text-lg font-mono font-bold text-accent",children:[(null===(t=s.cpuPercent)||void 0===t?void 0:t.toFixed(1))||"0","%"]}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"CPU"})]}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("div",{className:"text-lg font-mono font-bold ".concat(l.color," flex items-center justify-center gap-1"),children:[(0,r.jsx)("span",{children:l.icon}),(0,r.jsx)("span",{className:"text-xs",children:l.label})]}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"Trend"})]}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"text-lg font-mono font-bold text-accent-purple",children:N(s.highWatermark||0)}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"Peak"})]})]}),s.uptimeMs&&(0,r.jsxs)("div",{className:"mt-3 pt-3 border-t border-border/30 flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Uptime"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted",children:d(Math.floor(s.uptimeMs/1e3))})]})]})}}},function(e){e.O(0,[3663,5118,1293,1528,1744],function(){return e(e.s=2205)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{7905:function(e,t,n){Promise.resolve().then(n.bind(n,1403))},1403:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var r=n(7573),u=n(7653),a=n(717),c=n(1028);function l(){let[e,t]=(0,u.useState)(!1),[n,l]=(0,u.useState)(!1);return((0,u.useEffect)(()=>{t(function(){let e=window.location.hostname,t=new URLSearchParams(window.location.search);if("true"===t.get("landing")||"true"===t.get("cloud")||e.includes("agent-relay.com")||e.includes("agentrelay.dev")||e.includes(".fly.dev"))return!0;let n=document.querySelector('meta[name="agent-relay-cloud"]');return(null==n?void 0:n.getAttribute("content"))==="true"||"true"===localStorage.getItem("agent-relay-cloud-mode")}()),l(!0)},[]),n)?e?(0,r.jsx)(a.fy,{}):(0,r.jsx)(c.gV,{enableReactions:!0}):(0,r.jsx)("div",{className:"flex h-screen bg-bg-deep font-sans text-text-primary items-center justify-center",children:(0,r.jsx)("div",{className:"text-text-muted",children:"Loading..."})})}}},function(e){e.O(0,[3694,3440,6940,3677,1695,5118,1705,1028,1293,1528,1744],function(){return e(e.s=7905)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9979],{7971:function(n,u,e){Promise.resolve().then(e.bind(e,2691))},2691:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.Wv,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=7971)}),_N_E=n.O()}]);
|
package/out/_next/static/chunks/app/privacy/{page-c21d51ac2dee3a88.js → page-a49ab271cc686644.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[385],{2711:function(n,u,e){Promise.resolve().then(e.bind(e,4335))},4335:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.IW,{})}}},function(n){n.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[385],{2711:function(n,u,e){Promise.resolve().then(e.bind(e,4335))},4335:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.IW,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=2711)}),_N_E=n.O()}]);
|
package/out/_next/static/chunks/app/providers/{page-59114505f4353512.js → page-d775d6eb5bc29e96.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{1125:function(e,t,r){Promise.resolve().then(r.bind(r,9835))},1695:function(e,t,r){"use strict";var n=r(1219);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},4859:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(9566)},9566:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c=[],l=!1,d=-1;function u(){l&&n&&(l=!1,n.length?c=n.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=a(u);l=!0;for(var t=c.length;t;){for(n=c,c=[];++d<t;)n&&n[d].run();d=-1,t=c.length}n=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||a(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},9835:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(7573),i=r(7653),o=r(1695),s=r(5634),a=r(9175);let c=[{id:"anthropic",name:"Anthropic",displayName:"Claude",color:"#D97757",cliCommand:"claude",requiresUrlCopy:!0},{id:"codex",name:"OpenAI",displayName:"Codex",color:"#10A37F",cliCommand:"codex login",requiresUrlCopy:!0},{id:"google",name:"Google",displayName:"Gemini",color:"#4285F4",cliCommand:"gemini"},{id:"opencode",name:"OpenCode",displayName:"OpenCode",color:"#00D4AA",cliCommand:"opencode",comingSoon:!0},{id:"droid",name:"Factory",displayName:"Droid",color:"#6366F1",cliCommand:"droid",comingSoon:!0},{id:"cursor",name:"Cursor",displayName:"Cursor",color:"#7C3AED",cliCommand:"agent",requiresUrlCopy:!0}];function l(){return(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading providers..."})]})})}function d(){let e=(0,o.useSearchParams)().get("workspace"),[t,r]=(0,i.useState)(!0),[l,d]=(0,i.useState)(null),[u,m]=(0,i.useState)(null),[p,h]=(0,i.useState)([]);return((0,i.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/providers",{credentials:"include"}),t=e.headers.get("X-CSRF-Token");if(t&&m(t),!e.ok){if(401===e.status){window.location.href="/login";return}throw Error("Failed to fetch providers")}let r=((await e.json()).providers||[]).filter(e=>e.isConnected&&"github"!==e.id).map(e=>e.id);h(r)}catch(e){d(e instanceof Error?e.message:"Failed to load providers")}finally{r(!1)}})()},[]),t)?(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading providers..."})]})}):(0,n.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 opacity-10 pointer-events-none",children:(0,n.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,n.jsxs)("div",{className:"relative z-10 w-full max-w-xl",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)(s.K7,{size:48,withGlow:!0}),(0,n.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Connect AI Providers"}),(0,n.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Connect your AI providers to start using agents."})]}),l&&(0,n.jsx)("div",{className:"mb-4 p-4 bg-error/10 border border-error/20 rounded-xl",children:(0,n.jsx)("p",{className:"text-error",children:l})}),!e&&(0,n.jsx)("div",{className:"mb-4 p-4 bg-warning/10 border border-warning/20 rounded-xl",children:(0,n.jsxs)("p",{className:"text-warning text-sm",children:[(0,n.jsx)("strong",{children:"Note:"})," CLI-based authentication requires a running workspace. Please"," ",(0,n.jsx)("a",{href:"/app",className:"underline hover:no-underline",children:"create a workspace"})," first."]})}),e?(0,n.jsx)(a.c,{providers:c,connectedProviders:p,workspaceId:e,csrfToken:u||void 0,onProviderConnected:e=>{h(t=>[...new Set([...t,e])])},onContinue:()=>{window.location.href=e?"/app?workspace=".concat(e):"/app"},showDetailedInfo:!0}):(0,n.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6 text-center",children:[(0,n.jsx)("p",{className:"text-text-muted mb-4",children:"A workspace is required to connect providers via CLI authentication."}),(0,n.jsx)("a",{href:"/app",className:"inline-block py-3 px-6 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-xl hover:shadow-glow-cyan transition-all",children:"Create a Workspace"})]})]})]})}function u(){return(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(l,{}),children:(0,n.jsx)(d,{})})}},8514:function(e,t,r){"use strict";r.d(t,{X:function(){return n}});var n=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),s={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},a=s.top+s.bottom;return{cols:Math.max(2,Math.floor((i-(s.right+s.left)-t)/e.css.cell.width)),rows:Math.max(1,Math.floor((n-a)/e.css.cell.height))}}}}},function(e){e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{1125:function(e,t,r){Promise.resolve().then(r.bind(r,9835))},1695:function(e,t,r){"use strict";var n=r(1219);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},4859:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(9566)},9566:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c=[],l=!1,d=-1;function u(){l&&n&&(l=!1,n.length?c=n.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=a(u);l=!0;for(var t=c.length;t;){for(n=c,c=[];++d<t;)n&&n[d].run();d=-1,t=c.length}n=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||a(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},9835:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(7573),i=r(7653),o=r(1695),s=r(5634),a=r(9175);let c=[{id:"anthropic",name:"Anthropic",displayName:"Claude",color:"#D97757",cliCommand:"claude",requiresUrlCopy:!0},{id:"codex",name:"OpenAI",displayName:"Codex",color:"#10A37F",cliCommand:"codex login",requiresUrlCopy:!0},{id:"google",name:"Google",displayName:"Gemini",color:"#4285F4",cliCommand:"gemini"},{id:"opencode",name:"OpenCode",displayName:"OpenCode",color:"#00D4AA",cliCommand:"opencode",comingSoon:!0},{id:"droid",name:"Factory",displayName:"Droid",color:"#6366F1",cliCommand:"droid",comingSoon:!0},{id:"cursor",name:"Cursor",displayName:"Cursor",color:"#7C3AED",cliCommand:"agent",requiresUrlCopy:!0}];function l(){return(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading providers..."})]})})}function d(){let e=(0,o.useSearchParams)().get("workspace"),[t,r]=(0,i.useState)(!0),[l,d]=(0,i.useState)(null),[u,m]=(0,i.useState)(null),[p,h]=(0,i.useState)([]);return((0,i.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/providers",{credentials:"include"}),t=e.headers.get("X-CSRF-Token");if(t&&m(t),!e.ok){if(401===e.status){window.location.href="/login";return}throw Error("Failed to fetch providers")}let r=((await e.json()).providers||[]).filter(e=>e.isConnected&&"github"!==e.id).map(e=>e.id);h(r)}catch(e){d(e instanceof Error?e.message:"Failed to load providers")}finally{r(!1)}})()},[]),t)?(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading providers..."})]})}):(0,n.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 opacity-10 pointer-events-none",children:(0,n.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,n.jsxs)("div",{className:"relative z-10 w-full max-w-xl",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)(s.K7,{size:48,withGlow:!0}),(0,n.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Connect AI Providers"}),(0,n.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Connect your AI providers to start using agents."})]}),l&&(0,n.jsx)("div",{className:"mb-4 p-4 bg-error/10 border border-error/20 rounded-xl",children:(0,n.jsx)("p",{className:"text-error",children:l})}),!e&&(0,n.jsx)("div",{className:"mb-4 p-4 bg-warning/10 border border-warning/20 rounded-xl",children:(0,n.jsxs)("p",{className:"text-warning text-sm",children:[(0,n.jsx)("strong",{children:"Note:"})," CLI-based authentication requires a running workspace. Please"," ",(0,n.jsx)("a",{href:"/app",className:"underline hover:no-underline",children:"create a workspace"})," first."]})}),e?(0,n.jsx)(a.c,{providers:c,connectedProviders:p,workspaceId:e,csrfToken:u||void 0,onProviderConnected:e=>{h(t=>[...new Set([...t,e])])},onContinue:()=>{window.location.href=e?"/app?workspace=".concat(e):"/app"},showDetailedInfo:!0}):(0,n.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6 text-center",children:[(0,n.jsx)("p",{className:"text-text-muted mb-4",children:"A workspace is required to connect providers via CLI authentication."}),(0,n.jsx)("a",{href:"/app",className:"inline-block py-3 px-6 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-xl hover:shadow-glow-cyan transition-all",children:"Create a Workspace"})]})]})]})}function u(){return(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(l,{}),children:(0,n.jsx)(d,{})})}},8514:function(e,t,r){"use strict";r.d(t,{X:function(){return n}});var n=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),s={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},a=s.top+s.bottom;return{cols:Math.max(2,Math.floor((i-(s.right+s.left)-t)/e.css.cell.width)),rows:Math.max(1,Math.floor((n-a)/e.css.cell.height))}}}}},function(e){e.O(0,[3440,7894,9175,1293,1528,1744],function(){return e(e.s=1125)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4668],{3935:function(e,t,r){Promise.resolve().then(r.bind(r,7104))},1695:function(e,t,r){"use strict";var n=r(1219);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},4859:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(9566)},9566:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c=[],l=!1,d=-1;function u(){l&&n&&(l=!1,n.length?c=n.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=i(u);l=!0;for(var t=c.length;t;){for(n=c,c=[];++d<t;)n&&n[d].run();d=-1,t=c.length}n=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||i(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={exports:{}},a=!0;try{t[e](s,s.exports,n),a=!1}finally{a&&delete r[e]}return s.exports}n.ab="//";var o=n(229);e.exports=o}()},7104:function(e,t,r){"use strict";r.d(t,{ProviderSetupClient:function(){return u}});var n=r(7573),o=r(7653),s=r(1695),a=r(5634),i=r(1994),c=r(4722);let l={claude:{id:"claude",name:"anthropic",displayName:"Claude",color:"#D97706",agentCommand:"claude"},codex:{id:"codex",name:"codex",displayName:"Codex",color:"#10A37F",agentCommand:"codex"},cursor:{id:"cursor",name:"cursor",displayName:"Cursor",color:"#7C3AED",agentCommand:"cursor"}},d={anthropic:{authMethod:"oauth",requiresUrlCopy:!0},codex:{authMethod:"oauth",requiresUrlCopy:!0},openai:{authMethod:"oauth",requiresUrlCopy:!0},cursor:{authMethod:"oauth",requiresUrlCopy:!0},google:{authMethod:"terminal"},opencode:{authMethod:"terminal"},droid:{authMethod:"terminal"}};function u(e){let{provider:t}=e,r=(0,s.useRouter)(),u=(0,s.useSearchParams)().get("workspace")||void 0,[m,p]=(0,o.useState)(null),[h,x]=(0,o.useState)(u?"cli":"api_key"),[f,b]=(0,o.useState)(""),[y,g]=(0,o.useState)(null),[v,w]=(0,o.useState)(null),[k,N]=(0,o.useState)(!1),j=l[t];(0,o.useEffect)(()=>{fetch("/api/auth/session",{credentials:"include"}).then(e=>{let t=e.headers.get("X-CSRF-Token");t&&p(t)}).catch(()=>{})},[]);let C=u?"/app?workspace=".concat(u):"/app/onboarding",_=(0,o.useCallback)(()=>{r.push(C)},[r,C]),I=(0,o.useCallback)(()=>{r.push(C)},[r,C]),P=(0,o.useCallback)(()=>{if(u){r.push("/providers?workspace=".concat(u));return}r.push("/app/onboarding")},[r,u]),S=(0,o.useMemo)(()=>["anthropic","codex","openai","google"].includes((null==j?void 0:j.name)||""),[null==j?void 0:j.name]),T=j?d[j.name]:void 0,A=(null==T?void 0:T.authMethod)==="oauth",E=(0,o.useCallback)(async()=>{if(j){if(!f.trim()){g("Please enter an API key");return}N(!0),g(null),w(null);try{let e={"Content-Type":"application/json"};m&&(e["X-CSRF-Token"]=m);let t="codex"===j.name?["openai","codex"]:[j.name],r=!1,n="Failed to connect API key";for(let o of t){let t={apiKey:f.trim()};u&&(t.workspaceId=u);let s=await fetch("/api/providers/".concat(o,"/api-key"),{method:"POST",credentials:"include",headers:e,body:JSON.stringify(t)});if(s.ok){r=!0;break}let a=await s.json().catch(()=>({}));n=a.error||a.message||"Failed to connect API key"}if(!r)throw Error(n);b(""),w("".concat(j.displayName," connected successfully.")),setTimeout(()=>{_()},800)}catch(e){g(e instanceof Error?e.message:"Failed to connect API key")}finally{N(!1)}}},[f,j,m,_,u]);return j?(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] p-8",children:(0,n.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,n.jsxs)("a",{href:"/app",className:"flex items-center gap-3 group",children:[(0,n.jsx)(a.K7,{className:"w-8 h-8 text-accent-cyan group-hover:scale-105 transition-transform"}),(0,n.jsx)("span",{className:"text-lg font-bold text-white",children:"Agent Relay"})]}),(0,n.jsx)("a",{href:C,className:"px-4 py-2 text-sm text-text-secondary hover:text-text-primary transition-colors",children:"Skip for now →"})]}),(0,n.jsxs)("div",{className:"text-center mb-8",children:[(0,n.jsxs)("div",{className:"inline-flex items-center gap-3 mb-4",children:[(0,n.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white font-bold text-xl shadow-lg",style:{backgroundColor:j.color,boxShadow:"0 4px 20px ".concat(j.color,"40")},children:j.displayName[0]}),(0,n.jsxs)("h1",{className:"text-2xl font-bold text-white",children:["Set up ",j.displayName]})]}),(0,n.jsx)("p",{className:"text-text-muted",children:u?"Authenticate provider access for this workspace.":"Authenticate provider access during onboarding before workspace provisioning."})]}),S&&(0,n.jsxs)("div",{className:"mb-6 flex gap-2 p-1 bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-xl",children:[(0,n.jsx)("button",{onClick:()=>x("api_key"),className:"flex-1 py-2.5 px-4 rounded-lg text-sm transition-colors ".concat("api_key"===h?"bg-accent-cyan text-bg-deep font-semibold":"text-text-muted hover:text-white"),children:"API Key Input"}),(0,n.jsx)("button",{onClick:()=>x("cli"),className:"flex-1 py-2.5 px-4 rounded-lg text-sm transition-colors ".concat("cli"===h?"bg-accent-cyan text-bg-deep font-semibold":"text-text-muted hover:text-white"),children:"Authenticate via CLI"})]}),S&&"api_key"===h?(0,n.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6 shadow-2xl space-y-4",children:[(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["Enter your ",j.displayName," API key. In onboarding mode, this is stored at the user level and reused during workspace provisioning."]}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("input",{type:"password",value:f,onChange:e=>b(e.target.value),placeholder:"Enter ".concat(j.displayName," API key"),className:"flex-1 px-4 py-3 bg-bg-tertiary border border-border-subtle rounded-lg text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:border-accent-cyan focus:ring-1 focus:ring-accent-cyan/30 transition-all"}),(0,n.jsx)("button",{onClick:E,disabled:k||!f.trim(),className:"px-5 py-3 bg-accent-cyan text-bg-deep font-semibold rounded-lg text-sm hover:bg-accent-cyan/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:k?"Connecting...":"Connect"})]}),y&&(0,n.jsx)("div",{className:"p-3 bg-error/10 border border-error/30 rounded-lg text-sm text-error",children:y}),v&&(0,n.jsx)("div",{className:"p-3 bg-success/10 border border-success/30 rounded-lg text-sm text-success",children:v})]}):A?(0,n.jsx)(c.j,{provider:{id:j.name,name:j.name,displayName:j.displayName,color:j.color,requiresUrlCopy:null==T?void 0:T.requiresUrlCopy},workspaceId:u,mode:u?"workspace":"onboarding",csrfToken:m||void 0,showManualDone:!u,onSuccess:_,onCancel:I,onError:e=>{g(e)}}):u?(0,n.jsx)(i.$,{provider:{id:j.id,name:j.name,displayName:j.displayName,color:j.color},workspaceId:u,maxHeight:"500px",showHeader:!0,onSuccess:_,onCancel:I,onConnectAnother:P,onError:e=>g(e),className:"shadow-2xl"}):(0,n.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6 text-center",children:(0,n.jsx)("p",{className:"text-text-muted text-sm",children:"Interactive terminal setup requires a workspace. Use API key input or CLI authentication for onboarding mode."})}),(0,n.jsxs)("div",{className:"mt-6 p-4 bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-xl",children:[(0,n.jsx)("h3",{className:"text-white font-medium mb-2",children:"How this works:"}),"api_key"===h&&S?(0,n.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,n.jsx)("li",{children:"Paste your provider API key"}),(0,n.jsx)("li",{children:"Click connect to store credentials securely"}),(0,n.jsx)("li",{children:"Continue back to onboarding or dashboard"})]}):(0,n.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,n.jsx)("li",{children:"Copy the command shown and run it in your terminal"}),(0,n.jsx)("li",{children:"Complete the authentication flow in browser/CLI"}),(0,n.jsx)("li",{children:"Return here and continue once connected"})]})]}),(0,n.jsx)("div",{className:"mt-4 text-center",children:(0,n.jsx)("a",{href:u?"/providers?connect=".concat(j.id,"&workspace=").concat(u):"/app/onboarding",className:"text-sm text-text-muted hover:text-accent-cyan transition-colors",children:"Having trouble? Try another connection method →"})})]})}):(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("p",{className:"text-error",children:["Unknown provider: ",t]}),(0,n.jsx)("a",{href:"/providers",className:"mt-4 text-accent-cyan hover:underline",children:"Back to providers"})]})})}},8514:function(e,t,r){"use strict";r.d(t,{X:function(){return n}});var n=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),s=window.getComputedStyle(this._terminal.element),a={top:parseInt(s.getPropertyValue("padding-top")),bottom:parseInt(s.getPropertyValue("padding-bottom")),right:parseInt(s.getPropertyValue("padding-right")),left:parseInt(s.getPropertyValue("padding-left"))},i=a.top+a.bottom;return{cols:Math.max(2,Math.floor((o-(a.right+a.left)-t)/e.css.cell.width)),rows:Math.max(1,Math.floor((n-i)/e.css.cell.height))}}}}},function(e){e.O(0,[3440,7894,1293,1528,1744],function(){return e(e.s=3935)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1127],{4349:function(n,u,e){Promise.resolve().then(e.bind(e,1297))},1297:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.YW,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=4349)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{4433:function(e,t,s){Promise.resolve().then(s.bind(s,9688))},9688:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return o}});var n=s(7573),r=s(7653),a=s(5888),i=s(5634);function o(){let[e,t]=(0,r.useState)("github"),[s,o]=(0,r.useState)(!1),[c,l]=(0,r.useState)(!1),[d,u]=(0,r.useState)(""),[x,h]=(0,r.useState)(""),[m,p]=(0,r.useState)("/app"),[f,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(""),[j,w]=(0,r.useState)(""),[v,N]=(0,r.useState)(""),[k,C]=(0,r.useState)(""),L=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let e=await fetch("/api/auth/session",{credentials:"include"});if((await e.json()).authenticated){await S();return}}catch(e){}try{let t=await fetch("/api/auth/nango/login-session",{credentials:"include"}),s=await t.json();if(!e)return;if(!t.ok||!s.sessionToken){o(!0);return}L.current=new a.ZP({connectSessionToken:s.sessionToken}),o(!0)}catch(t){e&&(console.error("Init error:",t),o(!0))}})(),()=>{e=!1}},[]);let S=async()=>{u("Setting up your account...");try{let e=await fetch("/api/github-app/repos",{credentials:"include"}),t=await e.json();t.repositories&&t.repositories.length>0?p("/app"):p("/connect-repos"),b(!0),setTimeout(()=>{window.location.href=t.repositories&&t.repositories.length>0?"/app":"/connect-repos"},1500)}catch(e){console.error("Error checking repos:",e),p("/connect-repos"),b(!0),setTimeout(()=>{window.location.href="/connect-repos"},1500)}},A=async e=>{let t=await fetch("/api/auth/nango/login-status/".concat(e),{credentials:"include"});if(!t.ok)throw Error("Auth status not ready");return t.json()},P=async e=>{try{u("Completing authentication...");let t=Date.now(),s=async()=>{if(Date.now()-t>3e4)throw Error("Authentication timed out. Please try again.");try{let t=await A(e);if(t&&t.ready){if(t.needsEmail){window.location.href="/complete-profile";return}await S();return}return await new Promise(e=>setTimeout(e,1e3)),s()}catch(e){return await new Promise(e=>setTimeout(e,1e3)),s()}};await s()}catch(e){console.error("[AUTH] Authentication error:",e),h(e instanceof Error?e.message:"Authentication failed"),l(!1),u("")}},T=async()=>{if(!L.current){h("GitHub signup not available. Please use email signup or refresh the page.");return}l(!0),h(""),u("Connecting to GitHub...");try{let e=await L.current.auth("github");if(e&&"connectionId"in e)await P(e.connectionId);else throw Error("No connection ID returned")}catch(t){var e;if(console.error("GitHub auth error:",t),"user_cancelled"===t.type||(null===(e=t.message)||void 0===e?void 0:e.includes("closed"))){l(!1),u(""),fetch("/api/auth/nango/login-session",{credentials:"include"}).then(e=>e.json()).then(e=>{e.sessionToken&&(L.current=new a.ZP({connectSessionToken:e.sessionToken}),o(!0))});return}h(t.message||"Authentication failed"),l(!1),u("")}},M=async e=>{if(e.preventDefault(),h(""),j!==v){h("Passwords do not match");return}if(j.length<8){h("Password must be at least 8 characters long");return}l(!0),u("Creating your account...");try{let e=(await fetch("/api/auth/session",{credentials:"include"})).headers.get("x-csrf-token"),t=await fetch("/api/auth/email/signup",{method:"POST",headers:{"Content-Type":"application/json",...e&&{"x-csrf-token":e}},credentials:"include",body:JSON.stringify({email:g,password:j,displayName:k||void 0})}),s=await t.json();if(!t.ok){h(s.error||"Signup failed"),l(!1),u("");return}u("Account created! Redirecting..."),b(!0),p("/app"),setTimeout(()=>{window.location.href="/app"},1500)}catch(e){console.error("Email signup error:",e),h("Failed to connect. Please try again."),l(!1),u("")}},E=!s||c;return(0,n.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 opacity-10",children:(0,n.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,n.jsxs)("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[(0,n.jsx)("div",{className:"absolute -top-40 -left-40 w-80 h-80 bg-accent-cyan/20 rounded-full blur-[100px]"}),(0,n.jsx)("div",{className:"absolute -bottom-40 -right-40 w-80 h-80 bg-[#00ffc8]/15 rounded-full blur-[100px]"})]}),(0,n.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)(i.K7,{size:56,withGlow:!0}),(0,n.jsx)("h1",{className:"mt-4 text-3xl font-bold text-white",children:"Get Started"}),(0,n.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Create your account and start orchestrating AI agents"})]}),(0,n.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:f?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-success/20 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Welcome to Agent Relay!"}),(0,n.jsx)("p",{className:"text-text-muted",children:"/connect-repos"===m?"Let's connect your repositories...":"Redirecting to dashboard..."})]}):c?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 flex items-center justify-center",children:(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Creating Account"}),(0,n.jsx)("p",{className:"text-text-muted",children:d||"Setting things up..."})]}):(0,n.jsxs)("div",{children:[x&&(0,n.jsx)("div",{className:"mb-4 p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,n.jsx)("p",{className:"text-error text-sm",children:x})}),(0,n.jsxs)("div",{className:"flex mb-6 bg-bg-secondary/50 rounded-lg p-1",children:[(0,n.jsx)("button",{type:"button",onClick:()=>t("github"),className:"flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ".concat("github"===e?"bg-bg-primary text-white shadow-sm":"text-text-muted hover:text-white"),children:"GitHub"}),(0,n.jsx)("button",{type:"button",onClick:()=>t("email"),className:"flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ".concat("email"===e?"bg-bg-primary text-white shadow-sm":"text-text-muted hover:text-white"),children:"Email"})]}),"github"===e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-6 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-accent-cyan/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-accent-cyan",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,n.jsx)("span",{children:"Deploy AI agents in seconds"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#00ffc8]/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-[#00ffc8]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})})}),(0,n.jsx)("span",{children:"Real-time agent collaboration"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#0891b2]/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-[#0891b2]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}),(0,n.jsx)("span",{children:"Secure credential management"})]})]}),(0,n.jsx)("button",{type:"button",onClick:T,disabled:E,className:"w-full py-4 px-6 bg-[#24292e] hover:bg-[#2f363d] border border-[#444d56] rounded-xl text-white font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})}),(0,n.jsx)("span",{children:"Sign up with GitHub"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("span",{children:"Loading..."})]})})]}):(0,n.jsxs)("form",{onSubmit:M,className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-text-secondary mb-2",children:["Name ",(0,n.jsx)("span",{className:"text-text-muted",children:"(optional)"})]}),(0,n.jsx)("input",{type:"text",id:"displayName",value:k,onChange:e=>C(e.target.value),disabled:c,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"Your name"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-text-secondary mb-2",children:"Email"}),(0,n.jsx)("input",{type:"email",id:"email",value:g,onChange:e=>y(e.target.value),required:!0,disabled:c,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"you@example.com"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),(0,n.jsx)("input",{type:"password",id:"password",value:j,onChange:e=>w(e.target.value),required:!0,minLength:8,disabled:c,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"At least 8 characters"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-text-secondary mb-2",children:"Confirm Password"}),(0,n.jsx)("input",{type:"password",id:"confirmPassword",value:v,onChange:e=>N(e.target.value),required:!0,disabled:c,className:"w-full px-4 py-3 bg-bg-secondary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-accent-cyan/50 focus:border-accent-cyan disabled:opacity-50",placeholder:"Confirm your password"})]}),(0,n.jsx)("button",{type:"submit",disabled:E||!g||!j||!v,className:"w-full py-4 px-6 bg-accent-cyan hover:bg-accent-cyan/90 rounded-xl text-black font-medium flex items-center justify-center gap-3 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("span",{children:d||"Creating account..."})]}):(0,n.jsx)("span",{children:"Create Account"})})]}),(0,n.jsxs)("p",{className:"mt-6 text-center text-text-muted text-sm",children:["By signing up, you agree to our"," ",(0,n.jsx)("a",{href:"/terms",className:"text-accent-cyan hover:underline",children:"Terms of Service"})," ","and"," ",(0,n.jsx)("a",{href:"/privacy",className:"text-accent-cyan hover:underline",children:"Privacy Policy"})]})]})}),(0,n.jsx)("div",{className:"mt-6 text-center",children:(0,n.jsxs)("p",{className:"text-text-muted",children:["Already have an account?"," ",(0,n.jsx)("a",{href:"/login",className:"text-accent-cyan hover:underline font-medium",children:"Sign in"})]})}),(0,n.jsx)("div",{className:"mt-4 text-center",children:(0,n.jsx)("a",{href:"/",className:"text-text-muted hover:text-white transition-colors text-sm",children:"Back to home"})})]})]})}},5634:function(e,t,s){"use strict";s.d(t,{K7:function(){return r}});var n=s(7573);function r(e){let{size:t=24,className:s="",withGlow:r=!1}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"\n transition-all duration-300\n ".concat(r?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(s,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,n.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,n.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,n.jsx)("path",{d:"M50 20 C 80 20 80 50 50 50 L 80 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:"0.7"})]})}s(7653)}},function(e){e.O(0,[5888,1293,1528,1744],function(){return e(e.s=4433)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5571],{9979:function(n,u,e){Promise.resolve().then(e.bind(e,8549))},8549:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return c}});var t=e(7573),r=e(717);function c(){return(0,t.jsx)(r.Eh,{})}}},function(n){n.O(0,[3694,1695,1293,1528,1744],function(){return n(n.s=9979)}),_N_E=n.O()}]);
|