agent-relay 2.0.21 → 2.0.23

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.
Files changed (412) hide show
  1. package/bin/relay-pty-linux-arm64 +0 -0
  2. package/dist/src/cli/index.d.ts +3 -3
  3. package/dist/src/cli/index.js +31 -100
  4. package/package.json +22 -29
  5. package/packages/api-types/package.json +1 -1
  6. package/packages/bridge/package.json +8 -8
  7. package/packages/cli-tester/package.json +1 -1
  8. package/packages/cloud/dist/server.js +25 -4
  9. package/packages/cloud/package.json +6 -6
  10. package/packages/config/package.json +2 -2
  11. package/packages/continuity/package.json +1 -1
  12. package/packages/daemon/dist/orchestrator.js +21 -1
  13. package/packages/daemon/dist/router.d.ts +5 -0
  14. package/packages/daemon/dist/router.js +31 -0
  15. package/packages/daemon/dist/server.d.ts +5 -0
  16. package/packages/daemon/dist/server.js +131 -1
  17. package/packages/daemon/package.json +12 -12
  18. package/packages/hooks/package.json +4 -4
  19. package/packages/mcp/dist/client.d.ts +15 -0
  20. package/packages/mcp/dist/client.js +9 -0
  21. package/packages/mcp/dist/server.js +13 -1
  22. package/packages/mcp/dist/tools/index.d.ts +2 -0
  23. package/packages/mcp/dist/tools/index.js +2 -0
  24. package/packages/mcp/dist/tools/relay-connected.d.ts +17 -0
  25. package/packages/mcp/dist/tools/relay-connected.js +40 -0
  26. package/packages/mcp/dist/tools/relay-remove-agent.d.ts +20 -0
  27. package/packages/mcp/dist/tools/relay-remove-agent.js +50 -0
  28. package/packages/mcp/package.json +2 -2
  29. package/packages/memory/package.json +2 -2
  30. package/packages/policy/package.json +2 -2
  31. package/packages/protocol/dist/types.d.ts +46 -1
  32. package/packages/protocol/package.json +1 -1
  33. package/packages/resiliency/package.json +1 -1
  34. package/packages/sdk/dist/client.d.ts +22 -1
  35. package/packages/sdk/dist/client.js +31 -0
  36. package/packages/sdk/dist/protocol/index.d.ts +1 -1
  37. package/packages/sdk/dist/protocol/types.d.ts +35 -1
  38. package/packages/sdk/package.json +2 -2
  39. package/packages/spawner/package.json +1 -1
  40. package/packages/state/package.json +1 -1
  41. package/packages/storage/dist/adapter.d.ts +4 -0
  42. package/packages/storage/dist/sqlite-adapter.d.ts +10 -0
  43. package/packages/storage/dist/sqlite-adapter.js +26 -0
  44. package/packages/storage/package.json +2 -2
  45. package/packages/telemetry/package.json +1 -1
  46. package/packages/trajectory/package.json +2 -2
  47. package/packages/user-directory/package.json +2 -2
  48. package/packages/utils/dist/update-checker.js +4 -0
  49. package/packages/utils/package.json +1 -1
  50. package/packages/wrapper/package.json +6 -6
  51. package/deploy/workspace/codex.config.toml +0 -20
  52. package/deploy/workspace/entrypoint-browser.sh +0 -118
  53. package/deploy/workspace/entrypoint.sh +0 -612
  54. package/deploy/workspace/gh-credential-relay +0 -90
  55. package/deploy/workspace/gh-relay +0 -156
  56. package/deploy/workspace/git-credential-relay +0 -330
  57. package/deploy/workspace/git-credential-relay.test.sh +0 -230
  58. package/dist/dashboard/out/404.html +0 -1
  59. package/dist/dashboard/out/_next/static/7MZPqYkVGw3EGzVBkVmY9/_buildManifest.js +0 -1
  60. package/dist/dashboard/out/_next/static/7MZPqYkVGw3EGzVBkVmY9/_ssgManifest.js +0 -1
  61. package/dist/dashboard/out/_next/static/chunks/116-a883fca163f3a5bc.js +0 -1
  62. package/dist/dashboard/out/_next/static/chunks/117-c8afed19e821a35d.js +0 -2
  63. package/dist/dashboard/out/_next/static/chunks/282-980c2eb8fff20123.js +0 -1
  64. package/dist/dashboard/out/_next/static/chunks/320-a6304232cd0ee2ce.js +0 -1
  65. package/dist/dashboard/out/_next/static/chunks/532-bace199897eeab37.js +0 -9
  66. package/dist/dashboard/out/_next/static/chunks/631-16b905e5920f9b59.js +0 -1
  67. package/dist/dashboard/out/_next/static/chunks/648-acb2ff9f77cbfbd3.js +0 -1
  68. package/dist/dashboard/out/_next/static/chunks/766-2aea80818f7eb0d8.js +0 -1
  69. package/dist/dashboard/out/_next/static/chunks/83-26d2bde54616ee90.js +0 -1
  70. package/dist/dashboard/out/_next/static/chunks/847-f1f467060f32afff.js +0 -1
  71. package/dist/dashboard/out/_next/static/chunks/891-5cb1513eeb97a891.js +0 -1
  72. package/dist/dashboard/out/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +0 -1
  73. package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +0 -1
  74. package/dist/dashboard/out/_next/static/chunks/app/app/page-366fb7c078d4e9e0.js +0 -1
  75. package/dist/dashboard/out/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +0 -1
  76. package/dist/dashboard/out/_next/static/chunks/app/complete-profile/page-dd64bbdf66b639cd.js +0 -1
  77. package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +0 -1
  78. package/dist/dashboard/out/_next/static/chunks/app/history/page-9965d2483011b846.js +0 -1
  79. package/dist/dashboard/out/_next/static/chunks/app/layout-6b91e33784c20610.js +0 -1
  80. package/dist/dashboard/out/_next/static/chunks/app/login/page-435eceb0073be027.js +0 -1
  81. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +0 -1
  82. package/dist/dashboard/out/_next/static/chunks/app/page-8119d4246743574e.js +0 -1
  83. package/dist/dashboard/out/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +0 -1
  84. package/dist/dashboard/out/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +0 -1
  85. package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +0 -1
  86. package/dist/dashboard/out/_next/static/chunks/app/signup/page-c7a0a28341365ae0.js +0 -1
  87. package/dist/dashboard/out/_next/static/chunks/e868780c-48e5f147c90a3a41.js +0 -18
  88. package/dist/dashboard/out/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +0 -1
  89. package/dist/dashboard/out/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
  90. package/dist/dashboard/out/_next/static/chunks/main-311c3db74dcfadb7.js +0 -1
  91. package/dist/dashboard/out/_next/static/chunks/main-app-fdbeb09028f57c9f.js +0 -1
  92. package/dist/dashboard/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
  93. package/dist/dashboard/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
  94. package/dist/dashboard/out/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  95. package/dist/dashboard/out/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +0 -1
  96. package/dist/dashboard/out/_next/static/css/4034f236dd1a3178.css +0 -1
  97. package/dist/dashboard/out/_next/static/css/6892f8422896ef7a.css +0 -1
  98. package/dist/dashboard/out/alt-logos/agent-relay-logo-128.png +0 -0
  99. package/dist/dashboard/out/alt-logos/agent-relay-logo-256.png +0 -0
  100. package/dist/dashboard/out/alt-logos/agent-relay-logo-32.png +0 -0
  101. package/dist/dashboard/out/alt-logos/agent-relay-logo-512.png +0 -0
  102. package/dist/dashboard/out/alt-logos/agent-relay-logo-64.png +0 -0
  103. package/dist/dashboard/out/alt-logos/agent-relay-logo.svg +0 -45
  104. package/dist/dashboard/out/alt-logos/logo.svg +0 -38
  105. package/dist/dashboard/out/alt-logos/monogram-logo-128.png +0 -0
  106. package/dist/dashboard/out/alt-logos/monogram-logo-256.png +0 -0
  107. package/dist/dashboard/out/alt-logos/monogram-logo-32.png +0 -0
  108. package/dist/dashboard/out/alt-logos/monogram-logo-512.png +0 -0
  109. package/dist/dashboard/out/alt-logos/monogram-logo-64.png +0 -0
  110. package/dist/dashboard/out/alt-logos/monogram-logo.svg +0 -38
  111. package/dist/dashboard/out/app/onboarding.html +0 -1
  112. package/dist/dashboard/out/app/onboarding.txt +0 -7
  113. package/dist/dashboard/out/app.html +0 -1
  114. package/dist/dashboard/out/app.txt +0 -7
  115. package/dist/dashboard/out/apple-icon.png +0 -0
  116. package/dist/dashboard/out/cloud/link.html +0 -1
  117. package/dist/dashboard/out/cloud/link.txt +0 -7
  118. package/dist/dashboard/out/complete-profile.html +0 -5
  119. package/dist/dashboard/out/complete-profile.txt +0 -7
  120. package/dist/dashboard/out/connect-repos.html +0 -1
  121. package/dist/dashboard/out/connect-repos.txt +0 -7
  122. package/dist/dashboard/out/history.html +0 -1
  123. package/dist/dashboard/out/history.txt +0 -7
  124. package/dist/dashboard/out/index.html +0 -1
  125. package/dist/dashboard/out/index.txt +0 -7
  126. package/dist/dashboard/out/login.html +0 -5
  127. package/dist/dashboard/out/login.txt +0 -7
  128. package/dist/dashboard/out/metrics.html +0 -1
  129. package/dist/dashboard/out/metrics.txt +0 -7
  130. package/dist/dashboard/out/pricing.html +0 -13
  131. package/dist/dashboard/out/pricing.txt +0 -7
  132. package/dist/dashboard/out/providers/setup/claude.html +0 -1
  133. package/dist/dashboard/out/providers/setup/claude.txt +0 -8
  134. package/dist/dashboard/out/providers/setup/codex.html +0 -1
  135. package/dist/dashboard/out/providers/setup/codex.txt +0 -8
  136. package/dist/dashboard/out/providers/setup/cursor.html +0 -1
  137. package/dist/dashboard/out/providers/setup/cursor.txt +0 -8
  138. package/dist/dashboard/out/providers.html +0 -1
  139. package/dist/dashboard/out/providers.txt +0 -7
  140. package/dist/dashboard/out/signup.html +0 -6
  141. package/dist/dashboard/out/signup.txt +0 -7
  142. package/dist/src/dashboard-server/index.d.ts +0 -8
  143. package/dist/src/dashboard-server/index.js +0 -8
  144. package/packages/dashboard/README.md +0 -48
  145. package/packages/dashboard/dist/health-worker-manager.d.ts +0 -62
  146. package/packages/dashboard/dist/health-worker-manager.js +0 -144
  147. package/packages/dashboard/dist/health-worker.d.ts +0 -9
  148. package/packages/dashboard/dist/health-worker.js +0 -79
  149. package/packages/dashboard/dist/index.d.ts +0 -20
  150. package/packages/dashboard/dist/index.js +0 -19
  151. package/packages/dashboard/dist/metrics.d.ts +0 -105
  152. package/packages/dashboard/dist/metrics.js +0 -193
  153. package/packages/dashboard/dist/needs-attention.d.ts +0 -24
  154. package/packages/dashboard/dist/needs-attention.js +0 -78
  155. package/packages/dashboard/dist/server.d.ts +0 -25
  156. package/packages/dashboard/dist/server.js +0 -5270
  157. package/packages/dashboard/dist/start.d.ts +0 -6
  158. package/packages/dashboard/dist/start.js +0 -13
  159. package/packages/dashboard/dist/types/threading.d.ts +0 -8
  160. package/packages/dashboard/dist/types/threading.js +0 -2
  161. package/packages/dashboard/dist/user-bridge.d.ts +0 -154
  162. package/packages/dashboard/dist/user-bridge.js +0 -372
  163. package/packages/dashboard/package.json +0 -65
  164. package/packages/dashboard/ui/app/app/onboarding/page.tsx +0 -394
  165. package/packages/dashboard/ui/app/app/page.tsx +0 -667
  166. package/packages/dashboard/ui/app/apple-icon.png +0 -0
  167. package/packages/dashboard/ui/app/cloud/link/page.tsx +0 -464
  168. package/packages/dashboard/ui/app/complete-profile/page.tsx +0 -204
  169. package/packages/dashboard/ui/app/connect-repos/page.tsx +0 -410
  170. package/packages/dashboard/ui/app/favicon.png +0 -0
  171. package/packages/dashboard/ui/app/globals.css +0 -59
  172. package/packages/dashboard/ui/app/history/page.tsx +0 -658
  173. package/packages/dashboard/ui/app/layout.tsx +0 -25
  174. package/packages/dashboard/ui/app/login/page.tsx +0 -424
  175. package/packages/dashboard/ui/app/metrics/page.tsx +0 -751
  176. package/packages/dashboard/ui/app/page.tsx +0 -59
  177. package/packages/dashboard/ui/app/pricing/page.tsx +0 -7
  178. package/packages/dashboard/ui/app/providers/page.tsx +0 -193
  179. package/packages/dashboard/ui/app/providers/setup/[provider]/ProviderSetupClient.tsx +0 -148
  180. package/packages/dashboard/ui/app/providers/setup/[provider]/constants.ts +0 -35
  181. package/packages/dashboard/ui/app/providers/setup/[provider]/page.tsx +0 -42
  182. package/packages/dashboard/ui/app/signup/page.tsx +0 -533
  183. package/packages/dashboard/ui/index.ts +0 -49
  184. package/packages/dashboard/ui/landing/LandingPage.tsx +0 -713
  185. package/packages/dashboard/ui/landing/PricingPage.tsx +0 -559
  186. package/packages/dashboard/ui/landing/index.ts +0 -6
  187. package/packages/dashboard/ui/landing/styles.css +0 -2850
  188. package/packages/dashboard/ui/lib/agent-merge.ts +0 -35
  189. package/packages/dashboard/ui/lib/api.ts +0 -1155
  190. package/packages/dashboard/ui/lib/cloudApi.ts +0 -877
  191. package/packages/dashboard/ui/lib/colors.ts +0 -218
  192. package/packages/dashboard/ui/lib/hierarchy.ts +0 -242
  193. package/packages/dashboard/ui/lib/stuckDetection.ts +0 -142
  194. package/packages/dashboard/ui/next-env.d.ts +0 -5
  195. package/packages/dashboard/ui/next.config.js +0 -41
  196. package/packages/dashboard/ui/package-lock.json +0 -2882
  197. package/packages/dashboard/ui/package.json +0 -33
  198. package/packages/dashboard/ui/postcss.config.js +0 -5
  199. package/packages/dashboard/ui/react-components/ActivityFeed.tsx +0 -216
  200. package/packages/dashboard/ui/react-components/AddWorkspaceModal.tsx +0 -170
  201. package/packages/dashboard/ui/react-components/AgentCard.tsx +0 -587
  202. package/packages/dashboard/ui/react-components/AgentList.tsx +0 -411
  203. package/packages/dashboard/ui/react-components/AgentProfilePanel.tsx +0 -564
  204. package/packages/dashboard/ui/react-components/App.tsx +0 -3033
  205. package/packages/dashboard/ui/react-components/BillingPanel.tsx +0 -922
  206. package/packages/dashboard/ui/react-components/BillingResult.tsx +0 -447
  207. package/packages/dashboard/ui/react-components/BroadcastComposer.tsx +0 -690
  208. package/packages/dashboard/ui/react-components/ChannelAdminPanel.tsx +0 -773
  209. package/packages/dashboard/ui/react-components/ChannelBrowser.tsx +0 -385
  210. package/packages/dashboard/ui/react-components/ChannelChat.tsx +0 -261
  211. package/packages/dashboard/ui/react-components/ChannelSidebar.tsx +0 -399
  212. package/packages/dashboard/ui/react-components/CloudSessionProvider.tsx +0 -130
  213. package/packages/dashboard/ui/react-components/CommandPalette.tsx +0 -815
  214. package/packages/dashboard/ui/react-components/ConfirmationDialog.tsx +0 -133
  215. package/packages/dashboard/ui/react-components/ConversationHistory.tsx +0 -518
  216. package/packages/dashboard/ui/react-components/CoordinatorPanel.tsx +0 -944
  217. package/packages/dashboard/ui/react-components/DecisionQueue.tsx +0 -717
  218. package/packages/dashboard/ui/react-components/DirectMessageView.tsx +0 -164
  219. package/packages/dashboard/ui/react-components/FileAutocomplete.tsx +0 -368
  220. package/packages/dashboard/ui/react-components/FleetOverview.tsx +0 -278
  221. package/packages/dashboard/ui/react-components/LogViewer.tsx +0 -310
  222. package/packages/dashboard/ui/react-components/LogViewerPanel.tsx +0 -482
  223. package/packages/dashboard/ui/react-components/Logo.tsx +0 -284
  224. package/packages/dashboard/ui/react-components/MentionAutocomplete.tsx +0 -384
  225. package/packages/dashboard/ui/react-components/MessageComposer.tsx +0 -457
  226. package/packages/dashboard/ui/react-components/MessageList.tsx +0 -649
  227. package/packages/dashboard/ui/react-components/MessageSenderName.tsx +0 -91
  228. package/packages/dashboard/ui/react-components/MessageStatusIndicator.tsx +0 -142
  229. package/packages/dashboard/ui/react-components/NewConversationModal.tsx +0 -400
  230. package/packages/dashboard/ui/react-components/NotificationToast.tsx +0 -488
  231. package/packages/dashboard/ui/react-components/OnlineUsersIndicator.tsx +0 -164
  232. package/packages/dashboard/ui/react-components/Pagination.tsx +0 -124
  233. package/packages/dashboard/ui/react-components/PricingPlans.tsx +0 -386
  234. package/packages/dashboard/ui/react-components/ProjectList.tsx +0 -625
  235. package/packages/dashboard/ui/react-components/ProviderAuthFlow.tsx +0 -853
  236. package/packages/dashboard/ui/react-components/ProviderConnectionList.tsx +0 -378
  237. package/packages/dashboard/ui/react-components/ProvisioningProgress.tsx +0 -730
  238. package/packages/dashboard/ui/react-components/RepoAccessPanel.tsx +0 -549
  239. package/packages/dashboard/ui/react-components/ServerCard.tsx +0 -202
  240. package/packages/dashboard/ui/react-components/SessionExpiredModal.tsx +0 -128
  241. package/packages/dashboard/ui/react-components/SpawnModal.tsx +0 -804
  242. package/packages/dashboard/ui/react-components/TaskAssignmentUI.tsx +0 -375
  243. package/packages/dashboard/ui/react-components/TerminalProviderSetup.tsx +0 -608
  244. package/packages/dashboard/ui/react-components/ThemeProvider.tsx +0 -325
  245. package/packages/dashboard/ui/react-components/ThinkingIndicator.tsx +0 -231
  246. package/packages/dashboard/ui/react-components/ThreadList.tsx +0 -198
  247. package/packages/dashboard/ui/react-components/ThreadPanel.tsx +0 -346
  248. package/packages/dashboard/ui/react-components/TrajectoryViewer.tsx +0 -698
  249. package/packages/dashboard/ui/react-components/TypingIndicator.tsx +0 -69
  250. package/packages/dashboard/ui/react-components/UsageBanner.tsx +0 -231
  251. package/packages/dashboard/ui/react-components/UserProfilePanel.tsx +0 -233
  252. package/packages/dashboard/ui/react-components/WorkspaceContext.tsx +0 -107
  253. package/packages/dashboard/ui/react-components/WorkspaceSelector.tsx +0 -234
  254. package/packages/dashboard/ui/react-components/WorkspaceStatusIndicator.tsx +0 -370
  255. package/packages/dashboard/ui/react-components/XTermInteractive.tsx +0 -510
  256. package/packages/dashboard/ui/react-components/XTermLogViewer.tsx +0 -719
  257. package/packages/dashboard/ui/react-components/channels/ChannelDialogs.tsx +0 -1411
  258. package/packages/dashboard/ui/react-components/channels/ChannelHeader.tsx +0 -317
  259. package/packages/dashboard/ui/react-components/channels/ChannelMessageList.tsx +0 -463
  260. package/packages/dashboard/ui/react-components/channels/ChannelViewV1.tsx +0 -146
  261. package/packages/dashboard/ui/react-components/channels/MessageInput.tsx +0 -288
  262. package/packages/dashboard/ui/react-components/channels/SearchInput.tsx +0 -172
  263. package/packages/dashboard/ui/react-components/channels/SearchResults.tsx +0 -336
  264. package/packages/dashboard/ui/react-components/channels/api.ts +0 -697
  265. package/packages/dashboard/ui/react-components/channels/index.ts +0 -76
  266. package/packages/dashboard/ui/react-components/channels/mockApi.ts +0 -344
  267. package/packages/dashboard/ui/react-components/channels/types.ts +0 -566
  268. package/packages/dashboard/ui/react-components/hooks/index.ts +0 -57
  269. package/packages/dashboard/ui/react-components/hooks/useAgentLogs.ts +0 -394
  270. package/packages/dashboard/ui/react-components/hooks/useAgents.ts +0 -127
  271. package/packages/dashboard/ui/react-components/hooks/useBroadcastDedup.ts +0 -86
  272. package/packages/dashboard/ui/react-components/hooks/useChannelAdmin.ts +0 -329
  273. package/packages/dashboard/ui/react-components/hooks/useChannelBrowser.ts +0 -239
  274. package/packages/dashboard/ui/react-components/hooks/useChannelCommands.ts +0 -138
  275. package/packages/dashboard/ui/react-components/hooks/useChannels.ts +0 -328
  276. package/packages/dashboard/ui/react-components/hooks/useDebounce.ts +0 -29
  277. package/packages/dashboard/ui/react-components/hooks/useDirectMessage.ts +0 -141
  278. package/packages/dashboard/ui/react-components/hooks/useMessages.ts +0 -309
  279. package/packages/dashboard/ui/react-components/hooks/useOrchestrator.ts +0 -364
  280. package/packages/dashboard/ui/react-components/hooks/usePinnedAgents.ts +0 -140
  281. package/packages/dashboard/ui/react-components/hooks/usePresence.ts +0 -340
  282. package/packages/dashboard/ui/react-components/hooks/useRecentRepos.ts +0 -130
  283. package/packages/dashboard/ui/react-components/hooks/useSession.ts +0 -209
  284. package/packages/dashboard/ui/react-components/hooks/useTrajectory.ts +0 -265
  285. package/packages/dashboard/ui/react-components/hooks/useWebSocket.ts +0 -169
  286. package/packages/dashboard/ui/react-components/hooks/useWorkspaceMembers.ts +0 -120
  287. package/packages/dashboard/ui/react-components/hooks/useWorkspaceRepos.ts +0 -73
  288. package/packages/dashboard/ui/react-components/hooks/useWorkspaceStatus.ts +0 -237
  289. package/packages/dashboard/ui/react-components/index.ts +0 -81
  290. package/packages/dashboard/ui/react-components/layout/Header.tsx +0 -355
  291. package/packages/dashboard/ui/react-components/layout/RepoContextHeader.tsx +0 -361
  292. package/packages/dashboard/ui/react-components/layout/Sidebar.archive.test.tsx +0 -126
  293. package/packages/dashboard/ui/react-components/layout/Sidebar.test.tsx +0 -691
  294. package/packages/dashboard/ui/react-components/layout/Sidebar.tsx +0 -930
  295. package/packages/dashboard/ui/react-components/layout/index.ts +0 -7
  296. package/packages/dashboard/ui/react-components/settings/BillingSettingsPanel.tsx +0 -564
  297. package/packages/dashboard/ui/react-components/settings/SettingsPage.tsx +0 -544
  298. package/packages/dashboard/ui/react-components/settings/TeamSettingsPanel.tsx +0 -560
  299. package/packages/dashboard/ui/react-components/settings/WorkspaceSettingsPanel.tsx +0 -1386
  300. package/packages/dashboard/ui/react-components/settings/index.ts +0 -11
  301. package/packages/dashboard/ui/react-components/settings/types.ts +0 -53
  302. package/packages/dashboard/ui/react-components/utils/messageFormatting.tsx +0 -370
  303. package/packages/dashboard/ui/tailwind.config.js +0 -148
  304. package/packages/dashboard/ui/types/index.ts +0 -304
  305. package/packages/dashboard/ui/types/threading.ts +0 -7
  306. package/packages/dashboard/ui-dist/404.html +0 -1
  307. package/packages/dashboard/ui-dist/_next/static/7MZPqYkVGw3EGzVBkVmY9/_buildManifest.js +0 -1
  308. package/packages/dashboard/ui-dist/_next/static/7MZPqYkVGw3EGzVBkVmY9/_ssgManifest.js +0 -1
  309. package/packages/dashboard/ui-dist/_next/static/chunks/116-a883fca163f3a5bc.js +0 -1
  310. package/packages/dashboard/ui-dist/_next/static/chunks/117-c8afed19e821a35d.js +0 -2
  311. package/packages/dashboard/ui-dist/_next/static/chunks/282-980c2eb8fff20123.js +0 -1
  312. package/packages/dashboard/ui-dist/_next/static/chunks/320-a6304232cd0ee2ce.js +0 -1
  313. package/packages/dashboard/ui-dist/_next/static/chunks/532-bace199897eeab37.js +0 -9
  314. package/packages/dashboard/ui-dist/_next/static/chunks/631-16b905e5920f9b59.js +0 -1
  315. package/packages/dashboard/ui-dist/_next/static/chunks/648-acb2ff9f77cbfbd3.js +0 -1
  316. package/packages/dashboard/ui-dist/_next/static/chunks/766-2aea80818f7eb0d8.js +0 -1
  317. package/packages/dashboard/ui-dist/_next/static/chunks/83-26d2bde54616ee90.js +0 -1
  318. package/packages/dashboard/ui-dist/_next/static/chunks/847-f1f467060f32afff.js +0 -1
  319. package/packages/dashboard/ui-dist/_next/static/chunks/891-5cb1513eeb97a891.js +0 -1
  320. package/packages/dashboard/ui-dist/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +0 -1
  321. package/packages/dashboard/ui-dist/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +0 -1
  322. package/packages/dashboard/ui-dist/_next/static/chunks/app/app/page-366fb7c078d4e9e0.js +0 -1
  323. package/packages/dashboard/ui-dist/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +0 -1
  324. package/packages/dashboard/ui-dist/_next/static/chunks/app/complete-profile/page-dd64bbdf66b639cd.js +0 -1
  325. package/packages/dashboard/ui-dist/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +0 -1
  326. package/packages/dashboard/ui-dist/_next/static/chunks/app/history/page-9965d2483011b846.js +0 -1
  327. package/packages/dashboard/ui-dist/_next/static/chunks/app/layout-6b91e33784c20610.js +0 -1
  328. package/packages/dashboard/ui-dist/_next/static/chunks/app/login/page-435eceb0073be027.js +0 -1
  329. package/packages/dashboard/ui-dist/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +0 -1
  330. package/packages/dashboard/ui-dist/_next/static/chunks/app/page-8119d4246743574e.js +0 -1
  331. package/packages/dashboard/ui-dist/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +0 -1
  332. package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +0 -1
  333. package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +0 -1
  334. package/packages/dashboard/ui-dist/_next/static/chunks/app/signup/page-c7a0a28341365ae0.js +0 -1
  335. package/packages/dashboard/ui-dist/_next/static/chunks/e868780c-48e5f147c90a3a41.js +0 -18
  336. package/packages/dashboard/ui-dist/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +0 -1
  337. package/packages/dashboard/ui-dist/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
  338. package/packages/dashboard/ui-dist/_next/static/chunks/main-311c3db74dcfadb7.js +0 -1
  339. package/packages/dashboard/ui-dist/_next/static/chunks/main-app-fdbeb09028f57c9f.js +0 -1
  340. package/packages/dashboard/ui-dist/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
  341. package/packages/dashboard/ui-dist/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
  342. package/packages/dashboard/ui-dist/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  343. package/packages/dashboard/ui-dist/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +0 -1
  344. package/packages/dashboard/ui-dist/_next/static/css/4034f236dd1a3178.css +0 -1
  345. package/packages/dashboard/ui-dist/_next/static/css/6892f8422896ef7a.css +0 -1
  346. package/packages/dashboard/ui-dist/_next/static/iJ3Uiz3IrqUJL7IxKZHiV/_buildManifest.js +0 -1
  347. package/packages/dashboard/ui-dist/_next/static/iJ3Uiz3IrqUJL7IxKZHiV/_ssgManifest.js +0 -1
  348. package/packages/dashboard/ui-dist/_next/static/l-jd878zUJ_IlraqEWMZc/_buildManifest.js +0 -1
  349. package/packages/dashboard/ui-dist/_next/static/l-jd878zUJ_IlraqEWMZc/_ssgManifest.js +0 -1
  350. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-128.png +0 -0
  351. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-256.png +0 -0
  352. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-32.png +0 -0
  353. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-512.png +0 -0
  354. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-64.png +0 -0
  355. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo.svg +0 -45
  356. package/packages/dashboard/ui-dist/alt-logos/logo.svg +0 -38
  357. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-128.png +0 -0
  358. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-256.png +0 -0
  359. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-32.png +0 -0
  360. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-512.png +0 -0
  361. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-64.png +0 -0
  362. package/packages/dashboard/ui-dist/alt-logos/monogram-logo.svg +0 -38
  363. package/packages/dashboard/ui-dist/app/onboarding.html +0 -1
  364. package/packages/dashboard/ui-dist/app/onboarding.txt +0 -7
  365. package/packages/dashboard/ui-dist/app.html +0 -1
  366. package/packages/dashboard/ui-dist/app.txt +0 -7
  367. package/packages/dashboard/ui-dist/apple-icon.png +0 -0
  368. package/packages/dashboard/ui-dist/cloud/link.html +0 -1
  369. package/packages/dashboard/ui-dist/cloud/link.txt +0 -7
  370. package/packages/dashboard/ui-dist/complete-profile.html +0 -5
  371. package/packages/dashboard/ui-dist/complete-profile.txt +0 -7
  372. package/packages/dashboard/ui-dist/connect-repos.html +0 -1
  373. package/packages/dashboard/ui-dist/connect-repos.txt +0 -7
  374. package/packages/dashboard/ui-dist/history.html +0 -1
  375. package/packages/dashboard/ui-dist/history.txt +0 -7
  376. package/packages/dashboard/ui-dist/index.html +0 -1
  377. package/packages/dashboard/ui-dist/index.txt +0 -7
  378. package/packages/dashboard/ui-dist/login.html +0 -5
  379. package/packages/dashboard/ui-dist/login.txt +0 -7
  380. package/packages/dashboard/ui-dist/metrics.html +0 -1
  381. package/packages/dashboard/ui-dist/metrics.txt +0 -7
  382. package/packages/dashboard/ui-dist/pricing.html +0 -13
  383. package/packages/dashboard/ui-dist/pricing.txt +0 -7
  384. package/packages/dashboard/ui-dist/providers/setup/claude.html +0 -1
  385. package/packages/dashboard/ui-dist/providers/setup/claude.txt +0 -8
  386. package/packages/dashboard/ui-dist/providers/setup/codex.html +0 -1
  387. package/packages/dashboard/ui-dist/providers/setup/codex.txt +0 -8
  388. package/packages/dashboard/ui-dist/providers/setup/cursor.html +0 -1
  389. package/packages/dashboard/ui-dist/providers/setup/cursor.txt +0 -8
  390. package/packages/dashboard/ui-dist/providers.html +0 -1
  391. package/packages/dashboard/ui-dist/providers.txt +0 -7
  392. package/packages/dashboard/ui-dist/signup.html +0 -6
  393. package/packages/dashboard/ui-dist/signup.txt +0 -7
  394. package/packages/dashboard-server/dist/health-worker-manager.d.ts +0 -62
  395. package/packages/dashboard-server/dist/health-worker-manager.js +0 -144
  396. package/packages/dashboard-server/dist/health-worker.d.ts +0 -9
  397. package/packages/dashboard-server/dist/health-worker.js +0 -79
  398. package/packages/dashboard-server/dist/index.d.ts +0 -18
  399. package/packages/dashboard-server/dist/index.js +0 -17
  400. package/packages/dashboard-server/dist/metrics.d.ts +0 -105
  401. package/packages/dashboard-server/dist/metrics.js +0 -193
  402. package/packages/dashboard-server/dist/needs-attention.d.ts +0 -24
  403. package/packages/dashboard-server/dist/needs-attention.js +0 -78
  404. package/packages/dashboard-server/dist/server.d.ts +0 -25
  405. package/packages/dashboard-server/dist/server.js +0 -5158
  406. package/packages/dashboard-server/dist/start.d.ts +0 -6
  407. package/packages/dashboard-server/dist/start.js +0 -13
  408. package/packages/dashboard-server/dist/types/threading.d.ts +0 -8
  409. package/packages/dashboard-server/dist/types/threading.js +0 -2
  410. package/packages/dashboard-server/dist/user-bridge.d.ts +0 -158
  411. package/packages/dashboard-server/dist/user-bridge.js +0 -390
  412. package/packages/dashboard-server/package.json +0 -55
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[766],{8766:function(e,s,a){"use strict";a.d(s,{fy:function(){return t},Wv:function(){return C}});var n=a(7437),i=a(2265);a(3655);var r=a(6272);let l={claude:{name:"Claude",color:"#D97757",icon:"◈"},codex:{name:"Codex",color:"#10A37F",icon:"⬡"},gemini:{name:"Gemini",color:"#4285F4",icon:"◇"},opencode:{name:"OpenCode",color:"#00D4AA",icon:"◆"},droid:{name:"Droid",color:"#6366F1",icon:"⬢"},cursor:{name:"Cursor",color:"#7C3AED",icon:"✎"}},c=[{from:"Architect",to:"all",content:"Starting auth module implementation. @Backend handle API, @Frontend build login UI.",provider:"claude"},{from:"Backend",to:"Architect",content:"Acknowledged. Setting up JWT middleware and user routes.",provider:"codex"},{from:"Frontend",to:"Architect",content:"On it. Creating login form with OAuth integration.",provider:"claude"},{from:"Backend",to:"Frontend",content:"API ready at /api/auth. Endpoints: POST /login, POST /register, GET /me",provider:"codex"},{from:"Frontend",to:"Backend",content:"Perfect. Integrating now. Need CORS headers for localhost:3000",provider:"claude"},{from:"Backend",to:"Frontend",content:"Done. CORS configured for development.",provider:"codex"},{from:"Reviewer",to:"all",content:"Running security audit on auth implementation...",provider:"gemini"},{from:"Reviewer",to:"Backend",content:"Found issue: password not being hashed. Use bcrypt.",provider:"gemini"},{from:"Backend",to:"Reviewer",content:"Good catch. Fixed and pushed. Using bcrypt with 12 rounds.",provider:"codex"},{from:"Architect",to:"all",content:"Auth module complete. Moving to dashboard implementation.",provider:"claude"}];function t(){return(0,n.jsxs)("div",{className:"landing-page",children:[(0,n.jsxs)("div",{className:"landing-bg",children:[(0,n.jsx)(f,{}),(0,n.jsx)(N,{})]}),(0,n.jsx)(o,{}),(0,n.jsxs)("main",{children:[(0,n.jsx)(d,{}),(0,n.jsx)(u,{}),(0,n.jsx)(p,{}),(0,n.jsx)(x,{}),(0,n.jsx)(j,{}),(0,n.jsx)(g,{})]}),(0,n.jsx)(v,{})]})}function o(){let[e,s]=(0,i.useState)(!1),[a,l]=(0,i.useState)(!1),[c,t]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=()=>s(window.scrollY>50);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,i.useEffect)(()=>{(async function(){try{let e=await fetch("/api/auth/me",{credentials:"include"});t(e.ok)}catch(e){t(!1)}})()},[]),(0,i.useEffect)(()=>{let e=()=>{window.innerWidth>768&&l(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,i.useEffect)(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]);let o=()=>{l(!1)};return(0,n.jsxs)("nav",{className:"nav ".concat(e?"scrolled":""," ").concat(a?"menu-open":""),children:[(0,n.jsxs)("div",{className:"nav-inner",children:[(0,n.jsxs)("a",{href:"/",className:"nav-logo",children:[(0,n.jsx)(r.K7,{size:28,withGlow:!0}),(0,n.jsx)("span",{className:"logo-text",children:"Agent Relay"})]}),(0,n.jsxs)("div",{className:"nav-links",children:[(0,n.jsx)("a",{href:"#demo",children:"Demo"}),(0,n.jsx)("a",{href:"#features",children:"Features"}),(0,n.jsx)("a",{href:"#pricing",children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",className:"nav-docs",children:"Docs"})]}),(0,n.jsx)("div",{className:"nav-actions",children:c?(0,n.jsx)("a",{href:"/app",className:"btn-primary",children:"Go to App"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{href:"/login",className:"btn-ghost",children:"Sign In"}),(0,n.jsx)("a",{href:"/signup",className:"btn-primary",children:"Get Started"})]})}),(0,n.jsx)("button",{className:"mobile-menu-toggle",onClick:()=>l(!a),"aria-label":a?"Close menu":"Open menu",children:(0,n.jsxs)("span",{className:"hamburger ".concat(a?"open":""),children:[(0,n.jsx)("span",{className:"hamburger-line"}),(0,n.jsx)("span",{className:"hamburger-line"}),(0,n.jsx)("span",{className:"hamburger-line"})]})})]}),(0,n.jsx)("div",{className:"mobile-menu-overlay ".concat(a?"open":""),onClick:o}),(0,n.jsx)("div",{className:"mobile-menu ".concat(a?"open":""),children:(0,n.jsxs)("div",{className:"mobile-menu-content",children:[(0,n.jsxs)("div",{className:"mobile-nav-links",children:[(0,n.jsx)("a",{href:"#demo",onClick:o,children:"Demo"}),(0,n.jsx)("a",{href:"#features",onClick:o,children:"Features"}),(0,n.jsx)("a",{href:"#pricing",onClick:o,children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",onClick:o,children:"Documentation"})]}),(0,n.jsx)("div",{className:"mobile-nav-actions",children:c?(0,n.jsx)("a",{href:"/app",className:"btn-primary btn-full",onClick:o,children:"Go to App"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{href:"/login",className:"btn-ghost btn-full",onClick:o,children:"Sign In"}),(0,n.jsx)("a",{href:"/signup",className:"btn-primary btn-full",onClick:o,children:"Get Started"})]})})]})})]})}function d(){return(0,n.jsxs)("section",{className:"hero",children:[(0,n.jsxs)("div",{className:"hero-content",children:[(0,n.jsxs)("div",{className:"hero-badge",children:[(0,n.jsx)("span",{className:"badge-dot"}),(0,n.jsx)("span",{children:"Now in Public Beta"})]}),(0,n.jsxs)("h1",{className:"hero-title",children:[(0,n.jsx)("span",{className:"title-line",children:"Orchestrate AI Agents"}),(0,n.jsx)("span",{className:"title-line gradient",children:"Like a Symphony"})]}),(0,n.jsx)("p",{className:"hero-subtitle",children:"Deploy Claude, Codex, and Gemini agents that communicate in real-time. One dashboard to rule them all. Zero infrastructure headaches."}),(0,n.jsxs)("div",{className:"hero-cta",children:[(0,n.jsxs)("a",{href:"/signup",className:"btn-primary btn-large",children:[(0,n.jsx)("span",{children:"Start Building"}),(0,n.jsx)("span",{className:"btn-arrow",children:"→"})]}),(0,n.jsxs)("a",{href:"#demo",className:"btn-ghost btn-large",children:[(0,n.jsx)("span",{className:"play-icon",children:"▶"}),(0,n.jsx)("span",{children:"Watch Demo"})]})]}),(0,n.jsxs)("div",{className:"hero-stats",children:[(0,n.jsxs)("div",{className:"stat",children:[(0,n.jsx)("span",{className:"stat-value",children:"10K+"}),(0,n.jsx)("span",{className:"stat-label",children:"Agents Spawned"})]}),(0,n.jsx)("div",{className:"stat-divider"}),(0,n.jsxs)("div",{className:"stat",children:[(0,n.jsx)("span",{className:"stat-value",children:"500+"}),(0,n.jsx)("span",{className:"stat-label",children:"Teams"})]}),(0,n.jsx)("div",{className:"stat-divider"}),(0,n.jsxs)("div",{className:"stat",children:[(0,n.jsx)("span",{className:"stat-value",children:"99.9%"}),(0,n.jsx)("span",{className:"stat-label",children:"Uptime"})]})]})]}),(0,n.jsx)("div",{className:"hero-visual",children:(0,n.jsx)(h,{})})]})}function h(){let e=[{id:"lead",name:"Lead",x:50,y:30,provider:"claude",pulse:!0},{id:"backend",name:"Backend",x:25,y:55,provider:"codex",pulse:!1},{id:"frontend",name:"Frontend",x:75,y:55,provider:"claude",pulse:!1},{id:"reviewer",name:"Reviewer",x:50,y:80,provider:"gemini",pulse:!1}];return(0,n.jsxs)("div",{className:"agent-network",children:[(0,n.jsx)("svg",{className:"network-lines",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[{from:"lead",to:"backend"},{from:"lead",to:"frontend"},{from:"backend",to:"frontend"},{from:"backend",to:"reviewer"},{from:"frontend",to:"reviewer"}].map((s,a)=>{let i=e.find(e=>e.id===s.from),r=e.find(e=>e.id===s.to);return(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:i.x,y1:i.y,x2:r.x,y2:r.y,className:"network-line"}),(0,n.jsx)("line",{x1:i.x,y1:i.y,x2:r.x,y2:r.y,className:"network-line-glow",style:{animationDelay:"".concat(.3*a,"s")}})]},a)})}),e.map(e=>{let s=l[e.provider];return(0,n.jsxs)("div",{className:"network-agent ".concat(e.pulse?"pulse":""),style:{left:"".concat(e.x,"%"),top:"".concat(e.y,"%"),"--agent-color":s.color},children:[(0,n.jsx)("div",{className:"agent-glow"}),(0,n.jsx)("div",{className:"agent-icon",children:s.icon}),(0,n.jsx)("div",{className:"agent-label",children:e.name})]},e.id)}),(0,n.jsx)(m,{fromX:50,fromY:30,toX:25,toY:55,delay:0}),(0,n.jsx)(m,{fromX:25,fromY:55,toX:75,toY:55,delay:1}),(0,n.jsx)(m,{fromX:75,fromY:55,toX:50,toY:80,delay:2})]})}function m(e){let{fromX:s,fromY:a,toX:i,toY:r,delay:l}=e;return(0,n.jsx)("div",{className:"data-packet",style:{"--from-x":"".concat(s,"%"),"--from-y":"".concat(a,"%"),"--to-x":"".concat(i,"%"),"--to-y":"".concat(r,"%"),animationDelay:"".concat(l,"s")}})}function u(){let[e,s]=(0,i.useState)([]),[a,r]=(0,i.useState)(0),t=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(a>=c.length){let e=setTimeout(()=>{s([]),r(0)},3e3);return()=>clearTimeout(e)}let e=setTimeout(()=>{s(e=>[...e,c[a]]),r(e=>e+1)},1500);return()=>clearTimeout(e)},[a]),(0,i.useEffect)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[e]),(0,n.jsxs)("section",{id:"demo",className:"demo-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"Live Demo"}),(0,n.jsx)("h2",{children:"Watch Agents Collaborate"}),(0,n.jsx)("p",{children:"See how multiple AI agents work together on a real task in real-time."})]}),(0,n.jsxs)("div",{className:"demo-container",children:[(0,n.jsxs)("div",{className:"demo-window",children:[(0,n.jsxs)("div",{className:"window-header",children:[(0,n.jsxs)("div",{className:"window-dots",children:[(0,n.jsx)("span",{className:"dot red"}),(0,n.jsx)("span",{className:"dot yellow"}),(0,n.jsx)("span",{className:"dot green"})]}),(0,n.jsx)("div",{className:"window-title",children:"Agent Relay — auth-module"}),(0,n.jsxs)("div",{className:"window-status",children:[(0,n.jsx)("span",{className:"status-dot"}),(0,n.jsx)("span",{children:"4 agents online"})]})]}),(0,n.jsxs)("div",{className:"demo-content",children:[(0,n.jsx)("div",{className:"demo-sidebar",children:(0,n.jsxs)("div",{className:"sidebar-section",children:[(0,n.jsx)("div",{className:"sidebar-label",children:"AGENTS"}),["Architect","Backend","Frontend","Reviewer"].map((e,s)=>{let a=l[["claude","codex","claude","gemini"][s]];return(0,n.jsxs)("div",{className:"sidebar-agent",children:[(0,n.jsx)("span",{className:"agent-dot",style:{background:a.color}}),(0,n.jsx)("span",{className:"agent-name",children:e}),(0,n.jsx)("span",{className:"agent-status",children:"●"})]},e)})]})}),(0,n.jsxs)("div",{className:"demo-messages",ref:t,children:[e.map((e,s)=>{let a=l[e.provider];return(0,n.jsxs)("div",{className:"message",style:{"--msg-color":a.color},children:[(0,n.jsxs)("div",{className:"message-header",children:[(0,n.jsx)("span",{className:"message-icon",style:{background:a.color},children:a.icon}),(0,n.jsx)("span",{className:"message-from",children:e.from}),(0,n.jsx)("span",{className:"message-arrow",children:"→"}),(0,n.jsx)("span",{className:"message-to",children:"all"===e.to?"everyone":e.to}),(0,n.jsx)("span",{className:"message-time",children:"just now"})]}),(0,n.jsx)("div",{className:"message-content",children:e.content})]},s)}),e.length<c.length&&(0,n.jsxs)("div",{className:"typing-indicator",children:[(0,n.jsx)("span",{className:"typing-dot"}),(0,n.jsx)("span",{className:"typing-dot"}),(0,n.jsx)("span",{className:"typing-dot"})]})]})]})]}),(0,n.jsx)("div",{className:"demo-caption",children:(0,n.jsx)("p",{children:"This is a simulation of agents completing a task. In production, agents run your actual code."})})]})]})}function p(){return(0,n.jsxs)("section",{id:"features",className:"features-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"Features"}),(0,n.jsx)("h2",{children:"Everything You Need"}),(0,n.jsx)("p",{children:"Built for developers who want AI agents that actually work together."})]}),(0,n.jsx)("div",{className:"features-grid",children:[{icon:"⚡",title:"One-Click Workspaces",description:"Spin up isolated environments for each project. Connect your repo and agents are ready in seconds."},{icon:"\uD83D\uDD04",title:"Real-Time Messaging",description:"Agents communicate through a blazing-fast relay. @mentions, broadcasts, and direct messages."},{icon:"\uD83D\uDD10",title:"Secure Credential Vault",description:"Store API keys and secrets encrypted at rest. Agents access only what they need."},{icon:"\uD83C\uDFAF",title:"Smart Orchestration",description:"Lead agents delegate tasks. Workers report progress. The system handles the complexity."},{icon:"\uD83D\uDCCA",title:"Full Observability",description:"Trace every message, tool call, and decision. Replay and debug any session."},{icon:"\uD83D\uDE80",title:"Auto-Scaling",description:"From 1 agent to 100. Pay only for what you use. Scale down to zero when idle."}].map((e,s)=>(0,n.jsxs)("div",{className:"feature-card",style:{animationDelay:"".concat(.1*s,"s")},children:[(0,n.jsx)("div",{className:"feature-icon",children:e.icon}),(0,n.jsx)("h3",{children:e.title}),(0,n.jsx)("p",{children:e.description})]},s))})]})}function x(){return(0,n.jsxs)("section",{className:"providers-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"Providers"}),(0,n.jsx)("h2",{children:"Bring Your Own Agents"}),(0,n.jsx)("p",{children:"Use any AI provider. Mix and match for the perfect team."})]}),(0,n.jsx)("div",{className:"providers-grid",children:Object.entries(l).map(e=>{let[s,a]=e;return(0,n.jsxs)("div",{className:"provider-card",style:{"--provider-color":a.color},children:[(0,n.jsx)("div",{className:"provider-icon",children:a.icon}),(0,n.jsx)("div",{className:"provider-name",children:a.name}),(0,n.jsx)("div",{className:"provider-status",children:"Supported"})]},s)})})]})}function j(){return(0,n.jsxs)("section",{id:"pricing",className:"pricing-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"Pricing"}),(0,n.jsx)("h2",{children:"Simple, Transparent Pricing"}),(0,n.jsx)("p",{children:"Start free. Scale as you grow. No hidden fees."})]}),(0,n.jsx)("div",{className:"pricing-grid",children:[{name:"Free",price:"$0",period:"forever",description:"Try AI agent workflows",features:["1 workspace","2 repositories","2 concurrent agents","5 compute hours/month","Shared CPU","Community support"],cta:"Get Started",highlighted:!1},{name:"Pro",price:"$69",period:"/month",description:"For professional developers",features:["5 workspaces","10 repositories","5 concurrent agents","50 compute hours/month","Auto-scaling","Session persistence","Email support"],cta:"Start Free Trial",highlighted:!0},{name:"Team",price:"$129",period:"/month",description:"For growing teams",features:["20 workspaces","100 repositories","50 concurrent agents","500 compute hours/month","Dedicated CPU","Priority support","Audit logs"],cta:"Start Free Trial",highlighted:!1},{name:"Enterprise",price:"$499",period:"/month",description:"For organizations at scale",features:["Unlimited workspaces","Unlimited repositories","Unlimited agents","Unlimited compute","SSO/SAML","SLA guarantee","Dedicated support"],cta:"Contact Sales",highlighted:!1}].map((e,s)=>(0,n.jsxs)("div",{className:"pricing-card ".concat(e.highlighted?"highlighted":""),children:[e.highlighted&&(0,n.jsx)("div",{className:"popular-badge",children:"Most Popular"}),(0,n.jsxs)("div",{className:"pricing-header",children:[(0,n.jsx)("h3",{children:e.name}),(0,n.jsxs)("div",{className:"pricing-price",children:[(0,n.jsx)("span",{className:"price",children:e.price}),(0,n.jsx)("span",{className:"period",children:e.period})]}),(0,n.jsx)("p",{className:"pricing-description",children:e.description})]}),(0,n.jsx)("ul",{className:"pricing-features",children:e.features.map((e,s)=>(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:"check",children:"✓"}),(0,n.jsx)("span",{children:e})]},s))}),(0,n.jsx)("a",{href:"/signup",className:"btn-".concat(e.highlighted?"primary":"ghost"," btn-full"),children:e.cta})]},s))})]})}function g(){return(0,n.jsxs)("section",{className:"cta-section",children:[(0,n.jsxs)("div",{className:"cta-content",children:[(0,n.jsx)("h2",{children:"Ready to Orchestrate?"}),(0,n.jsx)("p",{children:"Join thousands of developers building with AI agent teams."}),(0,n.jsxs)("div",{className:"cta-buttons",children:[(0,n.jsxs)("a",{href:"/signup",className:"btn-primary btn-large",children:[(0,n.jsx)("span",{children:"Start Building Free"}),(0,n.jsx)("span",{className:"btn-arrow",children:"→"})]}),(0,n.jsx)("a",{href:"/docs",className:"btn-ghost btn-large",children:"Read the Docs"})]})]}),(0,n.jsxs)("div",{className:"cta-terminal",children:[(0,n.jsxs)("div",{className:"terminal-header",children:[(0,n.jsx)("span",{className:"terminal-prompt",children:"$"}),(0,n.jsx)("span",{className:"terminal-text",children:"agent-relay cloud link"})]}),(0,n.jsxs)("div",{className:"terminal-output",children:[(0,n.jsx)("span",{className:"output-line",children:"✓ Machine linked to Agent Relay Cloud"}),(0,n.jsx)("span",{className:"output-line",children:"✓ Syncing with workspace: my-project"}),(0,n.jsx)("span",{className:"output-line",children:"✓ 3 agents online: Lead, Backend, Frontend"}),(0,n.jsx)("span",{className:"output-line"}),(0,n.jsx)("span",{className:"output-line dim",children:'$ agent-relay cloud send Lead "Start the auth module"'}),(0,n.jsx)("span",{className:"output-line cursor",children:"✓ Message sent to Lead on cloud-workspace"})]})]})]})}function v(){return(0,n.jsxs)("footer",{className:"footer",children:[(0,n.jsxs)("div",{className:"footer-inner",children:[(0,n.jsxs)("div",{className:"footer-brand",children:[(0,n.jsxs)("a",{href:"/",className:"footer-logo",children:[(0,n.jsx)(r.K7,{size:24,withGlow:!0}),(0,n.jsx)("span",{className:"logo-text",children:"Agent Relay"})]}),(0,n.jsx)("p",{children:"Orchestrate AI agents like a symphony."})]}),(0,n.jsxs)("div",{className:"footer-links",children:[(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Product"}),(0,n.jsx)("a",{href:"#features",children:"Features"}),(0,n.jsx)("a",{href:"#pricing",children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",children:"Documentation"}),(0,n.jsx)("a",{href:"/changelog",children:"Changelog"})]}),(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Company"}),(0,n.jsx)("a",{href:"/about",children:"About"}),(0,n.jsx)("a",{href:"/blog",children:"Blog"}),(0,n.jsx)("a",{href:"/careers",children:"Careers"}),(0,n.jsx)("a",{href:"/contact",children:"Contact"})]}),(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Legal"}),(0,n.jsx)("a",{href:"/privacy",children:"Privacy"}),(0,n.jsx)("a",{href:"/terms",children:"Terms"}),(0,n.jsx)("a",{href:"/security",children:"Security"})]})]})]}),(0,n.jsxs)("div",{className:"footer-bottom",children:[(0,n.jsx)("p",{children:"\xa9 2026 Agent Relay. All rights reserved."}),(0,n.jsxs)("div",{className:"social-links",children:[(0,n.jsx)("a",{href:"https://github.com/AgentWorkforce/relay","aria-label":"GitHub",children:(0,n.jsx)(y,{})}),(0,n.jsx)("a",{href:"https://twitter.com/agent_relay","aria-label":"Twitter",children:(0,n.jsx)(b,{})}),(0,n.jsx)("a",{href:"https://discord.gg/agentrelay","aria-label":"Discord",children:(0,n.jsx)(w,{})})]})]})]})}function f(){return(0,n.jsxs)("div",{className:"grid-bg",children:[(0,n.jsx)("div",{className:"grid-lines"}),(0,n.jsx)("div",{className:"grid-glow"})]})}function N(){return(0,n.jsxs)("div",{className:"glow-orbs",children:[(0,n.jsx)("div",{className:"orb orb-1"}),(0,n.jsx)("div",{className:"orb orb-2"}),(0,n.jsx)("div",{className:"orb orb-3"})]})}function y(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",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"})})}function b(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function w(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}let k=[{id:"free",name:"Free",price:0,period:"forever",tagline:"Try AI agent workflows",description:"Explore agent orchestration with limited resources. Perfect for testing.",limits:{workspaces:1,repos:2,concurrentAgents:2,computeHours:5},features:[{name:"Workspaces",value:"1",included:!0},{name:"Repositories",value:"2",included:!0},{name:"Concurrent agents",value:"2",included:!0},{name:"Compute hours/month",value:"5",included:!0},{name:"CPU type",value:"Shared",included:!0},{name:"Coordinator agents",value:null,included:!1},{name:"Auto-scaling",value:null,included:!1},{name:"Session persistence",value:null,included:!1},{name:"Priority support",value:null,included:!1},{name:"SSO/SAML",value:null,included:!1}],cta:"Get Started Free",ctaLink:"/signup",highlighted:!1},{id:"pro",name:"Pro",price:69,period:"/month",tagline:"For professional developers",description:"Build with AI agents daily. Includes auto-scaling and session persistence.",limits:{workspaces:5,repos:10,concurrentAgents:5,computeHours:50},features:[{name:"Workspaces",value:"5",included:!0},{name:"Repositories",value:"10",included:!0},{name:"Concurrent agents",value:"5",included:!0},{name:"Compute hours/month",value:"50",included:!0},{name:"CPU type",value:"Shared",included:!0},{name:"Coordinator agents",value:"Yes",included:!0},{name:"Auto-scaling",value:"Yes",included:!0},{name:"Session persistence",value:"Yes",included:!0},{name:"Priority support",value:null,included:!1},{name:"SSO/SAML",value:null,included:!1}],cta:"Start Free Trial",ctaLink:"/signup?plan=pro",highlighted:!0,badge:"Most Popular"},{id:"team",name:"Team",price:129,period:"/month",tagline:"For growing teams",description:"Dedicated CPUs, priority support, and team collaboration features.",limits:{workspaces:20,repos:100,concurrentAgents:10,computeHours:200},features:[{name:"Workspaces",value:"20",included:!0},{name:"Repositories",value:"100",included:!0},{name:"Concurrent agents",value:"10",included:!0},{name:"Compute hours/month",value:"200",included:!0},{name:"CPU type",value:"Dedicated",included:!0},{name:"Coordinator agents",value:"Yes",included:!0},{name:"Auto-scaling",value:"Yes",included:!0},{name:"Session persistence",value:"Yes",included:!0},{name:"Priority support",value:"Yes",included:!0},{name:"SSO/SAML",value:null,included:!1}],cta:"Start Free Trial",ctaLink:"/signup?plan=team",highlighted:!1},{id:"enterprise",name:"Enterprise",price:499,period:"/month",tagline:"For organizations at scale",description:"Unlimited resources, SSO, SLA guarantees, and dedicated support.",limits:{workspaces:1/0,repos:1/0,concurrentAgents:1/0,computeHours:1/0},features:[{name:"Workspaces",value:"Unlimited",included:!0},{name:"Repositories",value:"Unlimited",included:!0},{name:"Concurrent agents",value:"Unlimited",included:!0},{name:"Compute hours/month",value:"Unlimited",included:!0},{name:"CPU type",value:"Dedicated",included:!0},{name:"Coordinator agents",value:"Yes",included:!0},{name:"Auto-scaling",value:"Yes",included:!0},{name:"Session persistence",value:"Yes",included:!0},{name:"Priority support",value:"Dedicated",included:!0},{name:"SSO/SAML",value:"Yes",included:!0}],cta:"Contact Sales",ctaLink:"/contact?subject=enterprise",highlighted:!1}],A=[{q:'What counts as a "compute hour"?',a:"A compute hour is measured when your agents are actively running in our cloud infrastructure. Time spent waiting for your input or idle time doesn't count. We track usage to the second and round up to the nearest minute for billing."},{q:"Can I use my own AI API keys?",a:"Yes! Agent Relay orchestrates your agents—you connect your own Claude, Codex, or Gemini instances. We don't charge for AI API usage; that's between you and your AI provider. Our pricing covers the orchestration infrastructure."},{q:"What are coordinator agents?",a:"Coordinators are special agents that oversee project groups. They delegate tasks to other agents, track progress, and ensure work is completed efficiently across multiple repositories. Available on Pro plans and above."},{q:"What happens if I exceed my limits?",a:"We'll notify you when you're approaching your limits. If you exceed them, new agent spawns will be blocked until you upgrade or wait for the next billing cycle. Your existing agents will continue running."},{q:"Can I change plans anytime?",a:"Absolutely. Upgrade instantly and get prorated billing. Downgrade takes effect at the end of your billing cycle. No long-term contracts required."},{q:"Do you offer discounts for startups or open source?",a:"Yes! We offer 50% off for verified startups (less than $1M raised) and free Pro accounts for maintainers of popular open source projects. Contact us to apply."}];function C(){let[e,s]=(0,i.useState)("monthly"),[a,r]=(0,i.useState)(null);return(0,n.jsxs)("div",{className:"pricing-page",children:[(0,n.jsxs)("div",{className:"pricing-bg",children:[(0,n.jsx)(R,{}),(0,n.jsx)(B,{})]}),(0,n.jsx)(S,{}),(0,n.jsxs)("main",{children:[(0,n.jsx)(D,{billingCycle:e,setBillingCycle:s}),(0,n.jsx)(F,{billingCycle:e}),(0,n.jsx)(P,{}),(0,n.jsx)(L,{openFaq:a,setOpenFaq:r}),(0,n.jsx)(T,{})]}),(0,n.jsx)(I,{})]})}function S(){let[e,s]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=()=>s(window.scrollY>50);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,n.jsx)("nav",{className:"nav ".concat(e?"scrolled":""),children:(0,n.jsxs)("div",{className:"nav-inner",children:[(0,n.jsxs)("a",{href:"/",className:"nav-logo",children:[(0,n.jsx)(r.K7,{size:28,withGlow:!0}),(0,n.jsx)("span",{className:"logo-text",children:"Agent Relay"})]}),(0,n.jsxs)("div",{className:"nav-links",children:[(0,n.jsx)("a",{href:"/#demo",children:"Demo"}),(0,n.jsx)("a",{href:"/#features",children:"Features"}),(0,n.jsx)("a",{href:"/pricing",className:"active",children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",className:"nav-docs",children:"Docs"})]}),(0,n.jsxs)("div",{className:"nav-actions",children:[(0,n.jsx)("a",{href:"/login",className:"btn-ghost",children:"Sign In"}),(0,n.jsx)("a",{href:"/signup",className:"btn-primary",children:"Get Started"})]})]})})}function D(e){let{billingCycle:s,setBillingCycle:a}=e;return(0,n.jsx)("section",{className:"pricing-hero",children:(0,n.jsxs)("div",{className:"pricing-hero-content",children:[(0,n.jsxs)("div",{className:"hero-badge",children:[(0,n.jsx)("span",{className:"badge-icon",children:"◈"}),(0,n.jsx)("span",{children:"Simple, transparent pricing"})]}),(0,n.jsxs)("h1",{children:[(0,n.jsx)("span",{className:"title-line",children:"Choose Your"}),(0,n.jsx)("span",{className:"title-line gradient",children:"Mission Control"})]}),(0,n.jsxs)("p",{className:"hero-subtitle",children:["Start free. Scale as you grow. Pay only for what you use.",(0,n.jsx)("br",{}),"All plans include a 14-day free trial."]}),(0,n.jsxs)("div",{className:"billing-toggle",children:[(0,n.jsx)("button",{className:"monthly"===s?"active":"",onClick:()=>a("monthly"),children:"Monthly"}),(0,n.jsxs)("button",{className:"annual"===s?"active":"",onClick:()=>a("annual"),children:["Annual",(0,n.jsx)("span",{className:"save-badge",children:"Save 20%"})]})]})]})})}function F(e){let{billingCycle:s}=e,a=e=>{if(null===e.price)return"Custom";if(0===e.price)return"$0";let a="annual"===s?Math.floor(.8*e.price):e.price;return"$".concat(a)};return(0,n.jsx)("section",{className:"plans-section",children:(0,n.jsx)("div",{className:"plans-grid",children:k.map(e=>(0,n.jsxs)("div",{className:"plan-card ".concat(e.highlighted?"highlighted":""),children:[e.badge&&(0,n.jsx)("div",{className:"plan-badge",children:e.badge}),(0,n.jsxs)("div",{className:"plan-header",children:[(0,n.jsx)("h3",{children:e.name}),(0,n.jsx)("p",{className:"plan-tagline",children:e.tagline})]}),(0,n.jsxs)("div",{className:"plan-price",children:[(0,n.jsx)("span",{className:"price",children:a(e)}),null!==e.price&&e.price>0&&(0,n.jsx)("span",{className:"period",children:"annual"===s?"/mo, billed annually":"/month"}),0===e.price&&(0,n.jsx)("span",{className:"period",children:"forever"})]}),(0,n.jsx)("p",{className:"plan-description",children:e.description}),(0,n.jsxs)("div",{className:"plan-limits",children:[(0,n.jsxs)("div",{className:"limit-item",children:[(0,n.jsx)("span",{className:"limit-icon",children:"◇"}),(0,n.jsx)("span",{className:"limit-value",children:e.limits.workspaces===1/0?"∞":e.limits.workspaces}),(0,n.jsx)("span",{className:"limit-label",children:"workspaces"})]}),(0,n.jsxs)("div",{className:"limit-item",children:[(0,n.jsx)("span",{className:"limit-icon",children:"◈"}),(0,n.jsx)("span",{className:"limit-value",children:e.limits.repos===1/0?"∞":e.limits.repos}),(0,n.jsx)("span",{className:"limit-label",children:"repos"})]}),(0,n.jsxs)("div",{className:"limit-item",children:[(0,n.jsx)("span",{className:"limit-icon",children:"⬡"}),(0,n.jsx)("span",{className:"limit-value",children:e.limits.concurrentAgents===1/0?"∞":e.limits.concurrentAgents}),(0,n.jsx)("span",{className:"limit-label",children:"agents"})]}),(0,n.jsxs)("div",{className:"limit-item",children:[(0,n.jsx)("span",{className:"limit-icon",children:"⏱"}),(0,n.jsx)("span",{className:"limit-value",children:e.limits.computeHours===1/0?"∞":e.limits.computeHours}),(0,n.jsx)("span",{className:"limit-label",children:"hours/mo"})]})]}),(0,n.jsx)("a",{href:e.ctaLink,className:"btn-".concat(e.highlighted?"primary":"ghost"," btn-full"),children:e.cta})]},e.id))})})}function P(){let e=k[0].features.map(e=>e.name);return(0,n.jsxs)("section",{className:"comparison-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"Compare Plans"}),(0,n.jsx)("h2",{children:"Feature Comparison"}),(0,n.jsx)("p",{children:"See exactly what's included in each plan."})]}),(0,n.jsx)("div",{className:"comparison-table-wrapper",children:(0,n.jsxs)("table",{className:"comparison-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:"feature-col",children:"Feature"}),k.map(e=>(0,n.jsx)("th",{className:e.highlighted?"highlighted":"",children:e.name},e.id))]})}),(0,n.jsx)("tbody",{children:e.map((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"feature-col",children:e}),k.map(e=>{let a=e.features[s];return(0,n.jsx)("td",{className:e.highlighted?"highlighted":"",children:a.included?a.value?(0,n.jsx)("span",{className:"feature-value",children:a.value}):(0,n.jsx)("span",{className:"check",children:"✓"}):(0,n.jsx)("span",{className:"dash",children:"—"})},e.id)})]},e))})]})})]})}function L(e){let{openFaq:s,setOpenFaq:a}=e;return(0,n.jsxs)("section",{className:"faq-section",children:[(0,n.jsxs)("div",{className:"section-header",children:[(0,n.jsx)("span",{className:"section-tag",children:"FAQ"}),(0,n.jsx)("h2",{children:"Questions? Answers."}),(0,n.jsx)("p",{children:"Everything you need to know about Agent Relay pricing."})]}),(0,n.jsx)("div",{className:"faq-grid",children:A.map((e,i)=>(0,n.jsxs)("div",{className:"faq-item ".concat(s===i?"open":""),onClick:()=>a(s===i?null:i),children:[(0,n.jsxs)("div",{className:"faq-question",children:[(0,n.jsx)("span",{children:e.q}),(0,n.jsx)("span",{className:"faq-toggle",children:s===i?"−":"+"})]}),(0,n.jsx)("div",{className:"faq-answer",children:(0,n.jsx)("p",{children:e.a})})]},i))})]})}function T(){return(0,n.jsx)("section",{className:"cta-section",children:(0,n.jsxs)("div",{className:"cta-card",children:[(0,n.jsxs)("div",{className:"cta-content",children:[(0,n.jsx)("h2",{children:"Ready to orchestrate?"}),(0,n.jsx)("p",{children:"Start free and upgrade when you need more power."}),(0,n.jsxs)("div",{className:"cta-buttons",children:[(0,n.jsxs)("a",{href:"/signup",className:"btn-primary btn-large",children:[(0,n.jsx)("span",{children:"Get Started Free"}),(0,n.jsx)("span",{className:"btn-arrow",children:"→"})]}),(0,n.jsx)("a",{href:"/contact",className:"btn-ghost btn-large",children:"Talk to Sales"})]})]}),(0,n.jsx)("div",{className:"cta-visual",children:(0,n.jsxs)("div",{className:"orbit",children:[(0,n.jsx)("div",{className:"orbit-ring ring-1"}),(0,n.jsx)("div",{className:"orbit-ring ring-2"}),(0,n.jsx)("div",{className:"orbit-ring ring-3"}),(0,n.jsx)("div",{className:"orbit-center",children:(0,n.jsx)(r.K7,{size:40,withGlow:!0})}),(0,n.jsx)("div",{className:"orbit-dot dot-1",children:"◈"}),(0,n.jsx)("div",{className:"orbit-dot dot-2",children:"⬡"}),(0,n.jsx)("div",{className:"orbit-dot dot-3",children:"◇"})]})})]})})}function I(){return(0,n.jsxs)("footer",{className:"footer",children:[(0,n.jsxs)("div",{className:"footer-inner",children:[(0,n.jsxs)("div",{className:"footer-brand",children:[(0,n.jsxs)("a",{href:"/",className:"footer-logo",children:[(0,n.jsx)(r.K7,{size:24,withGlow:!0}),(0,n.jsx)("span",{className:"logo-text",children:"Agent Relay"})]}),(0,n.jsx)("p",{children:"Orchestrate AI agents like a symphony."})]}),(0,n.jsxs)("div",{className:"footer-links",children:[(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Product"}),(0,n.jsx)("a",{href:"/#features",children:"Features"}),(0,n.jsx)("a",{href:"/pricing",children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",children:"Documentation"}),(0,n.jsx)("a",{href:"/changelog",children:"Changelog"})]}),(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Company"}),(0,n.jsx)("a",{href:"/about",children:"About"}),(0,n.jsx)("a",{href:"/blog",children:"Blog"}),(0,n.jsx)("a",{href:"/careers",children:"Careers"}),(0,n.jsx)("a",{href:"/contact",children:"Contact"})]}),(0,n.jsxs)("div",{className:"footer-column",children:[(0,n.jsx)("h4",{children:"Legal"}),(0,n.jsx)("a",{href:"/privacy",children:"Privacy"}),(0,n.jsx)("a",{href:"/terms",children:"Terms"}),(0,n.jsx)("a",{href:"/security",children:"Security"})]})]})]}),(0,n.jsxs)("div",{className:"footer-bottom",children:[(0,n.jsx)("p",{children:"\xa9 2025 Agent Relay. All rights reserved."}),(0,n.jsxs)("div",{className:"social-links",children:[(0,n.jsx)("a",{href:"https://github.com/AgentWorkforce/relay","aria-label":"GitHub",children:(0,n.jsx)(E,{})}),(0,n.jsx)("a",{href:"https://twitter.com/agent_relay","aria-label":"Twitter",children:(0,n.jsx)(O,{})}),(0,n.jsx)("a",{href:"https://discord.gg/agentrelay","aria-label":"Discord",children:(0,n.jsx)(Y,{})})]})]})]})}function R(){return(0,n.jsxs)("div",{className:"grid-bg",children:[(0,n.jsx)("div",{className:"grid-lines"}),(0,n.jsx)("div",{className:"grid-glow"})]})}function B(){return(0,n.jsxs)("div",{className:"glow-orbs",children:[(0,n.jsx)("div",{className:"orb orb-1"}),(0,n.jsx)("div",{className:"orb orb-2"})]})}function E(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",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"})})}function O(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Y(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}},3655:function(){}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83],{3083:function(e,t,s){s.d(t,{j:function(){return i}});var a=s(7437),n=s(2265);let r={codex:"openai"};function i(e){let{provider:t,workspaceId:s,csrfToken:i,onSuccess:c,onCancel:o,onError:l,useDeviceFlow:d=!1}=e,[u,h]=(0,n.useState)("idle"),[x,m]=(0,n.useState)(null),[p,b]=(0,n.useState)(null),[y,g]=(0,n.useState)(""),[f,w]=(0,n.useState)(null),[j,N]=(0,n.useState)(null),[v,k]=(0,n.useState)(null),[C,S]=(0,n.useState)(null),[T,A]=(0,n.useState)(!1),[I,E]=(0,n.useState)(!1),[O,F]=(0,n.useState)(!1),[R,L]=(0,n.useState)(!1),P=(0,n.useRef)(!1),U=(0,n.useRef)(!1),W=(0,n.useRef)(!1),z=(0,n.useRef)(!1),B=r[t.id]||t.id,M=t.requiresUrlCopy||"codex"===t.id||"openai"===B,V=(0,n.useCallback)(async()=>{h("starting"),w(null),P.current=!1;try{let e={"Content-Type":"application/json"};i&&(e["X-CSRF-Token"]=i);let t=await fetch("/api/onboarding/cli/".concat(B,"/start"),{method:"POST",credentials:"include",headers:e,body:JSON.stringify({workspaceId:s,useDeviceFlow:d})}),a=await t.json();if(!t.ok)throw Error(a.error||"Failed to start authentication");if("success"===a.status||a.alreadyAuthenticated){h("success"),c();return}b(a.sessionId),a.useDeviceFlow&&L(!0),a.authUrl?(m(a.authUrl),h("waiting"),(!M||a.useDeviceFlow)&&K(a.authUrl),H(a.sessionId)):a.sessionId&&H(a.sessionId)}catch(t){let e=t instanceof Error?t.message:"Failed to start authentication";w(e),h("error"),l(e)}},[B,s,i,d,c,l,M]),D=(0,n.useRef)(null),X=(0,n.useRef)(null),_=(0,n.useCallback)((e,t)=>{if(W.current)return;W.current=!0,F(!0);let s=0,a=async()=>{if(s>=120||!W.current){W.current=!1,F(!1);return}try{let n=await fetch("/api/auth/codex-helper/auth-status/".concat(e),{credentials:"include"});if(n.ok&&(await n.json()).authenticated){W.current=!1,F(!1),X.current&&await X.current(t);return}s++,setTimeout(a,5e3)}catch(e){console.error("CLI poll error:",e),s++,setTimeout(a,5e3)}};a()},[]),J=(0,n.useCallback)(async()=>{if(M){A(!0);try{let e={"Content-Type":"application/json"};i&&(e["X-CSRF-Token"]=i);let t=await fetch("/api/auth/codex-helper/cli-session",{method:"POST",credentials:"include",headers:e,body:JSON.stringify({workspaceId:s,authUrl:x,sessionId:p})});if(t.ok){let e=await t.json();N(e.commandWithUrl||e.command),e.workspaceId?(k(e.workspaceId),S(e.workspaceName||null),_(e.workspaceId,p||void 0)):e.authSessionId&&(k(e.authSessionId),_(e.authSessionId,p||void 0))}}catch(e){console.error("Failed to fetch CLI session:",e)}finally{A(!1)}}},[M,s,i,_,p,x]);(0,n.useEffect)(()=>{"waiting"!==u||!M||R||j||J()},[u,M,R,j,J]);let K=(0,n.useCallback)(e=>{let s=window.screenX+(window.outerWidth-600)/2,a=window.screenY+(window.outerHeight-700)/2;window.open(e,"".concat(t.displayName," Login"),"width=".concat(600,",height=").concat(700,",left=").concat(s,",top=").concat(a,",popup=yes")),P.current=!0},[t.displayName]),H=(0,n.useCallback)(e=>{if(U.current)return;U.current=!0;let t=0,s=async()=>{if(t>=60){U.current=!1,w("Authentication timed out. Please try again."),h("error"),l("Authentication timed out");return}try{let a=await fetch("/api/onboarding/cli/".concat(B,"/status/").concat(e),{credentials:"include"}),n=await a.json();if(!a.ok)throw Error(n.error||"Failed to check status");if("success"===n.status){U.current=!1,await Y(e);return}if("error"===n.status)throw Error(n.error||"Authentication failed");"waiting_auth"!==n.status||!n.authUrl||(m(n.authUrl),h("waiting"),P.current||M||K(n.authUrl)),t++,setTimeout(s,5e3)}catch(t){U.current=!1;let e=t instanceof Error?t.message:"Auth check failed";w(e),h("error"),l(e)}};s()},[B,K,l,M]),Y=(0,n.useCallback)(async e=>{let t=e||p;if(t&&!z.current){z.current=!0,U.current=!1,W.current=!1,h("submitting"),w(null);try{let e={"Content-Type":"application/json"};i&&(e["X-CSRF-Token"]=i);let s=await fetch("/api/onboarding/cli/".concat(B,"/complete/").concat(t),{method:"POST",credentials:"include",headers:e}),a=await s.json();if(!s.ok)throw Error(a.error||"Failed to complete authentication");h("success"),setTimeout(()=>c(),1500)}catch(t){z.current=!1;let e=t instanceof Error?t.message:"Failed to complete authentication";w(e),h("error"),l(e)}}},[p,B,i,c,l]);(0,n.useEffect)(()=>{X.current=Y},[Y]);let q=(0,n.useCallback)(async()=>{if(!p||!y.trim())return;h("submitting"),w(null);let e=y.trim();if(e.includes("code="))try{let t=new URL(e).searchParams.get("code");t&&(e=t)}catch(s){let t=e.match(/code=([^&\s]+)/);t&&(e=t[1])}try{let t={"Content-Type":"application/json"};i&&(t["X-CSRF-Token"]=i);let s=await fetch("/api/onboarding/cli/".concat(B,"/code/").concat(p),{method:"POST",credentials:"include",headers:t,body:JSON.stringify({code:e})}),a=await s.json();if(!s.ok){if(a.needsRestart){w('The authentication session timed out. Please click "Try Again" to restart.'),h("error");return}throw Error(a.error||"Failed to submit auth code")}g(""),a.success&&await Y()}catch(t){let e=t instanceof Error?t.message:"Failed to submit auth code";w(e),h("error"),l(e)}},[p,y,B,i,Y,l]);(0,n.useEffect)(()=>{D.current=async(e,t)=>{if(p){h("submitting"),w(null);try{let s={"Content-Type":"application/json"};i&&(s["X-CSRF-Token"]=i);let a=await fetch("/api/onboarding/cli/".concat(B,"/code/").concat(p),{method:"POST",credentials:"include",headers:s,body:JSON.stringify({code:e,state:t})}),n=await a.json();if(!a.ok){if(n.needsRestart){w('The authentication session timed out. Please click "Try Again" to restart.'),h("error");return}throw Error(n.error||"Failed to submit auth code")}n.success&&await Y()}catch(t){let e=t instanceof Error?t.message:"Failed to submit auth code";w(e),h("error"),l(e)}}}},[p,B,i,Y,l]);let G=(0,n.useCallback)(async()=>{if(U.current=!1,p)try{await fetch("/api/onboarding/cli/".concat(B,"/cancel/").concat(p),{method:"POST",credentials:"include"})}catch(e){}h("idle"),m(null),b(null),g(""),w(null),o()},[p,B,o]);(0,n.useEffect)(()=>("idle"===u&&V(),()=>{U.current=!1,W.current=!1,F(!1)}),[V,u]);let Q="anthropic"===t.id||"anthropic"===B;return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold",style:{backgroundColor:t.color},children:t.displayName[0]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium text-white",children:t.displayName}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["starting"===u&&"Starting authentication...","waiting"===u&&"Complete authentication below","submitting"===u&&"Verifying...","success"===u&&"Connected!","error"===u&&(f||"Authentication failed")]})]})]}),"starting"===u&&(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3 py-4",children:[(0,a.jsxs)("svg",{className:"w-5 h-5 text-accent-cyan 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",{className:"text-text-muted",children:"Preparing authentication..."})]}),"waiting"===u&&x&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"p-4 bg-bg-tertiary rounded-lg border border-border-subtle",children:[(0,a.jsx)("h4",{className:"font-medium text-white mb-2",children:"Complete authentication:"}),M&&R?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Sign in with your OpenAI account in the popup window. You'll see a device code to enter - this confirms the authorization."}):M?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Run the CLI command below. It establishes an SSH tunnel to forward the OAuth callback to your workspace."}):Q?(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-2 list-decimal list-inside",children:[(0,a.jsx)("li",{children:"Click the button below to open the login page"}),(0,a.jsx)("li",{children:"Sign in with your Anthropic account"}),(0,a.jsxs)("li",{children:["After signing in, Anthropic will display an ",(0,a.jsx)("strong",{children:"authentication code"})]}),(0,a.jsx)("li",{children:"Copy that code and paste it in the input below"}),(0,a.jsx)("li",{children:"Click Submit to complete authentication"})]}):(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-2 list-decimal list-inside",children:[(0,a.jsx)("li",{children:"Click the button below to open the login page"}),(0,a.jsxs)("li",{children:["Sign in with your ",t.displayName," account"]}),(0,a.jsx)("li",{children:'If you receive a code, paste it below. Otherwise click "I\'ve completed login"'})]})]}),!(M&&j&&!I)&&(0,a.jsxs)("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"block w-full py-2 px-4 bg-bg-tertiary border border-border-subtle text-white font-medium rounded-lg text-center hover:border-accent-cyan/50 transition-all",children:["Open ",t.displayName," Login Page"]}),M&&R?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"p-3 bg-accent-cyan/10 border border-accent-cyan/30 rounded-lg",children:(0,a.jsxs)("p",{className:"text-sm text-accent-cyan",children:[(0,a.jsx)("strong",{children:"Device Authentication:"})," Complete the sign-in in the popup window. After signing in, you'll see a code - enter it on the OpenAI page to authorize."]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-accent-cyan/5 border border-accent-cyan/20 rounded-lg text-sm text-accent-cyan",children:[(0,a.jsxs)("svg",{className:"w-4 h-4 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:"Waiting for authentication to complete..."})]}),(0,a.jsx)("button",{onClick:()=>Y(),className:"w-full py-2 text-text-muted hover:text-white transition-colors text-sm",children:"I've completed authentication"})]}):M?(0,a.jsxs)("div",{className:"space-y-4",children:[T&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-bg-tertiary rounded-lg border border-border-subtle",children:[(0,a.jsxs)("svg",{className:"w-5 h-5 text-accent-cyan 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",{className:"text-sm text-text-muted",children:"Generating session token..."})]}),j&&!I&&!T&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"p-3 bg-accent-cyan/10 border border-accent-cyan/30 rounded-lg",children:[(0,a.jsxs)("p",{className:"text-sm text-accent-cyan mb-2",children:[(0,a.jsx)("strong",{children:"Step 1:"})," Copy and run this command in your terminal"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-deep rounded-lg text-xs font-mono text-white overflow-x-auto",children:j}),(0,a.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(j)},className:"px-3 py-2 bg-bg-tertiary border border-border-subtle rounded-lg text-text-muted hover:text-white hover:border-accent-cyan/50 transition-colors text-xs",children:"Copy"})]})]}),(0,a.jsxs)("div",{className:"p-3 bg-bg-tertiary border border-border-subtle rounded-lg",children:[(0,a.jsxs)("p",{className:"text-sm text-white mb-1",children:[(0,a.jsx)("strong",{children:"Step 2:"})," Sign in with OpenAI"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"The CLI will open your browser to the OpenAI login page. Sign in with your OpenAI account."})]}),(0,a.jsxs)("div",{className:"p-3 bg-bg-tertiary border border-border-subtle rounded-lg",children:[(0,a.jsxs)("p",{className:"text-sm text-white mb-1",children:[(0,a.jsx)("strong",{children:"Step 3:"})," Authentication completes automatically"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"After signing in, the CLI will capture the callback and this page will update automatically."})]}),O&&(0,a.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-success/10 border border-success/30 rounded-lg text-sm text-success",children:[(0,a.jsxs)("svg",{className:"w-4 h-4 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:"Waiting for authentication to complete..."})]}),(0,a.jsx)("button",{onClick:()=>E(!0),className:"text-xs text-text-muted hover:text-white transition-colors",children:"CLI not working? Click here for manual method"})]}),!T&&(I||!j)&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"p-3 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:(0,a.jsxs)("p",{className:"text-xs text-amber-400",children:[(0,a.jsx)("strong",{children:"Manual method:"})," After login, you'll see \"This site can't be reached\" - this is expected! Copy the full URL from your browser's address bar and paste it below."]})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:"Paste the localhost URL here (e.g., http://localhost:...)",value:y,onChange:e=>g(e.target.value),className:"flex-1 px-4 py-3 bg-bg-tertiary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:border-accent-cyan transition-colors font-mono text-sm",onKeyDown:e=>{"Enter"===e.key&&y.trim()&&q()}}),(0,a.jsx)("button",{onClick:q,disabled:!y.trim(),className:"px-6 py-3 bg-accent-cyan text-bg-deep font-semibold rounded-xl hover:bg-accent-cyan/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:"Submit"})]}),j&&(0,a.jsx)("button",{onClick:()=>E(!1),className:"text-xs text-accent-cyan hover:underline",children:"← Back to CLI method"})]})]}):Q?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"p-3 bg-accent-cyan/10 border border-accent-cyan/30 rounded-lg",children:(0,a.jsxs)("p",{className:"text-xs text-accent-cyan",children:[(0,a.jsx)("strong",{children:"Look for the code:"})," After signing in, Anthropic will show you an authentication code. Copy it and paste it below."]})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:"Paste the authentication code here",value:y,onChange:e=>g(e.target.value),className:"flex-1 px-4 py-3 bg-bg-tertiary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:border-accent-cyan transition-colors font-mono text-sm",onKeyDown:e=>{"Enter"===e.key&&y.trim()&&q()}}),(0,a.jsx)("button",{onClick:q,disabled:!y.trim(),className:"px-6 py-3 bg-accent-cyan text-bg-deep font-semibold rounded-xl hover:bg-accent-cyan/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:"Submit"})]})]}):(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:"Paste authentication code (if provided)",value:y,onChange:e=>g(e.target.value),className:"flex-1 px-4 py-3 bg-bg-tertiary border border-border-subtle rounded-xl text-white placeholder-text-muted focus:outline-none focus:border-accent-cyan transition-colors font-mono text-sm",onKeyDown:e=>{"Enter"===e.key&&y.trim()&&q()}}),(0,a.jsx)("button",{onClick:q,disabled:!y.trim(),className:"px-6 py-3 bg-accent-cyan text-bg-deep font-semibold rounded-xl hover:bg-accent-cyan/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:"Submit"})]}),(0,a.jsx)("button",{onClick:()=>Y(),className:"w-full py-2 text-text-muted hover:text-white transition-colors text-sm",children:"No code? Click here if you've completed login"})]}),(0,a.jsx)("button",{onClick:G,className:"w-full py-2 text-text-muted hover:text-white transition-colors text-sm",children:"Cancel"})]}),"submitting"===u&&(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3 py-4",children:[(0,a.jsxs)("svg",{className:"w-5 h-5 text-accent-cyan 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",{className:"text-text-muted",children:"Verifying authentication..."})]}),"success"===u&&(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3 py-4",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-success/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,a.jsxs)("span",{className:"text-white font-medium",children:[t.displayName," connected!"]})]}),"error"===u&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"p-4 bg-error/10 border border-error/30 rounded-lg text-error text-sm",children:f||"Authentication failed. Please try again."}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsx)("button",{onClick:V,className:"flex-1 py-2 px-4 bg-bg-tertiary border border-border-subtle text-white rounded-lg hover:border-accent-cyan/50 transition-colors",children:"Try Again"}),(0,a.jsx)("button",{onClick:G,className:"py-2 px-4 text-text-muted hover:text-white transition-colors",children:"Cancel"})]})]})]})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[847],{9376:function(e,t,n){"use strict";var r=n(5475);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},257:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(4227)},4601:function(){},4227:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function u(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(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var c=[],l=!1,a=-1;function h(){l&&r&&(l=!1,r.length?c=r.concat(c):a=-1,c.length&&d())}function d(){if(!l){var e=u(h);l=!0;for(var t=c.length;t;){for(r=c,c=[];++a<t;)r&&r[a].run();a=-1,t=c.length}r=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||l||u(d)},f.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=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,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}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(229);e.exports=i}()},8975:function(e,t,n){"use strict";var r=n(257);n(4601);var i=n(2265),s=i&&"object"==typeof i&&"default"in i?i:{default:i},o=void 0!==r&&r.env&&!0,u=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,i=t.optimizeForSpeed,s=void 0===i?o:i;l(u(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",l("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var c="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=c?c.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(l(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(l(u(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var n="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];l(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},t.deleteRule=function(e){if("undefined"==typeof window){this._serverSheet.deleteRule(e);return}if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];l(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},t.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,n){t&&l(u(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return n?i.insertBefore(r,n):i.appendChild(r),r},function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var a=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},h={};function d(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return h[r]||(h[r]="jsx-"+a(e+"-"+n)),h[r]}function f(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;return h[n]||(h[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[n]}var p=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,i=t.optimizeForSpeed,s=void 0!==i&&i;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),r&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,i=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var s=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=s,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return s.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var i=d(r,n);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return f(i,e)}):[f(i,t)]}}return{styleId:d(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var _=s.default.useInsertionEffect||s.default.useLayoutEffect,v="undefined"!=typeof window?new p:void 0;function y(e){var t=v||i.useContext(m);return t&&("undefined"==typeof window?t.add(e):_(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}y.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=y},29:function(e,t,n){"use strict";e.exports=n(8975).style}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[891],{6272:function(e,t,n){n.d(t,{K7:function(){return s}});var r=n(7437);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(2265)},4736:function(e,t,n){n.d(t,{$:function(){return i}});var r=n(7437),s=n(2265),o=n(9540),c=n(1561);let l={background:"#0d0f14",foreground:"#c9d1d9",cursor:"#58a6ff",cursorAccent:"#0d0f14",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#484f58",red:"#f85149",green:"#3fb950",yellow:"#d29922",blue:"#58a6ff",magenta:"#bc8cff",cyan:"#39c5cf",white:"#b1bac4",brightBlack:"#6e7681",brightRed:"#ff7b72",brightGreen:"#56d364",brightYellow:"#e3b341",brightBlue:"#79c0ff",brightMagenta:"#d2a8ff",brightCyan:"#56d4dd",brightWhite:"#ffffff"},a=[/https:\/\/console\.anthropic\.com\/oauth/i,/https:\/\/auth\.openai\.com/i,/https:\/\/accounts\.google\.com/i,/https:\/\/github\.com\/login\/oauth/i,/https:\/\/[^\s]+\/oauth/i,/https:\/\/[^\s]+\/auth/i,/https:\/\/[^\s]+\/login/i];function i(e){let{provider:t,workspaceId:n,csrfToken:i,maxHeight:f="400px",onSuccess:h,onError:p,onCancel:m,onConnectAnother:b,showHeader:g=!0,className:y=""}=e,k=(0,s.useRef)(null),j=(0,s.useRef)(null),v=(0,s.useRef)(null),w=(0,s.useRef)(null),N=(0,s.useRef)(null),C=(0,s.useRef)(new Set),S=(0,s.useRef)(!1),R=(0,s.useRef)(null),[L,E]=(0,s.useState)(!1),[T,F]=(0,s.useState)(!1),[W,_]=(0,s.useState)(!1),[O,M]=(0,s.useState)(null),[B,A]=(0,s.useState)(null),[D,P]=(0,s.useState)(null),[I,U]=(0,s.useState)(!1),[X,J]=(0,s.useState)(!1),[z,H]=(0,s.useState)(!1),[Y,G]=(0,s.useState)(i),K=(0,s.useCallback)(()=>{let e=Date.now().toString(36),n=Math.random().toString(36).substring(2,6);return"__setup__".concat(t.id,"-").concat(e).concat(n)},[t.id]);(0,s.useEffect)(()=>{Y||fetch("/api/auth/session",{credentials:"include"}).then(e=>{let t=e.headers.get("X-CSRF-Token");t&&G(t)}).catch(()=>{})},[Y]);let $=(0,s.useCallback)(async()=>{if(n&&B)try{let e={};Y&&(e["X-CSRF-Token"]=Y),await fetch("/api/workspaces/".concat(n,"/agents/").concat(encodeURIComponent(B)),{method:"DELETE",credentials:"include",headers:e})}catch(e){}},[n,B,Y]),q=(0,s.useCallback)(async()=>{if(!n||!Y)return;E(!0),M(null);let e=K();try{let r={"Content-Type":"application/json"};Y&&(r["X-CSRF-Token"]=Y);let s=await fetch("/api/workspaces/".concat(n,"/agents"),{method:"POST",credentials:"include",headers:r,body:JSON.stringify({name:e,provider:"anthropic"===t.id?"claude":t.id,interactive:!0})});if(!s.ok){let e=await s.json();throw Error(e.error||"Failed to spawn agent")}A(e)}catch(t){let e=t instanceof Error?t.message:"Failed to spawn agent";M(e),null==p||p(e)}finally{E(!1)}},[n,Y,t.id,K,p]);(0,s.useEffect)(()=>{if(!k.current)return;let e=new o.o({theme:l,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:12,lineHeight:1.4,convertEol:!0,scrollback:1e4,cursorBlink:!0,cursorStyle:"block",disableStdin:!1,allowProposedApi:!0}),t=new c.X;e.loadAddon(t),e.open(k.current),t.fit(),j.current=e,v.current=t;let n=new ResizeObserver(()=>{t.fit()});return n.observe(k.current),()=>{n.disconnect(),e.dispose(),j.current=null,v.current=null}},[]);let Q=(0,s.useRef)(X);Q.current=X;let V=(0,s.useCallback)(e=>{if(Q.current)return!1;for(let t of a)if(e.match(t)){let t=e.match(/https:\/\/[^\s\])"']+/i);if(t){let e=t[0];if(!C.current.has(e))return C.current.add(e),P(e),U(!0),!0}}return!1},[]);(0,s.useEffect)(()=>{if(!B||!n)return;S.current=!1;let e=()=>{var t;if((null===(t=w.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN)return;let r="https:"===window.location.protocol?"wss:":"ws:",s="".concat(r,"//").concat(window.location.host,"/ws/logs/").concat(encodeURIComponent(n),"/").concat(encodeURIComponent(B));_(!0);let o=new WebSocket(s);w.current=o,o.onopen=()=>{if(F(!0),_(!1),!S.current){var e,t;S.current=!0,null===(e=j.current)||void 0===e||e.writeln("\x1b[90m[Connected - Interactive Mode]\x1b[0m"),null===(t=j.current)||void 0===t||t.writeln("\x1b[90m[Type directly to respond to prompts]\x1b[0m\n")}},o.onclose=()=>{F(!1),_(!1),N.current=setTimeout(e,2e3)},o.onmessage=e=>{var t,n;try{let n=JSON.parse(e.data);if("history"===n.type&&Array.isArray(n.lines))n.lines.forEach(e=>{var t;null===(t=j.current)||void 0===t||t.writeln(e),V(e)});else if("log"===n.type||"output"===n.type){let e=n.content||n.data||n.message||"";e&&(null===(t=j.current)||void 0===t||t.write(e),V(e))}}catch(t){"string"==typeof e.data&&(null===(n=j.current)||void 0===n||n.write(e.data),V(e.data))}},R.current&&(R.current.dispose(),R.current=null),j.current&&(R.current=j.current.onData(e=>{o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"input",agent:B,data:e}))}))};return e(),()=>{var e;N.current&&(clearTimeout(N.current),N.current=null),R.current&&(R.current.dispose(),R.current=null),null===(e=w.current)||void 0===e||e.close(),w.current=null}},[B,n,V]),(0,s.useEffect)(()=>{!Y||B||L||q()},[Y,B,L,q]),(0,s.useEffect)(()=>()=>{$()},[$]);let Z=(0,s.useCallback)(()=>{D&&(window.open(D,"_blank","width=600,height=700"),U(!1))},[D]),ee=(0,s.useCallback)(async()=>{let e=t.name||t.id;try{let t={"Content-Type":"application/json"};Y&&(t["X-CSRF-Token"]=Y);let r=await fetch("/api/onboarding/mark-connected/".concat(e),{method:"POST",credentials:"include",headers:t,body:JSON.stringify({workspaceId:n})});r.ok||console.error("Failed to mark provider as connected:",await r.text())}catch(e){console.error("Error marking provider as connected:",e)}await $(),H(!0)},[$,t.id,t.name,Y,n]),et=(0,s.useCallback)(()=>{null==h||h()},[h]),en=(0,s.useCallback)(()=>{null==b||b()},[b]),er=(0,s.useCallback)(async()=>{await $(),null==m||m()},[$,m]);return(0,r.jsxs)("div",{className:"flex flex-col rounded-xl overflow-hidden border border-border-subtle ".concat(y),children:[g&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg-tertiary",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white font-bold text-sm",style:{backgroundColor:t.color},children:t.displayName[0]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("h4",{className:"text-sm font-semibold text-text-primary",children:[t.displayName," Setup"]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Interactive terminal"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[T&&(0,r.jsxs)("span",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-success/15 text-xs text-success",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Connected"]}),m&&(0,r.jsx)("button",{onClick:er,className:"p-1.5 rounded-lg hover:bg-bg-hover text-text-muted hover:text-text-primary transition-colors",children:(0,r.jsx)(d,{})})]})]}),z?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-6",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:"".concat(t.color,"20")},children:(0,r.jsx)(x,{className:"w-8 h-8",style:{color:t.color}})}),(0,r.jsxs)("h3",{className:"text-lg font-semibold text-text-primary mb-2",children:[t.displayName," Connected!"]}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-6 text-center",children:["Your ",t.displayName," account has been successfully connected."]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[b&&(0,r.jsx)("button",{onClick:en,className:"px-4 py-2 bg-bg-hover text-text-primary text-sm font-medium rounded-lg hover:bg-bg-tertiary transition-colors border border-border-subtle",children:"Connect Another Provider"}),(0,r.jsx)("button",{onClick:et,className:"px-4 py-2 bg-accent-cyan text-bg-deep text-sm font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Continue to Dashboard"})]})]}):(0,r.jsxs)(r.Fragment,{children:[O&&(0,r.jsxs)("div",{className:"px-4 py-3 bg-error/10 border-b border-error/30 text-sm text-error flex items-center gap-2",children:[(0,r.jsx)(u,{}),(0,r.jsx)("span",{children:O}),(0,r.jsx)("button",{onClick:q,className:"ml-auto text-xs px-2 py-1 rounded bg-error/20 hover:bg-error/30 transition-colors",children:"Retry"})]}),L&&(0,r.jsxs)("div",{className:"px-4 py-3 bg-accent-cyan/10 border-b border-accent-cyan/30 text-sm text-accent-cyan flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-4 h-4 border-2 border-accent-cyan/30 border-t-accent-cyan rounded-full animate-spin"}),(0,r.jsxs)("span",{children:["Starting ",t.displayName,"..."]})]}),(0,r.jsx)("div",{ref:k,className:"flex-1 bg-[#0d0f14]",style:{minHeight:"300px",maxHeight:f},onClick:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.focus()}}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-border-subtle bg-bg-tertiary",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Respond to prompts above to complete setup"}),(0,r.jsx)("button",{onClick:ee,className:"px-4 py-2 bg-accent-cyan text-bg-deep text-sm font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Done - Continue"})]})]}),I&&D&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"bg-bg-primary border border-border-subtle rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold",style:{backgroundColor:t.color},children:t.displayName[0]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-white font-medium",children:"Login URL Detected"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"We found a login link in the terminal"})]})]}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:[t.displayName," is asking you to sign in. Click below to open the login page."]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("button",{onClick:Z,className:"flex-1 py-2 px-4 bg-accent-cyan text-bg-deep font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Open Login Page"}),(0,r.jsx)("button",{onClick:()=>{U(!1),J(!0)},className:"px-4 py-2 bg-bg-hover text-text-secondary rounded-lg hover:bg-bg-tertiary transition-colors",children:"Dismiss"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-3",children:"Or copy the URL from the terminal and open it manually."})]})})]})}function d(){return(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,r.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function u(){return(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function x(e){let{className:t,style:n}=e;return(0,r.jsx)("svg",{className:t,style:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[615],{5534:function(e,t,r){Promise.resolve().then(r.bind(r,4011))},4011:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var s=r(7437),a=r(2265),n=r(9376),o=r(6272);function i(){let e=(0,n.useSearchParams)().get("reason")||"new",[t,r]=(0,a.useState)([]),[i,c]=(0,a.useState)(!0),[l,d]=(0,a.useState)(!1),[x,u]=(0,a.useState)(null),[h,m]=(0,a.useState)(null),{trackEvent:p}={trackEvent:(0,a.useCallback)((e,t)=>{try{fetch("/api/analytics/track",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({event:e,properties:t,timestamp:Date.now()})}).catch(()=>{})}catch(e){}},[])};(0,a.useEffect)(()=>{(async()=>{try{let t=await fetch("/api/auth/session",{credentials:"include"});if(404===t.status){window.location.href="/app";return}let s=t.headers.get("X-CSRF-Token");if(s&&m(s),!(await t.json()).authenticated){window.location.href="/login";return}let a=await fetch("/api/workspaces",{credentials:"include"});if(a.ok&&((await a.json()).workspaces||[]).length>0){window.location.href="/app";return}let n=await fetch("/api/github-app/repos",{credentials:"include"});if(n.ok){let e=await n.json();r(e.repositories||[])}p("onboarding_page_view",{reason:e}),c(!1)}catch(e){console.error("Onboarding init error:",e),u(e instanceof Error?e.message:"Failed to initialize"),c(!1)}})()},[e,p]);let f=(0,a.useCallback)(async e=>{d(!0),u(null),p("onboarding_repo_selected",{repository:e});try{let t={"Content-Type":"application/json"};h&&(t["X-CSRF-Token"]=h);let r=await fetch("/api/workspaces/quick",{method:"POST",credentials:"include",headers:t,body:JSON.stringify({repositoryFullName:e})}),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to create workspace");p("onboarding_workspace_created",{workspaceId:s.workspaceId,repository:e}),window.location.href="/app"}catch(e){console.error("Create workspace error:",e),u(e instanceof Error?e.message:"Failed to create workspace"),d(!1)}},[h,p]),b=(0,a.useCallback)(()=>{p("onboarding_connect_repos_clicked",{reason:e}),window.location.href="/connect-repos"},[e,p]);if(i)return(0,s.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,s.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading..."})]})});if(l)return(0,s.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,s.jsx)("p",{className:"mt-4 text-white font-medium",children:"Creating your workspace..."}),(0,s.jsx)("p",{className:"mt-2 text-text-muted text-sm",children:"This may take a few minutes"})]})});let g="deleted"===e;return(0,s.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,s.jsx)("div",{className:"fixed inset-0 opacity-10 pointer-events-none",children:(0,s.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,s.jsxs)("div",{className:"relative z-10 w-full max-w-2xl",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,s.jsx)(o.K7,{size:56,withGlow:!0}),(0,s.jsx)("h1",{className:"mt-6 text-3xl font-bold text-white",children:g?"Workspace Deleted":"Welcome to Agent Relay"}),(0,s.jsx)("p",{className:"mt-3 text-text-muted text-center max-w-md",children:g?"Your workspace has been deleted. Create a new one to continue working with AI agents.":"Get started by creating your first workspace. Connect a repository and let AI agents help you build."})]}),x&&(0,s.jsx)("div",{className:"mb-6 p-4 bg-error/10 border border-error/20 rounded-xl",children:(0,s.jsx)("p",{className:"text-error text-center",children:x})}),(0,s.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8",children:[!g&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-8",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-accent-cyan flex items-center justify-center text-bg-deep font-semibold text-sm",children:"1"}),(0,s.jsx)("span",{className:"text-white font-medium",children:"Select Repository"})]}),(0,s.jsx)("div",{className:"w-12 h-px bg-border-subtle"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-bg-tertiary border border-border-subtle flex items-center justify-center text-text-muted font-semibold text-sm",children:"2"}),(0,s.jsx)("span",{className:"text-text-muted",children:"Connect AI Provider"})]}),(0,s.jsx)("div",{className:"w-12 h-px bg-border-subtle"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-bg-tertiary border border-border-subtle flex items-center justify-center text-text-muted font-semibold text-sm",children:"3"}),(0,s.jsx)("span",{className:"text-text-muted",children:"Start Building"})]})]}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:g?"Create a New Workspace":"Choose a Repository"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:g?"Select a repository to create a new workspace for your AI agents.":"Your workspace will be set up with this repository. You can add more repos later."}),t.length>0?(0,s.jsx)("div",{className:"space-y-3",children:t.map(e=>(0,s.jsxs)("button",{onClick:()=>f(e.fullName),disabled:l,className:"w-full flex items-center gap-4 p-4 bg-bg-tertiary rounded-xl border border-border-subtle hover:border-accent-cyan/50 hover:bg-bg-hover transition-all text-left group disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("div",{className:"w-12 h-12 rounded-lg bg-bg-card border border-border-subtle flex items-center justify-center flex-shrink-0 group-hover:border-accent-cyan/30 transition-colors",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-text-muted group-hover:text-accent-cyan transition-colors",fill:"currentColor",viewBox:"0 0 16 16",children:(0,s.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,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-white font-medium truncate group-hover:text-accent-cyan transition-colors",children:e.fullName}),(0,s.jsxs)("p",{className:"text-text-muted text-sm mt-0.5",children:[e.isPrivate?"Private repository":"Public repository"," \xb7 ",e.defaultBranch]})]}),(0,s.jsx)("svg",{className:"w-5 h-5 text-text-muted group-hover:text-accent-cyan group-hover:translate-x-1 transition-all",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]},e.id))}):(0,s.jsxs)("div",{className:"text-center py-12 bg-bg-tertiary rounded-xl border border-border-subtle",children:[(0,s.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-bg-card rounded-full flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-8 h-8 text-text-muted",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.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,s.jsx)("h3",{className:"text-lg font-semibold text-white mb-2",children:"No Repositories Connected"}),(0,s.jsx)("p",{className:"text-text-muted mb-6 max-w-sm mx-auto",children:"Connect your GitHub repositories to create a workspace and start working with AI agents."}),(0,s.jsxs)("button",{onClick:b,className:"inline-flex items-center gap-2 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:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"})}),"Connect GitHub"]})]})]}),(0,s.jsxs)("div",{className:"mt-8 flex justify-center gap-6 text-sm",children:[t.length>0&&(0,s.jsx)("button",{onClick:b,className:"text-text-muted hover:text-white transition-colors",children:"Connect More Repositories"}),(0,s.jsx)("a",{href:"/app",className:"text-text-muted hover:text-white transition-colors",children:"Back to Dashboard"}),(0,s.jsx)("button",{onClick:async()=>{let e={};h&&(e["X-CSRF-Token"]=h),await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:e}),window.location.href="/login"},className:"text-text-muted hover:text-white transition-colors",children:"Sign Out"})]})]})]})}function c(){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,s.jsx)("p",{className:"mt-4 text-text-muted",children:"Loading..."})]})}),children:(0,s.jsx)(i,{})})}},9376:function(e,t,r){"use strict";var s=r(5475);r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},6272:function(e,t,r){"use strict";r.d(t,{K7:function(){return a}});var s=r(7437);function a(e){let{size:t=24,className:r="",withGlow:a=!1}=e;return(0,s.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(a?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(r,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,s.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,s.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,s.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,s.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"})]})}r(2265)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=5534)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[191],{1702:function(e,n,t){Promise.resolve().then(t.bind(t,3330))},3330:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return f}});var r=t(7437),a=t(2265),s=t(7320),i=t(5372),o=t(6272),l=t(9116);let c=[{id:"creating",name:"Initialize",description:"Creating workspace container",estimatedSeconds:5,icon:"◈"},{id:"networking",name:"Network",description:"Configuring DNS & IP allocation",estimatedSeconds:8,icon:"◇"},{id:"secrets",name:"Secure",description:"Encrypting credentials",estimatedSeconds:3,icon:"◆"},{id:"machine",name:"Deploy",description:"Launching cloud instance",estimatedSeconds:25,icon:"▣"},{id:"booting",name:"Boot",description:"Starting relay services",estimatedSeconds:20,icon:"▢"},{id:"health",name:"Verify",description:"Running health checks",estimatedSeconds:15,icon:"◉"}],d=["> Establishing secure connection...","> Allocating compute resources...","> Configuring agent protocols...","> Initializing relay daemon...","> Syncing workspace state...","> Warming up inference engine...","> Connecting to neural mesh...","> Deploying agent swarm..."];function p(e){let{currentStage:n,isProvisioning:t,workspaceName:s,error:i,onCancel:o}=e,[l,p]=(0,a.useState)(0),[g,u]=(0,a.useState)([]),[h,b]=(0,a.useState)(!0);(0,a.useEffect)(()=>{if(!t){p(0);return}let e=setInterval(()=>{p(e=>e+1)},1e3);return()=>clearInterval(e)},[t]),(0,a.useEffect)(()=>{let e=setInterval(()=>{b(e=>!e)},530);return()=>clearInterval(e)},[]),(0,a.useEffect)(()=>{if(!t){u([]);return}let e=()=>{let e=d[Math.floor(Math.random()*d.length)];u(n=>[...n.slice(-4),e])};e();let n=setInterval(e,3500);return()=>clearInterval(n)},[t]);let f=(0,a.useMemo)(()=>{if(n){let e=c.findIndex(e=>e.id===n);return e>=0?e:0}let e=0;for(let n=0;n<c.length;n++)if(l<(e+=c[n].estimatedSeconds))return n;return c.length-1},[n,l]),w=(0,a.useMemo)(()=>c.reduce((e,n)=>e+n.estimatedSeconds,0),[]),v=(0,a.useMemo)(()=>Math.min(95,Math.round(l/w*100)),[l,w]);return i?(0,r.jsxs)("div",{className:"prov-container prov-error",children:[(0,r.jsx)("div",{className:"error-glitch",children:(0,r.jsx)("span",{className:"error-icon",children:"✕"})}),(0,r.jsx)("h3",{className:"error-title",children:"PROVISIONING FAILED"}),(0,r.jsx)("p",{className:"error-message",children:i}),o&&(0,r.jsx)("button",{onClick:o,className:"retry-btn",children:(0,r.jsx)("span",{children:"RETRY"})}),(0,r.jsx)("style",{children:x})]}):(0,r.jsxs)("div",{className:"prov-container",children:[(0,r.jsx)("div",{className:"ambient-glow"}),(0,r.jsx)("div",{className:"scan-line"}),(0,r.jsxs)("header",{className:"prov-header",children:[(0,r.jsx)("div",{className:"header-badge",children:"PROVISIONING"}),(0,r.jsx)("h1",{className:"header-title",children:s||"Workspace"}),(0,r.jsxs)("div",{className:"header-meta",children:[(0,r.jsx)("span",{className:"meta-time",children:(e=>{let n=Math.floor(e/60),t=e%60;return n>0?"".concat(n,":").concat(t.toString().padStart(2,"0")):"0:".concat(t.toString().padStart(2,"0"))})(l)}),(0,r.jsx)("span",{className:"meta-sep",children:"•"}),(0,r.jsxs)("span",{className:"meta-percent",children:[v,"%"]})]})]}),(0,r.jsxs)("div",{className:"progress-track",children:[(0,r.jsx)("div",{className:"progress-fill",style:{width:"".concat(v,"%")}}),(0,r.jsx)("div",{className:"progress-glow",style:{left:"".concat(v,"%")}})]}),(0,r.jsx)("div",{className:"stages-timeline",children:c.map((e,n)=>{let t=n<f,a=n===f,s=n>f;return(0,r.jsxs)("div",{className:"stage-row ".concat(t?"completed":""," ").concat(a?"current":""," ").concat(s?"pending":""),children:[n>0&&(0,r.jsxs)("div",{className:"stage-connector ".concat(t?"active":""),children:[(0,r.jsx)("div",{className:"connector-line"}),t&&(0,r.jsx)("div",{className:"connector-pulse"})]}),(0,r.jsxs)("div",{className:"stage-node",children:[(0,r.jsx)("span",{className:"node-icon",children:e.icon}),a&&(0,r.jsx)("div",{className:"node-ring"})]}),(0,r.jsxs)("div",{className:"stage-content",children:[(0,r.jsx)("span",{className:"stage-name",children:e.name}),a&&(0,r.jsx)("span",{className:"stage-desc",children:e.description})]}),(0,r.jsxs)("div",{className:"stage-status",children:[t&&(0,r.jsx)("span",{className:"status-done",children:"DONE"}),a&&(0,r.jsx)("span",{className:"status-active",children:"ACTIVE"}),s&&(0,r.jsxs)("span",{className:"status-wait",children:["~",e.estimatedSeconds,"s"]})]})]},e.id)})}),(0,r.jsxs)("div",{className:"terminal-window",children:[(0,r.jsxs)("div",{className:"terminal-header",children:[(0,r.jsx)("span",{className:"terminal-dot red"}),(0,r.jsx)("span",{className:"terminal-dot yellow"}),(0,r.jsx)("span",{className:"terminal-dot green"}),(0,r.jsx)("span",{className:"terminal-title",children:"agent-relay"})]}),(0,r.jsxs)("div",{className:"terminal-body",children:[g.map((e,n)=>(0,r.jsx)("div",{className:"terminal-line",style:{animationDelay:"".concat(.1*n,"s")},children:e},n)),(0,r.jsxs)("div",{className:"terminal-cursor",children:[(0,r.jsx)("span",{className:"cursor-prompt",children:"$"}),(0,r.jsx)("span",{className:"cursor-block ".concat(h?"visible":""),children:"_"})]})]})]}),o&&(0,r.jsx)("button",{onClick:o,className:"cancel-btn",children:"Cancel"}),(0,r.jsx)("style",{children:m})]})}let m="\n .prov-container {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 40px 32px;\n background: linear-gradient(145deg, rgba(10, 15, 25, 0.95) 0%, rgba(5, 10, 18, 0.98) 100%);\n border: 1px solid rgba(6, 182, 212, 0.15);\n border-radius: 16px;\n overflow: hidden;\n font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;\n }\n\n /* Ambient effects */\n .ambient-glow {\n position: absolute;\n top: -100px;\n left: 50%;\n transform: translateX(-50%);\n width: 300px;\n height: 200px;\n background: radial-gradient(ellipse, rgba(6, 182, 212, 0.12) 0%, transparent 70%);\n pointer-events: none;\n }\n\n .scan-line {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.4), transparent);\n animation: scanMove 3s ease-in-out infinite;\n pointer-events: none;\n }\n\n @keyframes scanMove {\n 0%, 100% { top: 0; opacity: 0.5; }\n 50% { top: 100%; opacity: 0.2; }\n }\n\n /* Header */\n .prov-header {\n text-align: center;\n position: relative;\n z-index: 1;\n }\n\n .header-badge {\n display: inline-block;\n padding: 4px 12px;\n background: rgba(6, 182, 212, 0.1);\n border: 1px solid rgba(6, 182, 212, 0.3);\n border-radius: 4px;\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 2px;\n color: #06b6d4;\n margin-bottom: 12px;\n }\n\n .header-title {\n font-size: 22px;\n font-weight: 600;\n color: #f1f5f9;\n margin: 0 0 8px 0;\n letter-spacing: -0.5px;\n }\n\n .header-meta {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-size: 13px;\n color: #64748b;\n }\n\n .meta-time {\n font-variant-numeric: tabular-nums;\n }\n\n .meta-percent {\n color: #06b6d4;\n font-weight: 500;\n }\n\n .meta-sep {\n opacity: 0.3;\n }\n\n /* Progress bar */\n .progress-track {\n position: relative;\n height: 4px;\n background: rgba(100, 116, 139, 0.2);\n border-radius: 2px;\n overflow: visible;\n }\n\n .progress-fill {\n height: 100%;\n background: linear-gradient(90deg, #0891b2, #06b6d4, #22d3ee);\n border-radius: 2px;\n transition: width 0.5s ease;\n }\n\n .progress-glow {\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 8px;\n height: 8px;\n background: #22d3ee;\n border-radius: 50%;\n box-shadow: 0 0 16px rgba(34, 211, 238, 0.6);\n transition: left 0.5s ease;\n }\n\n /* Stages */\n .stages-timeline {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: 16px 0;\n }\n\n .stage-row {\n display: grid;\n grid-template-columns: 40px 1fr auto;\n align-items: center;\n gap: 12px;\n padding: 10px 0;\n position: relative;\n }\n\n .stage-connector {\n position: absolute;\n left: 19px;\n top: -10px;\n width: 2px;\n height: 20px;\n }\n\n .connector-line {\n width: 100%;\n height: 100%;\n background: rgba(100, 116, 139, 0.3);\n transition: background 0.3s ease;\n }\n\n .stage-connector.active .connector-line {\n background: linear-gradient(180deg, #06b6d4, rgba(6, 182, 212, 0.3));\n }\n\n .connector-pulse {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(180deg, rgba(34, 211, 238, 0.8), transparent);\n animation: pulseLine 1.5s ease-out infinite;\n }\n\n @keyframes pulseLine {\n 0% { opacity: 1; transform: translateY(-100%); }\n 100% { opacity: 0; transform: translateY(100%); }\n }\n\n .stage-node {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n\n .node-icon {\n font-size: 18px;\n color: #475569;\n transition: all 0.3s ease;\n }\n\n .stage-row.completed .node-icon {\n color: #06b6d4;\n }\n\n .stage-row.current .node-icon {\n color: #22d3ee;\n text-shadow: 0 0 12px rgba(34, 211, 238, 0.5);\n }\n\n .node-ring {\n position: absolute;\n inset: 4px;\n border: 2px solid rgba(34, 211, 238, 0.4);\n border-radius: 50%;\n animation: ringPulse 2s ease-in-out infinite;\n }\n\n @keyframes ringPulse {\n 0%, 100% { transform: scale(1); opacity: 1; }\n 50% { transform: scale(1.2); opacity: 0.5; }\n }\n\n .stage-content {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n }\n\n .stage-name {\n font-size: 13px;\n font-weight: 500;\n color: #64748b;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n transition: color 0.3s ease;\n }\n\n .stage-row.completed .stage-name {\n color: #475569;\n }\n\n .stage-row.current .stage-name {\n color: #f1f5f9;\n }\n\n .stage-desc {\n font-size: 11px;\n color: #64748b;\n animation: fadeSlideIn 0.3s ease;\n }\n\n @keyframes fadeSlideIn {\n from { opacity: 0; transform: translateX(-8px); }\n to { opacity: 1; transform: translateX(0); }\n }\n\n .stage-status {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 1px;\n }\n\n .status-done {\n color: #06b6d4;\n }\n\n .status-active {\n color: #22d3ee;\n animation: blink 1s ease-in-out infinite;\n }\n\n @keyframes blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n\n .status-wait {\n color: #475569;\n font-variant-numeric: tabular-nums;\n }\n\n /* Terminal */\n .terminal-window {\n background: rgba(0, 0, 0, 0.4);\n border: 1px solid rgba(100, 116, 139, 0.2);\n border-radius: 8px;\n overflow: hidden;\n }\n\n .terminal-header {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n background: rgba(30, 41, 59, 0.5);\n border-bottom: 1px solid rgba(100, 116, 139, 0.15);\n }\n\n .terminal-dot {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n }\n\n .terminal-dot.red { background: #ef4444; }\n .terminal-dot.yellow { background: #eab308; }\n .terminal-dot.green { background: #22c55e; }\n\n .terminal-title {\n margin-left: auto;\n font-size: 11px;\n color: #64748b;\n }\n\n .terminal-body {\n padding: 12px;\n min-height: 100px;\n }\n\n .terminal-line {\n font-size: 12px;\n color: #94a3b8;\n padding: 2px 0;\n animation: typeIn 0.3s ease;\n }\n\n @keyframes typeIn {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .terminal-cursor {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-top: 8px;\n }\n\n .cursor-prompt {\n color: #06b6d4;\n font-weight: 600;\n }\n\n .cursor-block {\n color: #22d3ee;\n opacity: 0;\n transition: opacity 0.1s;\n }\n\n .cursor-block.visible {\n opacity: 1;\n }\n\n /* Cancel button */\n .cancel-btn {\n align-self: center;\n padding: 8px 20px;\n background: transparent;\n border: 1px solid rgba(100, 116, 139, 0.3);\n border-radius: 6px;\n color: #64748b;\n font-family: inherit;\n font-size: 12px;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .cancel-btn:hover {\n border-color: rgba(239, 68, 68, 0.5);\n color: #ef4444;\n }\n",x="\n .prov-container.prov-error {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 48px 32px;\n background: linear-gradient(145deg, rgba(25, 10, 10, 0.95) 0%, rgba(15, 5, 8, 0.98) 100%);\n border: 1px solid rgba(239, 68, 68, 0.2);\n border-radius: 16px;\n text-align: center;\n font-family: 'SF Mono', 'JetBrains Mono', monospace;\n }\n\n .error-glitch {\n position: relative;\n width: 64px;\n height: 64px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(239, 68, 68, 0.1);\n border: 1px solid rgba(239, 68, 68, 0.3);\n border-radius: 12px;\n }\n\n .error-icon {\n font-size: 28px;\n color: #ef4444;\n animation: glitch 0.3s ease infinite;\n }\n\n @keyframes glitch {\n 0%, 100% { transform: translate(0); }\n 25% { transform: translate(-2px, 1px); }\n 50% { transform: translate(2px, -1px); }\n 75% { transform: translate(-1px, -1px); }\n }\n\n .error-title {\n font-size: 14px;\n font-weight: 600;\n letter-spacing: 2px;\n color: #ef4444;\n margin: 0;\n }\n\n .error-message {\n font-size: 13px;\n color: #94a3b8;\n max-width: 350px;\n margin: 0;\n line-height: 1.5;\n }\n\n .retry-btn {\n margin-top: 8px;\n padding: 10px 28px;\n background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);\n border: 1px solid rgba(239, 68, 68, 0.4);\n border-radius: 6px;\n color: #ef4444;\n font-family: inherit;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 1px;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .retry-btn:hover {\n background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.3) 100%);\n border-color: rgba(239, 68, 68, 0.6);\n transform: translateY(-1px);\n }\n";var g=t(9631),u=t(257);let h=[{id:"anthropic",name:"Anthropic",displayName:"Claude",color:"#D97757",cliCommand:"claude"},{id:"codex",name:"OpenAI",displayName:"Codex",color:"#10A37F",cliCommand:"codex login",supportsDeviceFlow:!0,requiresUrlCopy:!0},{id:"google",name:"Google",displayName:"Gemini",color:"#4285F4",cliCommand:"gemini"},{id:"opencode",name:"OpenCode",displayName:"OpenCode",color:"#00D4AA",cliCommand:"opencode"},{id:"droid",name:"Factory",displayName:"Droid",color:"#6366F1",cliCommand:"droid"},{id:"cursor",name:"Cursor",displayName:"Cursor",color:"#7C3AED",cliCommand:"agent"}],b="true"===u.env.NEXT_PUBLIC_FORCE_CLOUD_MODE;function f(){let[e,n]=(0,a.useState)("loading"),[t,c]=(0,a.useState)([]),[d,m]=(0,a.useState)([]),[x,u]=(0,a.useState)(null),[f,w]=(0,a.useState)(void 0),[v,j]=(0,a.useState)(null),[N,k]=(0,a.useState)(b),[y,C]=(0,a.useState)(null),[S,I]=(0,a.useState)(null),[E,z]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/auth/session",{credentials:"include"});if(404===e.status){if(b)throw Error("Cloud mode enforced but session endpoint returned 404. Is the cloud server running?");k(!1),n("local");return}let t=e.headers.get("X-CSRF-Token");t&&C(t);let r=await e.json();if(!r.authenticated){window.location.href="/login";return}k(!0);let a={openai:"codex"};if(r.connectedProviders){let e=[];r.connectedProviders.forEach(n=>{e.push(n.provider);let t=a[n.provider];t&&e.push(t)}),z(e)}let[s,i]=await Promise.all([fetch("/api/workspaces/accessible",{credentials:"include"}),fetch("/api/github-app/repos",{credentials:"include"})]);if(!s.ok){if(401===s.status){window.location.href="/login";return}throw Error("Failed to fetch workspaces")}let o=await s.json(),l=i.ok?await i.json():{repositories:[]};c(o.workspaces||[]),m(l.repositories||[]);let d=(o.workspaces||[]).filter(e=>"running"===e.status&&e.publicUrl);1===d.length?M(d[0]):d.length>1?n("select-workspace"):(o.workspaces||[]).length>0?n("select-workspace"):(l.repositories||[]).length>0?n("no-workspaces"):window.location.href="/connect-repos"}catch(e){if(e instanceof TypeError&&e.message.includes("Failed to fetch")){if(b){console.error("Cloud mode enforced but network request failed:",e),j("Cloud mode enforced but failed to connect to server. Is the cloud server running?"),n("error");return}k(!1),n("local");return}console.error("Init error:",e),j(e instanceof Error?e.message:"Failed to initialize"),n("error")}})()},[]);let M=(0,a.useCallback)(e=>{if(!e.publicUrl){j("Workspace has no public URL"),n("error");return}u(e),n("connecting"),(0,l.hc)(e.id);let t=new URL(e.publicUrl),r="https:"===t.protocol?"wss:":"ws:";w("".concat(r,"//").concat(t.host,"/ws")),n("connected")},[]),F=(0,a.useCallback)(async e=>{j(null);try{let t={"Content-Type":"application/json"};y&&(t["X-CSRF-Token"]=y);let r=await fetch("/api/workspaces/quick",{method:"POST",credentials:"include",headers:t,body:JSON.stringify({repositoryFullName:e})}),a=await r.json();if(!r.ok)throw Error(a.error||"Failed to create workspace");let s=Date.now();I({workspaceId:a.workspaceId,workspaceName:e.split("/")[1]||e,stage:null,startedAt:s}),n("provisioning");let i=async e=>{let t=0;for(;t<150;){var r;let a=await fetch("/api/workspaces/".concat(e,"/status"),{credentials:"include"}),s=await a.json();if((null===(r=s.provisioning)||void 0===r?void 0:r.stage)&&I(e=>e?{...e,stage:s.provisioning.stage}:null),"running"===s.status){let t=await fetch("/api/workspaces/".concat(e),{credentials:"include"}),r=await t.json();if(r.publicUrl){I(null),u(r),n("connect-provider");return}}else if("error"===s.status){let e=s.errorMessage||"Workspace provisioning failed";throw Error(e)}await new Promise(e=>setTimeout(e,2e3)),++t%15==0&&console.log("[workspace] Still provisioning... (".concat(Math.floor(2e3*t/1e3),"s elapsed)"))}throw Error("Workspace provisioning timed out after 5 minutes. Please try again or contact support.")};await i(a.workspaceId)}catch(e){console.error("Create workspace error:",e),I(null),j(e instanceof Error?e.message:"Failed to create workspace"),n("no-workspaces")}},[M,y]),P=(0,a.useCallback)(e=>{z(n=>[...new Set([...n,e])])},[]),O=(0,a.useCallback)(()=>{x&&M(x)},[x,M]),T=(0,a.useCallback)(async e=>{n("loading"),j(null);try{let n={};y&&(n["X-CSRF-Token"]=y);let t=await fetch("/api/workspaces/".concat(e.id,"/restart"),{method:"POST",credentials:"include",headers:n});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to start workspace")}let r=0;for(;r<60;){let n=await fetch("/api/workspaces/".concat(e.id,"/status"),{credentials:"include"}),t=await n.json();if("running"===t.status){let n=await fetch("/api/workspaces/".concat(e.id),{credentials:"include"}),t=await n.json();if(t.publicUrl){M({...e,...t});return}}await new Promise(e=>setTimeout(e,2e3)),r++}throw Error("Workspace start timed out")}catch(e){console.error("Start workspace error:",e),j(e instanceof Error?e.message:"Failed to start workspace"),n("select-workspace")}},[M,y]);return"loading"===e?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",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)("p",{className:"mt-4 text-text-muted",children:"Loading..."})]})}):"local"===e?(0,r.jsx)(s.gV,{}):"connected"===e&&f?(0,r.jsx)(i.TI,{cloudMode:!0,children:(0,r.jsx)(s.gV,{wsUrl:f})}):"connecting"===e?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",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.jsxs)("p",{className:"mt-4 text-white font-medium",children:["Connecting to ",null==x?void 0:x.name,"..."]}),(0,r.jsx)("p",{className:"mt-2 text-text-muted text-sm",children:null==x?void 0:x.publicUrl})]})}):"provisioning"===e&&S?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,r.jsx)("div",{className:"w-full max-w-xl",children:(0,r.jsx)(p,{isProvisioning:!0,currentStage:S.stage,workspaceName:S.workspaceName,error:v,onCancel:()=>{I(null),n("no-workspaces")}})})}):"error"===e?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center p-4",children:(0,r.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 max-w-md w-full text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-error/20 rounded-full flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Something went wrong"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:v}),(0,r.jsx)("button",{onClick:()=>window.location.reload(),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"})]})}):"connect-provider"===e&&x?(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 pointer-events-none",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-xl",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:"Connect AI Provider"}),(0,r.jsxs)("p",{className:"mt-2 text-text-muted text-center",children:["Your workspace ",(0,r.jsx)("span",{className:"text-white",children:x.name})," is ready!",(0,r.jsx)("br",{}),"Connect an AI provider to start using agents."]})]}),(0,r.jsx)(g.c,{providers:h,connectedProviders:E,workspaceId:x.id,csrfToken:y||void 0,onProviderConnected:P,onContinue:O,showDetailedInfo:!0})]})]}):(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 pointer-events-none",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-2xl",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:"no-workspaces"===e?"Create a workspace to get started":"Select a workspace"})]}),v&&(0,r.jsx)("div",{className:"mb-4 p-4 bg-error/10 border border-error/20 rounded-xl",children:(0,r.jsx)("p",{className:"text-error",children:v})}),"select-workspace"===e&&t.length>0&&(0,r.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Your Workspaces"}),(0,r.jsx)("div",{className:"space-y-3",children:t.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 bg-bg-tertiary rounded-xl border border-border-subtle hover:border-accent-cyan/50 transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full ".concat("running"===e.status?"bg-success":"provisioning"===e.status?"bg-warning animate-pulse":"error"===e.status?"bg-error":"bg-gray-500")}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium text-white",children:e.name}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"running"===e.status?"Running":"provisioning"===e.status?"Starting...":"stopped"===e.status?"Stopped":"Error"})]})]}),(0,r.jsx)("div",{children:"running"===e.status&&e.publicUrl?(0,r.jsx)("button",{onClick:()=>M(e),className:"py-2 px-4 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-lg hover:shadow-glow-cyan transition-all",children:"Connect"}):"stopped"===e.status?(0,r.jsx)("button",{onClick:()=>T(e),className:"py-2 px-4 bg-bg-card border border-border-subtle rounded-lg text-white hover:border-accent-cyan/50 transition-colors",children:"Start"}):"provisioning"===e.status?(0,r.jsx)("span",{className:"text-text-muted text-sm",children:"Starting..."}):(0,r.jsx)("span",{className:"text-error text-sm",children:"Failed"})})]},e.id))}),d.length>0&&(0,r.jsxs)("div",{className:"mt-6 pt-6 border-t border-border-subtle",children:[(0,r.jsx)("p",{className:"text-text-muted text-sm mb-3",children:"Or create a new workspace:"}),(0,r.jsx)("div",{className:"flex gap-2 flex-wrap",children:d.slice(0,3).map(e=>(0,r.jsxs)("button",{onClick:()=>F(e.fullName),className:"py-2 px-3 bg-bg-card border border-border-subtle rounded-lg text-sm text-text-muted hover:text-white hover:border-accent-cyan/50 transition-colors",children:["+ ",e.fullName.split("/")[1]]},e.id))})]})]}),"no-workspaces"===e&&(0,r.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Create Your First Workspace"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:"Select a repository to create a workspace where agents can work on your code."}),d.length>0?(0,r.jsx)("div",{className:"space-y-3",children:d.map(e=>(0,r.jsxs)("button",{onClick:()=>F(e.fullName),className:"w-full flex items-center gap-3 p-4 bg-bg-tertiary rounded-xl border border-border-subtle hover:border-accent-cyan/50 transition-colors text-left",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-text-muted flex-shrink-0",fill:"currentColor",viewBox:"0 0 16 16",children:(0,r.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,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-white font-medium truncate",children:e.fullName}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:e.isPrivate?"Private":"Public"})]}),(0,r.jsx)("svg",{className:"w-5 h-5 text-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]},e.id))}):(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("p",{className:"text-text-muted mb-4",children:"No repositories connected yet."}),(0,r.jsxs)("a",{href:"/connect-repos",className:"inline-flex items-center gap-2 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:[(0,r.jsx)("svg",{className:"w-5 h-5",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"})}),"Connect GitHub"]})]})]}),(0,r.jsxs)("div",{className:"mt-6 flex justify-center gap-4 text-sm",children:[(0,r.jsx)("a",{href:"/connect-repos",className:"text-text-muted hover:text-white transition-colors",children:"Manage Repositories"}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("button",{onClick:async()=>{let e={};y&&(e["X-CSRF-Token"]=y),await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:e}),window.location.href="/login"},className:"text-text-muted hover:text-white transition-colors",children:"Sign Out"})]})]})]})}}},function(e){e.O(0,[30,282,532,116,891,83,320,631,971,117,744],function(){return e(e.s=1702)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[363],{2677:function(e,a,t){Promise.resolve().then(t.bind(t,4680))},4680:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return x}});var c=t(7437),s=t(29),r=t.n(s),n=t(2265),l=t(9376),d=t(9116);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),[m,b]=(0,n.useState)(""),[p,h]=(0,n.useState)(!1),[u,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"),b("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.hi.get("/api/auth/session");if(t.authenticated&&(null===(e=t.user)||void 0===e?void 0:e.id)){let e=await d.hi.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")}},N=async()=>{if(o){if(u.length>0&&!j){b("Please select a workspace");return}s("linking"),b("");try{let e=await d.hi.post("/api/daemons/link",{machineId:o.machineId,name:o.machineName,workspaceId:j,metadata:{linkedVia:"cli",userAgent:navigator.userAgent}});f({apiKey:e.apiKey,daemonId:e.daemonId,workspaceId:e.workspaceId}),s("success")}catch(e){console.error("Link failed:",e),b(e.message||"Failed to link machine. Please try again."),s("error")}}},k=(0,n.useCallback)(async()=>{if(null==x?void 0:x.apiKey)try{await navigator.clipboard.writeText(x.apiKey),h(!0),setTimeout(()=>h(!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})]})]}),u.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:u.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))}),m&&!m.includes("Failed")&&(0,c.jsx)("p",{className:"jsx-9cb8c5914f4e0cdf mt-2 text-sm text-error",children:m})]}),0===u.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:N,disabled:0===u.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===u.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=u.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:k,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:m}),(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,[847,116,971,117,744],function(){return e(e.s=2677)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[593],{2284:function(e,t,s){Promise.resolve().then(s.bind(s,6238))},6238:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return i}});var a=s(7437),r=s(2265),n=s(6272);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"})})]})]})]})]})}},6272:function(e,t,s){"use strict";s.d(t,{K7:function(){return r}});var a=s(7437);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(2265)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=2284)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70],{8226:function(e,t,s){Promise.resolve().then(s.bind(s,9992))},9992:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return a}});var r=s(7437),n=s(2265),i=s(282),o=s(6272);function a(){let[e,t]=(0,n.useState)("checking"),[s,a]=(0,n.useState)(null),[l,c]=(0,n.useState)([]),[d,x]=(0,n.useState)(null),[h,u]=(0,n.useState)(""),m=(0,n.useRef)(null);(0,n.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 r=await fetch("/api/auth/nango/repo-session",{credentials:"include"}),n=await r.json();if(!e)return;if(!r.ok||!n.sessionToken){if((null==n?void 0:n.sessionExpired)||(null==n?void 0:n.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:n.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(),r=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)),r()}catch(e){return await new Promise(e=>setTimeout(e,2e3)),r()}};await r()}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(s){var e;if(console.error("GitHub App auth error:",s),"user_cancelled"===s.type||(null===(e=s.message)||void 0===e?void 0:e.includes("closed"))){u(""),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(s.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,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin mx-auto",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)("p",{className:"mt-4 text-text-muted",children:"Loading..."})]})});let w="connecting"===e||"polling"===e;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-lg",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:"Connect Repositories"}),(0,r.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Connect your GitHub repositories to enable agent access"})]}),(0,r.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:"success"===e?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-success/20 rounded-full flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-4 text-center",children:"Repositories Connected!"}),(0,r.jsx)("div",{className:"max-h-60 overflow-y-auto mb-6 space-y-2",children:l.map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-bg-tertiary rounded-lg",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-text-muted flex-shrink-0",fill:"currentColor",viewBox:"0 0 16 16",children:(0,r.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,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-white font-medium truncate",children:e.fullName}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:e.isPrivate?"Private":"Public"})]})]},e.id))}),(0,r.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,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-warning/20 rounded-full flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-warning",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Approval Pending"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:d}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-6",children:"An organization admin needs to approve the GitHub App installation."}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.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,r.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,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-error/20 rounded-full flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:s}),(0,r.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,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 flex items-center justify-center",children:(0,r.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan 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)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Syncing Repositories"}),(0,r.jsx)("p",{className:"text-text-muted",children:h||"Fetching your repositories..."})]}):(0,r.jsxs)("div",{children:[s&&(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:s})}),(0,r.jsxs)("div",{className:"mb-6 p-4 bg-bg-tertiary rounded-lg border border-border-subtle",children:[(0,r.jsx)("h3",{className:"font-medium text-white mb-2",children:"What this enables:"}),(0,r.jsxs)("ul",{className:"space-y-2 text-sm text-text-muted",children:[(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.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,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,r.jsx)("span",{children:"Agents can clone and work on your repositories"})]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.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,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,r.jsx)("span",{children:"Create issues, PRs, and comments on your behalf"})]}),(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.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,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,r.jsx)("span",{children:"Secure token management - we never store your password"})]})]})]}),(0,r.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,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:"Connect GitHub Repositories"})]})}),(0,r.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,r.jsx)("div",{className:"mt-6 text-center",children:(0,r.jsx)("a",{href:"/app",className:"text-text-muted hover:text-white transition-colors",children:"Back to dashboard"})})]})]})}},6272:function(e,t,s){"use strict";s.d(t,{K7:function(){return n}});var r=s(7437);function n(e){let{size:t=24,className:s="",withGlow:n=!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(n?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(s,"\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"})]})}s(2265)}},function(e){e.O(0,[282,971,117,744],function(){return e(e.s=8226)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[811],{5731:function(e,t,s){Promise.resolve().then(s.bind(s,8615))},8615:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return c}});var r=s(7437),a=s(2265),n=s(7648),i=s(9116),l=s(637);function c(){let[e,t]=(0,a.useState)("conversations"),[s,l]=(0,a.useState)([]),[c,m]=(0,a.useState)([]),[u,p]=(0,a.useState)([]),[k,C]=(0,a.useState)(null),[S,M]=(0,a.useState)(!0),[B,W]=(0,a.useState)(null),[H,L]=(0,a.useState)(""),[A,D]=(0,a.useState)(""),[E,T]=(0,a.useState)(null);(0,a.useEffect)(()=>{(async()=>{let e=await i.hi.getHistoryStats();e.success&&e.data&&C(e.data)})()},[]),(0,a.useEffect)(()=>{(async()=>{M(!0),W(null);try{if("conversations"===e){let e=await i.hi.getHistoryConversations();e.success&&e.data?l(e.data.conversations):W(e.error||"Failed to fetch conversations")}else if("sessions"===e){let e=await i.hi.getHistorySessions({agent:A||void 0,limit:100});e.success&&e.data?m(e.data.sessions):W(e.error||"Failed to fetch sessions")}else if("messages"===e){let e={limit:200,order:"desc"};if(H&&(e.search=H),E){let[r,a]=E.participants,n=await i.hi.getHistoryMessages({...e,from:r,to:a}),l=await i.hi.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());p(e)}}else{let t=await i.hi.getHistoryMessages(e);t.success&&t.data?p(t.data.messages):W(t.error||"Failed to fetch messages")}}}catch(e){W("Failed to load data")}finally{M(!1)}})()},[e,A,H,E]);let P=(0,a.useCallback)(e=>{T(e),t("messages")},[]),U=(0,a.useCallback)(()=>{T(null),t("conversations")},[]);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"})]})]})]}),k&&(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-4 text-sm",children:[(0,r.jsx)(d,{label:"Messages",value:k.messageCount}),(0,r.jsx)(d,{label:"Sessions",value:k.sessionCount}),(0,r.jsx)(d,{label:"Agents",value:k.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:()=>{T(null),t("conversations")},children:[(0,r.jsx)(y,{}),"Conversations"]}),(0,r.jsxs)(o,{active:"sessions"===e,onClick:()=>t("sessions"),children:[(0,r.jsx)(v,{}),"Sessions"]}),(0,r.jsxs)(o,{active:"messages"===e,onClick:()=>t("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:H,onChange:e=>L(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:A,onChange:e=>D(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"})]})}),E&&(0,r.jsxs)("button",{onClick:U,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"]})]})]}),S?(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..."})]})}):B?(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:B}),(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:P}):"sessions"===e?(0,r.jsx)(f,{sessions:c}):(0,r.jsx)(h,{messages:u,conversationTitle:E?"".concat(E.participants[0]," & ").concat(E.participants[1]):void 0})]})]})}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)(u,{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)(u,{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 h(e){let{messages:t,conversationTitle:s}=e;return 0===t.length?(0,r.jsx)(u,{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 u(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"})]})}},637: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,[648,116,971,117,744],function(){return e(e.s=5731)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{7250:function(n,e,u){Promise.resolve().then(u.t.bind(u,7960,23))},7960:function(){}},function(n){n.O(0,[587,971,117,744],function(){return n(n.s=7250)}),_N_E=n.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{9227:function(e,t,n){Promise.resolve().then(n.bind(n,6374))},6374:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(7437),s=n(2265),a=n(9376),i=n(282),o=n(6272);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,{})})}},9376:function(e,t,n){"use strict";var r=n(5475);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},6272:function(e,t,n){"use strict";n.d(t,{K7:function(){return s}});var r=n(7437);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(2265)}},function(e){e.O(0,[282,971,117,744],function(){return e(e.s=9227)}),_N_E=e.O()}]);