agent-relay 1.1.0 → 1.2.0

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 (490) hide show
  1. package/README.md +1 -1
  2. package/dist/bridge/spawner.d.ts +53 -0
  3. package/dist/bridge/spawner.d.ts.map +1 -1
  4. package/dist/bridge/spawner.js +203 -19
  5. package/dist/bridge/spawner.js.map +1 -1
  6. package/dist/bridge/types.d.ts +12 -0
  7. package/dist/bridge/types.d.ts.map +1 -1
  8. package/dist/cli/index.js +401 -5
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/cloud/api/auth.d.ts +3 -2
  11. package/dist/cloud/api/auth.d.ts.map +1 -1
  12. package/dist/cloud/api/auth.js +10 -98
  13. package/dist/cloud/api/auth.js.map +1 -1
  14. package/dist/cloud/api/cli-pty-runner.d.ts +54 -0
  15. package/dist/cloud/api/cli-pty-runner.d.ts.map +1 -0
  16. package/dist/cloud/api/cli-pty-runner.js +119 -0
  17. package/dist/cloud/api/cli-pty-runner.js.map +1 -0
  18. package/dist/cloud/api/generic-webhooks.d.ts +8 -0
  19. package/dist/cloud/api/generic-webhooks.d.ts.map +1 -0
  20. package/dist/cloud/api/generic-webhooks.js +129 -0
  21. package/dist/cloud/api/generic-webhooks.js.map +1 -0
  22. package/dist/cloud/api/git.d.ts +8 -0
  23. package/dist/cloud/api/git.d.ts.map +1 -0
  24. package/dist/cloud/api/git.js +131 -0
  25. package/dist/cloud/api/git.js.map +1 -0
  26. package/dist/cloud/api/github-app.d.ts +11 -0
  27. package/dist/cloud/api/github-app.d.ts.map +1 -0
  28. package/dist/cloud/api/github-app.js +189 -0
  29. package/dist/cloud/api/github-app.js.map +1 -0
  30. package/dist/cloud/api/middleware/planLimits.d.ts +7 -0
  31. package/dist/cloud/api/middleware/planLimits.d.ts.map +1 -1
  32. package/dist/cloud/api/middleware/planLimits.js +39 -1
  33. package/dist/cloud/api/middleware/planLimits.js.map +1 -1
  34. package/dist/cloud/api/monitoring.d.ts +11 -0
  35. package/dist/cloud/api/monitoring.d.ts.map +1 -0
  36. package/dist/cloud/api/monitoring.js +578 -0
  37. package/dist/cloud/api/monitoring.js.map +1 -0
  38. package/dist/cloud/api/nango-auth.d.ts +9 -0
  39. package/dist/cloud/api/nango-auth.d.ts.map +1 -0
  40. package/dist/cloud/api/nango-auth.js +377 -0
  41. package/dist/cloud/api/nango-auth.js.map +1 -0
  42. package/dist/cloud/api/onboarding.d.ts +8 -1
  43. package/dist/cloud/api/onboarding.d.ts.map +1 -1
  44. package/dist/cloud/api/onboarding.js +300 -119
  45. package/dist/cloud/api/onboarding.js.map +1 -1
  46. package/dist/cloud/api/policy.d.ts +8 -0
  47. package/dist/cloud/api/policy.d.ts.map +1 -0
  48. package/dist/cloud/api/policy.js +229 -0
  49. package/dist/cloud/api/policy.js.map +1 -0
  50. package/dist/cloud/api/providers.js +114 -42
  51. package/dist/cloud/api/providers.js.map +1 -1
  52. package/dist/cloud/api/test-helpers.d.ts +10 -0
  53. package/dist/cloud/api/test-helpers.d.ts.map +1 -0
  54. package/dist/cloud/api/test-helpers.js +575 -0
  55. package/dist/cloud/api/test-helpers.js.map +1 -0
  56. package/dist/cloud/api/webhooks.d.ts +7 -0
  57. package/dist/cloud/api/webhooks.d.ts.map +1 -0
  58. package/dist/cloud/api/webhooks.js +496 -0
  59. package/dist/cloud/api/webhooks.js.map +1 -0
  60. package/dist/cloud/api/workspaces.js +225 -8
  61. package/dist/cloud/api/workspaces.js.map +1 -1
  62. package/dist/cloud/billing/plans.d.ts.map +1 -1
  63. package/dist/cloud/billing/plans.js +13 -0
  64. package/dist/cloud/billing/plans.js.map +1 -1
  65. package/dist/cloud/billing/types.d.ts +9 -3
  66. package/dist/cloud/billing/types.d.ts.map +1 -1
  67. package/dist/cloud/config.d.ts +9 -2
  68. package/dist/cloud/config.d.ts.map +1 -1
  69. package/dist/cloud/config.js +13 -4
  70. package/dist/cloud/config.js.map +1 -1
  71. package/dist/cloud/db/drizzle.d.ts +84 -1
  72. package/dist/cloud/db/drizzle.d.ts.map +1 -1
  73. package/dist/cloud/db/drizzle.js +470 -0
  74. package/dist/cloud/db/drizzle.js.map +1 -1
  75. package/dist/cloud/db/index.d.ts +9 -4
  76. package/dist/cloud/db/index.d.ts.map +1 -1
  77. package/dist/cloud/db/index.js +11 -3
  78. package/dist/cloud/db/index.js.map +1 -1
  79. package/dist/cloud/db/schema.d.ts +3283 -556
  80. package/dist/cloud/db/schema.d.ts.map +1 -1
  81. package/dist/cloud/db/schema.js +314 -1
  82. package/dist/cloud/db/schema.js.map +1 -1
  83. package/dist/cloud/index.d.ts +1 -0
  84. package/dist/cloud/index.d.ts.map +1 -1
  85. package/dist/cloud/index.js +2 -0
  86. package/dist/cloud/index.js.map +1 -1
  87. package/dist/cloud/provisioner/index.d.ts +24 -0
  88. package/dist/cloud/provisioner/index.d.ts.map +1 -1
  89. package/dist/cloud/provisioner/index.js +319 -18
  90. package/dist/cloud/provisioner/index.js.map +1 -1
  91. package/dist/cloud/server.d.ts +1 -0
  92. package/dist/cloud/server.d.ts.map +1 -1
  93. package/dist/cloud/server.js +357 -13
  94. package/dist/cloud/server.js.map +1 -1
  95. package/dist/cloud/services/auto-scaler.d.ts +152 -0
  96. package/dist/cloud/services/auto-scaler.d.ts.map +1 -0
  97. package/dist/cloud/services/auto-scaler.js +439 -0
  98. package/dist/cloud/services/auto-scaler.js.map +1 -0
  99. package/dist/cloud/services/capacity-manager.d.ts +148 -0
  100. package/dist/cloud/services/capacity-manager.d.ts.map +1 -0
  101. package/dist/cloud/services/capacity-manager.js +449 -0
  102. package/dist/cloud/services/capacity-manager.js.map +1 -0
  103. package/dist/cloud/services/ci-agent-spawner.d.ts +49 -0
  104. package/dist/cloud/services/ci-agent-spawner.d.ts.map +1 -0
  105. package/dist/cloud/services/ci-agent-spawner.js +373 -0
  106. package/dist/cloud/services/ci-agent-spawner.js.map +1 -0
  107. package/dist/cloud/services/index.d.ts +12 -0
  108. package/dist/cloud/services/index.d.ts.map +1 -0
  109. package/dist/cloud/services/index.js +15 -0
  110. package/dist/cloud/services/index.js.map +1 -0
  111. package/dist/cloud/services/mention-handler.d.ts +65 -0
  112. package/dist/cloud/services/mention-handler.d.ts.map +1 -0
  113. package/dist/cloud/services/mention-handler.js +405 -0
  114. package/dist/cloud/services/mention-handler.js.map +1 -0
  115. package/dist/cloud/services/nango.d.ts +126 -0
  116. package/dist/cloud/services/nango.d.ts.map +1 -0
  117. package/dist/cloud/services/nango.js +191 -0
  118. package/dist/cloud/services/nango.js.map +1 -0
  119. package/dist/cloud/services/persistence.d.ts +131 -0
  120. package/dist/cloud/services/persistence.d.ts.map +1 -0
  121. package/dist/cloud/services/persistence.js +200 -0
  122. package/dist/cloud/services/persistence.js.map +1 -0
  123. package/dist/cloud/services/planLimits.d.ts +15 -0
  124. package/dist/cloud/services/planLimits.d.ts.map +1 -1
  125. package/dist/cloud/services/planLimits.js +28 -0
  126. package/dist/cloud/services/planLimits.js.map +1 -1
  127. package/dist/cloud/services/scaling-orchestrator.d.ts +159 -0
  128. package/dist/cloud/services/scaling-orchestrator.d.ts.map +1 -0
  129. package/dist/cloud/services/scaling-orchestrator.js +502 -0
  130. package/dist/cloud/services/scaling-orchestrator.js.map +1 -0
  131. package/dist/cloud/services/scaling-policy.d.ts +121 -0
  132. package/dist/cloud/services/scaling-policy.d.ts.map +1 -0
  133. package/dist/cloud/services/scaling-policy.js +415 -0
  134. package/dist/cloud/services/scaling-policy.js.map +1 -0
  135. package/dist/cloud/vault/index.js +1 -1
  136. package/dist/cloud/vault/index.js.map +1 -1
  137. package/dist/cloud/webhooks/index.d.ts +24 -0
  138. package/dist/cloud/webhooks/index.d.ts.map +1 -0
  139. package/dist/cloud/webhooks/index.js +29 -0
  140. package/dist/cloud/webhooks/index.js.map +1 -0
  141. package/dist/cloud/webhooks/parsers/github.d.ts +8 -0
  142. package/dist/cloud/webhooks/parsers/github.d.ts.map +1 -0
  143. package/dist/cloud/webhooks/parsers/github.js +234 -0
  144. package/dist/cloud/webhooks/parsers/github.js.map +1 -0
  145. package/dist/cloud/webhooks/parsers/index.d.ts +23 -0
  146. package/dist/cloud/webhooks/parsers/index.d.ts.map +1 -0
  147. package/dist/cloud/webhooks/parsers/index.js +30 -0
  148. package/dist/cloud/webhooks/parsers/index.js.map +1 -0
  149. package/dist/cloud/webhooks/parsers/linear.d.ts +9 -0
  150. package/dist/cloud/webhooks/parsers/linear.d.ts.map +1 -0
  151. package/dist/cloud/webhooks/parsers/linear.js +258 -0
  152. package/dist/cloud/webhooks/parsers/linear.js.map +1 -0
  153. package/dist/cloud/webhooks/parsers/slack.d.ts +9 -0
  154. package/dist/cloud/webhooks/parsers/slack.d.ts.map +1 -0
  155. package/dist/cloud/webhooks/parsers/slack.js +214 -0
  156. package/dist/cloud/webhooks/parsers/slack.js.map +1 -0
  157. package/dist/cloud/webhooks/responders/github.d.ts +8 -0
  158. package/dist/cloud/webhooks/responders/github.d.ts.map +1 -0
  159. package/dist/cloud/webhooks/responders/github.js +73 -0
  160. package/dist/cloud/webhooks/responders/github.js.map +1 -0
  161. package/dist/cloud/webhooks/responders/index.d.ts +23 -0
  162. package/dist/cloud/webhooks/responders/index.d.ts.map +1 -0
  163. package/dist/cloud/webhooks/responders/index.js +30 -0
  164. package/dist/cloud/webhooks/responders/index.js.map +1 -0
  165. package/dist/cloud/webhooks/responders/linear.d.ts +9 -0
  166. package/dist/cloud/webhooks/responders/linear.d.ts.map +1 -0
  167. package/dist/cloud/webhooks/responders/linear.js +149 -0
  168. package/dist/cloud/webhooks/responders/linear.js.map +1 -0
  169. package/dist/cloud/webhooks/responders/slack.d.ts +20 -0
  170. package/dist/cloud/webhooks/responders/slack.d.ts.map +1 -0
  171. package/dist/cloud/webhooks/responders/slack.js +178 -0
  172. package/dist/cloud/webhooks/responders/slack.js.map +1 -0
  173. package/dist/cloud/webhooks/router.d.ts +25 -0
  174. package/dist/cloud/webhooks/router.d.ts.map +1 -0
  175. package/dist/cloud/webhooks/router.js +504 -0
  176. package/dist/cloud/webhooks/router.js.map +1 -0
  177. package/dist/cloud/webhooks/rules-engine.d.ts +24 -0
  178. package/dist/cloud/webhooks/rules-engine.d.ts.map +1 -0
  179. package/dist/cloud/webhooks/rules-engine.js +287 -0
  180. package/dist/cloud/webhooks/rules-engine.js.map +1 -0
  181. package/dist/cloud/webhooks/types.d.ts +186 -0
  182. package/dist/cloud/webhooks/types.d.ts.map +1 -0
  183. package/dist/cloud/webhooks/types.js +8 -0
  184. package/dist/cloud/webhooks/types.js.map +1 -0
  185. package/dist/continuity/formatter.d.ts +51 -0
  186. package/dist/continuity/formatter.d.ts.map +1 -0
  187. package/dist/continuity/formatter.js +313 -0
  188. package/dist/continuity/formatter.js.map +1 -0
  189. package/dist/continuity/handoff-store.d.ts +67 -0
  190. package/dist/continuity/handoff-store.d.ts.map +1 -0
  191. package/dist/continuity/handoff-store.js +472 -0
  192. package/dist/continuity/handoff-store.js.map +1 -0
  193. package/dist/continuity/index.d.ts +45 -0
  194. package/dist/continuity/index.d.ts.map +1 -0
  195. package/dist/continuity/index.js +48 -0
  196. package/dist/continuity/index.js.map +1 -0
  197. package/dist/continuity/ledger-store.d.ts +110 -0
  198. package/dist/continuity/ledger-store.d.ts.map +1 -0
  199. package/dist/continuity/ledger-store.js +500 -0
  200. package/dist/continuity/ledger-store.js.map +1 -0
  201. package/dist/continuity/manager.d.ts +178 -0
  202. package/dist/continuity/manager.d.ts.map +1 -0
  203. package/dist/continuity/manager.js +562 -0
  204. package/dist/continuity/manager.js.map +1 -0
  205. package/dist/continuity/parser.d.ts +76 -0
  206. package/dist/continuity/parser.d.ts.map +1 -0
  207. package/dist/continuity/parser.js +579 -0
  208. package/dist/continuity/parser.js.map +1 -0
  209. package/dist/continuity/types.d.ts +180 -0
  210. package/dist/continuity/types.d.ts.map +1 -0
  211. package/dist/continuity/types.js +9 -0
  212. package/dist/continuity/types.js.map +1 -0
  213. package/dist/daemon/agent-manager.d.ts +27 -0
  214. package/dist/daemon/agent-manager.d.ts.map +1 -1
  215. package/dist/daemon/agent-manager.js +107 -6
  216. package/dist/daemon/agent-manager.js.map +1 -1
  217. package/dist/daemon/agent-registry.d.ts +32 -0
  218. package/dist/daemon/agent-registry.d.ts.map +1 -1
  219. package/dist/daemon/agent-registry.js +42 -2
  220. package/dist/daemon/agent-registry.js.map +1 -1
  221. package/dist/daemon/api.d.ts +12 -0
  222. package/dist/daemon/api.d.ts.map +1 -1
  223. package/dist/daemon/api.js +131 -2
  224. package/dist/daemon/api.js.map +1 -1
  225. package/dist/daemon/cli-auth.d.ts +67 -0
  226. package/dist/daemon/cli-auth.d.ts.map +1 -0
  227. package/dist/daemon/cli-auth.js +537 -0
  228. package/dist/daemon/cli-auth.js.map +1 -0
  229. package/dist/daemon/cloud-sync.d.ts.map +1 -1
  230. package/dist/daemon/cloud-sync.js +9 -7
  231. package/dist/daemon/cloud-sync.js.map +1 -1
  232. package/dist/daemon/orchestrator.d.ts.map +1 -1
  233. package/dist/daemon/orchestrator.js +30 -0
  234. package/dist/daemon/orchestrator.js.map +1 -1
  235. package/dist/daemon/router.d.ts +5 -0
  236. package/dist/daemon/router.d.ts.map +1 -1
  237. package/dist/daemon/router.js +78 -26
  238. package/dist/daemon/router.js.map +1 -1
  239. package/dist/daemon/server.d.ts +5 -0
  240. package/dist/daemon/server.d.ts.map +1 -1
  241. package/dist/daemon/server.js +9 -1
  242. package/dist/daemon/server.js.map +1 -1
  243. package/dist/daemon/services/browser-testing.d.ts +88 -0
  244. package/dist/daemon/services/browser-testing.d.ts.map +1 -0
  245. package/dist/daemon/services/browser-testing.js +244 -0
  246. package/dist/daemon/services/browser-testing.js.map +1 -0
  247. package/dist/daemon/services/container-spawner.d.ts +135 -0
  248. package/dist/daemon/services/container-spawner.d.ts.map +1 -0
  249. package/dist/daemon/services/container-spawner.js +313 -0
  250. package/dist/daemon/services/container-spawner.js.map +1 -0
  251. package/dist/daemon/types.d.ts +5 -1
  252. package/dist/daemon/types.d.ts.map +1 -1
  253. package/dist/dashboard/out/404.html +1 -1
  254. package/dist/dashboard/out/_next/static/chunks/116-2502180def231162.js +1 -0
  255. package/dist/dashboard/out/_next/static/chunks/282-980c2eb8fff20123.js +1 -0
  256. package/dist/dashboard/out/_next/static/chunks/480-2d4111711d4e473c.js +1 -0
  257. package/dist/dashboard/out/_next/static/chunks/724-73c1ee5f60abe860.js +9 -0
  258. package/dist/dashboard/out/_next/static/chunks/766-c3a14283c88d815b.js +1 -0
  259. package/dist/dashboard/out/_next/static/chunks/app/app/page-7120be68bea622f3.js +1 -0
  260. package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-dc2e3a1a22478efc.js +1 -0
  261. package/dist/dashboard/out/_next/static/chunks/app/history/{page-b6edd4dde8d08194.js → page-56a8b4616a90dc43.js} +1 -1
  262. package/dist/dashboard/out/_next/static/chunks/app/login/page-3eac37ea6f5dd153.js +1 -0
  263. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-1081dd190a331a91.js +1 -0
  264. package/dist/dashboard/out/_next/static/chunks/app/page-daf87e86f783f980.js +1 -0
  265. package/dist/dashboard/out/_next/static/chunks/app/providers/page-b68a681526eb145e.js +1 -0
  266. package/dist/dashboard/out/_next/static/chunks/app/signup/page-fee4ed1709070bcd.js +1 -0
  267. package/dist/dashboard/out/_next/static/chunks/e868780c-48e5f147c90a3a41.js +18 -0
  268. package/dist/dashboard/out/_next/static/chunks/{main-c2f423b9c9f4591b.js → main-97850e03d723ea8c.js} +1 -1
  269. package/dist/dashboard/out/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +1 -0
  270. package/dist/dashboard/out/_next/static/css/29852f26181969a0.css +1 -0
  271. package/dist/dashboard/out/_next/static/css/411ce23ffeae9f76.css +1 -0
  272. package/dist/dashboard/out/app.html +1 -14
  273. package/dist/dashboard/out/app.txt +2 -2
  274. package/dist/dashboard/out/connect-repos.html +1 -0
  275. package/dist/dashboard/out/connect-repos.txt +7 -0
  276. package/dist/dashboard/out/history.html +1 -1
  277. package/dist/dashboard/out/history.txt +2 -2
  278. package/dist/dashboard/out/index.html +1 -1
  279. package/dist/dashboard/out/index.txt +2 -2
  280. package/dist/dashboard/out/login.html +6 -0
  281. package/dist/dashboard/out/login.txt +7 -0
  282. package/dist/dashboard/out/metrics.html +1 -1
  283. package/dist/dashboard/out/metrics.txt +2 -2
  284. package/dist/dashboard/out/pricing.html +2 -2
  285. package/dist/dashboard/out/pricing.txt +2 -2
  286. package/dist/dashboard/out/providers.html +1 -0
  287. package/dist/dashboard/out/providers.txt +7 -0
  288. package/dist/dashboard/out/signup.html +6 -0
  289. package/dist/dashboard/out/signup.txt +7 -0
  290. package/dist/dashboard-server/server.d.ts.map +1 -1
  291. package/dist/dashboard-server/server.js +1308 -8
  292. package/dist/dashboard-server/server.js.map +1 -1
  293. package/dist/hooks/emitter.d.ts +40 -0
  294. package/dist/hooks/emitter.d.ts.map +1 -0
  295. package/dist/hooks/emitter.js +63 -0
  296. package/dist/hooks/emitter.js.map +1 -0
  297. package/dist/hooks/index.d.ts +3 -0
  298. package/dist/hooks/index.d.ts.map +1 -1
  299. package/dist/hooks/index.js +3 -0
  300. package/dist/hooks/index.js.map +1 -1
  301. package/dist/hooks/registry.d.ts +173 -0
  302. package/dist/hooks/registry.d.ts.map +1 -0
  303. package/dist/hooks/registry.js +476 -0
  304. package/dist/hooks/registry.js.map +1 -0
  305. package/dist/hooks/trajectory-hooks.d.ts +52 -0
  306. package/dist/hooks/trajectory-hooks.d.ts.map +1 -0
  307. package/dist/hooks/trajectory-hooks.js +183 -0
  308. package/dist/hooks/trajectory-hooks.js.map +1 -0
  309. package/dist/hooks/types.d.ts +141 -0
  310. package/dist/hooks/types.d.ts.map +1 -1
  311. package/dist/index.d.ts +2 -0
  312. package/dist/index.d.ts.map +1 -1
  313. package/dist/index.js +3 -0
  314. package/dist/index.js.map +1 -1
  315. package/dist/memory/adapters/index.d.ts +8 -0
  316. package/dist/memory/adapters/index.d.ts.map +1 -0
  317. package/dist/memory/adapters/index.js +8 -0
  318. package/dist/memory/adapters/index.js.map +1 -0
  319. package/dist/memory/adapters/inmemory.d.ts +59 -0
  320. package/dist/memory/adapters/inmemory.d.ts.map +1 -0
  321. package/dist/memory/adapters/inmemory.js +195 -0
  322. package/dist/memory/adapters/inmemory.js.map +1 -0
  323. package/dist/memory/adapters/supermemory.d.ts +71 -0
  324. package/dist/memory/adapters/supermemory.d.ts.map +1 -0
  325. package/dist/memory/adapters/supermemory.js +338 -0
  326. package/dist/memory/adapters/supermemory.js.map +1 -0
  327. package/dist/memory/factory.d.ts +48 -0
  328. package/dist/memory/factory.d.ts.map +1 -0
  329. package/dist/memory/factory.js +143 -0
  330. package/dist/memory/factory.js.map +1 -0
  331. package/dist/memory/index.d.ts +32 -0
  332. package/dist/memory/index.d.ts.map +1 -0
  333. package/dist/memory/index.js +32 -0
  334. package/dist/memory/index.js.map +1 -0
  335. package/dist/memory/memory-hooks.d.ts +60 -0
  336. package/dist/memory/memory-hooks.d.ts.map +1 -0
  337. package/dist/memory/memory-hooks.js +313 -0
  338. package/dist/memory/memory-hooks.js.map +1 -0
  339. package/dist/memory/service.d.ts +49 -0
  340. package/dist/memory/service.d.ts.map +1 -0
  341. package/dist/memory/service.js +146 -0
  342. package/dist/memory/service.js.map +1 -0
  343. package/dist/memory/types.d.ts +195 -0
  344. package/dist/memory/types.d.ts.map +1 -0
  345. package/dist/memory/types.js +8 -0
  346. package/dist/memory/types.js.map +1 -0
  347. package/dist/policy/agent-policy.d.ts +225 -0
  348. package/dist/policy/agent-policy.d.ts.map +1 -0
  349. package/dist/policy/agent-policy.js +665 -0
  350. package/dist/policy/agent-policy.js.map +1 -0
  351. package/dist/policy/cloud-policy-fetcher.d.ts +12 -0
  352. package/dist/policy/cloud-policy-fetcher.d.ts.map +1 -0
  353. package/dist/policy/cloud-policy-fetcher.js +64 -0
  354. package/dist/policy/cloud-policy-fetcher.js.map +1 -0
  355. package/dist/resiliency/crash-insights.d.ts +156 -0
  356. package/dist/resiliency/crash-insights.d.ts.map +1 -0
  357. package/dist/resiliency/crash-insights.js +492 -0
  358. package/dist/resiliency/crash-insights.js.map +1 -0
  359. package/dist/resiliency/gossip-health.d.ts +137 -0
  360. package/dist/resiliency/gossip-health.d.ts.map +1 -0
  361. package/dist/resiliency/gossip-health.js +241 -0
  362. package/dist/resiliency/gossip-health.js.map +1 -0
  363. package/dist/resiliency/index.d.ts +5 -0
  364. package/dist/resiliency/index.d.ts.map +1 -1
  365. package/dist/resiliency/index.js +5 -0
  366. package/dist/resiliency/index.js.map +1 -1
  367. package/dist/resiliency/leader-watchdog.d.ts +109 -0
  368. package/dist/resiliency/leader-watchdog.d.ts.map +1 -0
  369. package/dist/resiliency/leader-watchdog.js +189 -0
  370. package/dist/resiliency/leader-watchdog.js.map +1 -0
  371. package/dist/resiliency/memory-monitor.d.ts +172 -0
  372. package/dist/resiliency/memory-monitor.d.ts.map +1 -0
  373. package/dist/resiliency/memory-monitor.js +593 -0
  374. package/dist/resiliency/memory-monitor.js.map +1 -0
  375. package/dist/resiliency/stateless-lead.d.ts +149 -0
  376. package/dist/resiliency/stateless-lead.d.ts.map +1 -0
  377. package/dist/resiliency/stateless-lead.js +308 -0
  378. package/dist/resiliency/stateless-lead.js.map +1 -0
  379. package/dist/resiliency/supervisor.d.ts +38 -0
  380. package/dist/resiliency/supervisor.d.ts.map +1 -1
  381. package/dist/resiliency/supervisor.js +122 -0
  382. package/dist/resiliency/supervisor.js.map +1 -1
  383. package/dist/shared/cli-auth-config.d.ts +91 -0
  384. package/dist/shared/cli-auth-config.d.ts.map +1 -0
  385. package/dist/shared/cli-auth-config.js +264 -0
  386. package/dist/shared/cli-auth-config.js.map +1 -0
  387. package/dist/storage/adapter.d.ts +1 -1
  388. package/dist/storage/adapter.d.ts.map +1 -1
  389. package/dist/trajectory/config.d.ts +84 -0
  390. package/dist/trajectory/config.d.ts.map +1 -0
  391. package/dist/trajectory/config.js +163 -0
  392. package/dist/trajectory/config.js.map +1 -0
  393. package/dist/trajectory/index.d.ts +8 -0
  394. package/dist/trajectory/index.d.ts.map +1 -0
  395. package/dist/trajectory/index.js +8 -0
  396. package/dist/trajectory/index.js.map +1 -0
  397. package/dist/trajectory/integration.d.ts +292 -0
  398. package/dist/trajectory/integration.d.ts.map +1 -0
  399. package/dist/trajectory/integration.js +834 -0
  400. package/dist/trajectory/integration.js.map +1 -0
  401. package/dist/utils/logger.js +1 -1
  402. package/dist/utils/logger.js.map +1 -1
  403. package/dist/utils/project-namespace.d.ts +24 -0
  404. package/dist/utils/project-namespace.d.ts.map +1 -1
  405. package/dist/utils/project-namespace.js +84 -0
  406. package/dist/utils/project-namespace.js.map +1 -1
  407. package/dist/wrapper/parser.d.ts +10 -0
  408. package/dist/wrapper/parser.d.ts.map +1 -1
  409. package/dist/wrapper/parser.js +100 -33
  410. package/dist/wrapper/parser.js.map +1 -1
  411. package/dist/wrapper/pty-wrapper.d.ts +197 -16
  412. package/dist/wrapper/pty-wrapper.d.ts.map +1 -1
  413. package/dist/wrapper/pty-wrapper.js +943 -106
  414. package/dist/wrapper/pty-wrapper.js.map +1 -1
  415. package/dist/wrapper/shared.d.ts +165 -0
  416. package/dist/wrapper/shared.d.ts.map +1 -0
  417. package/dist/wrapper/shared.js +270 -0
  418. package/dist/wrapper/shared.js.map +1 -0
  419. package/dist/wrapper/tmux-wrapper.d.ts +73 -11
  420. package/dist/wrapper/tmux-wrapper.d.ts.map +1 -1
  421. package/dist/wrapper/tmux-wrapper.js +541 -120
  422. package/dist/wrapper/tmux-wrapper.js.map +1 -1
  423. package/docs/CLOUD-ARCHITECTURE.md +152 -0
  424. package/docs/HOOKS_API.md +394 -0
  425. package/docs/WRAPPER_EVENTS.md +358 -0
  426. package/docs/agent-policy-snippet.md +40 -0
  427. package/docs/agent-relay-protocol.md +238 -0
  428. package/docs/agent-relay-snippet.md +53 -47
  429. package/docs/archive/EXECUTIVE_SUMMARY.md +358 -0
  430. package/docs/archive/ROADMAP.md +329 -0
  431. package/docs/competitive/GASTOWN.md +451 -0
  432. package/docs/{COMPETITIVE_ANALYSIS.md → competitive/OVERVIEW.md} +1 -0
  433. package/docs/competitive/README.md +34 -0
  434. package/docs/competitive/TMUX_ORCHESTRATOR.md +605 -0
  435. package/docs/dashboard.png +0 -0
  436. package/docs/design/ci-failure-webhooks.md +812 -0
  437. package/docs/design/comprehensive-integrations.md +238 -0
  438. package/docs/design/e2b-sandbox-integration.md +504 -0
  439. package/docs/design/github-app-permissions.md +264 -0
  440. package/docs/local-testing.md +428 -0
  441. package/docs/proposals/continuous-claude-integration.md +622 -0
  442. package/docs/proposals/custom-commands.md +368 -0
  443. package/docs/tasks/global-skills-system.tasks.md +230 -0
  444. package/docs/tasks/webhook-integrations.tasks.md +184 -0
  445. package/docs/tasks/workspace-capabilities.tasks.md +121 -0
  446. package/docs/testing/RESILIENCY-TEST-PLAN-2026-01-01.md +366 -0
  447. package/package.json +16 -7
  448. package/scripts/cloud-setup.sh +96 -0
  449. package/scripts/manual-qa.sh +293 -0
  450. package/scripts/postinstall.js +60 -0
  451. package/scripts/run-cloud-qa.sh +220 -0
  452. package/scripts/test-cli-auth/Dockerfile +44 -0
  453. package/scripts/test-cli-auth/Dockerfile.real +79 -0
  454. package/scripts/test-cli-auth/README.md +286 -0
  455. package/scripts/test-cli-auth/ci-test-real-clis.ts +251 -0
  456. package/scripts/test-cli-auth/ci-test-runner.ts +263 -0
  457. package/scripts/test-cli-auth/mock-cli.sh +147 -0
  458. package/scripts/test-cli-auth/package.json +14 -0
  459. package/scripts/test-cli-auth/test-oauth-flow.ts +220 -0
  460. package/scripts/test-pty-input-auto.js +222 -0
  461. package/scripts/test-pty-input.js +150 -0
  462. package/dist/dashboard/out/_next/static/chunks/693-7b3301d8f6bc5014.js +0 -1
  463. package/dist/dashboard/out/_next/static/chunks/713-f78477eb185f1f4d.js +0 -1
  464. package/dist/dashboard/out/_next/static/chunks/766-e53e1cfe39b0b5b5.js +0 -1
  465. package/dist/dashboard/out/_next/static/chunks/900-037c64bfd797fb2a.js +0 -1
  466. package/dist/dashboard/out/_next/static/chunks/app/app/page-e3d9e1f4466b9bae.js +0 -1
  467. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-e68825a81db67ba1.js +0 -1
  468. package/dist/dashboard/out/_next/static/chunks/app/page-cc108bf68c8a657f.js +0 -1
  469. package/dist/dashboard/out/_next/static/chunks/webpack-a5acc2831d094776.js +0 -1
  470. package/dist/dashboard/out/_next/static/css/79b80143647a07d7.css +0 -1
  471. package/dist/dashboard/out/_next/static/css/8cf277370ad48cfe.css +0 -1
  472. /package/dist/dashboard/out/_next/static/{6HHWb2ZmnJ4OSm0zUP7h4 → H5aWG0udPB4iOUIl_gytz}/_buildManifest.js +0 -0
  473. /package/dist/dashboard/out/_next/static/{6HHWb2ZmnJ4OSm0zUP7h4 → H5aWG0udPB4iOUIl_gytz}/_ssgManifest.js +0 -0
  474. /package/dist/dashboard/out/_next/static/chunks/{117-b2cd8d6485aacf2b.js → 117-b100311aff8d5c61.js} +0 -0
  475. /package/dist/dashboard/out/_next/static/chunks/{648-8f3f26864ce515e5.js → 648-a13d3c2b1be45466.js} +0 -0
  476. /package/dist/dashboard/out/_next/static/chunks/app/_not-found/{page-0b990dbb71d72a98.js → page-a4973f3e3c82fb67.js} +0 -0
  477. /package/dist/dashboard/out/_next/static/chunks/app/pricing/{page-d80e03a5297f95b6.js → page-4d72d5a5d8a9b618.js} +0 -0
  478. /package/docs/{CHANGELOG.md → archive/CHANGELOG.md} +0 -0
  479. /package/docs/{CLI-SIMPLIFICATION-COMPLETE.md → archive/CLI-SIMPLIFICATION-COMPLETE.md} +0 -0
  480. /package/docs/{DESIGN_BRIDGE_STAFFING.md → archive/DESIGN_BRIDGE_STAFFING.md} +0 -0
  481. /package/docs/{DESIGN_V2.md → archive/DESIGN_V2.md} +0 -0
  482. /package/docs/{MONETIZATION.md → archive/MONETIZATION.md} +0 -0
  483. /package/docs/{PROPOSAL-trajectories.md → archive/PROPOSAL-trajectories.md} +0 -0
  484. /package/docs/{SCALING_ANALYSIS.md → archive/SCALING_ANALYSIS.md} +0 -0
  485. /package/docs/{TESTING_PRESENCE_FEATURES.md → archive/TESTING_PRESENCE_FEATURES.md} +0 -0
  486. /package/docs/{TMUX_IMPLEMENTATION_NOTES.md → archive/TMUX_IMPLEMENTATION_NOTES.md} +0 -0
  487. /package/docs/{TMUX_IMPROVEMENTS.md → archive/TMUX_IMPROVEMENTS.md} +0 -0
  488. /package/docs/{dashboard-v2-plan.md → archive/dashboard-v2-plan.md} +0 -0
  489. /package/docs/{removable-code-analysis.md → archive/removable-code-analysis.md} +0 -0
  490. /package/docs/{competitive-analysis-mcp-agent-mail.md → competitive/MCP_AGENT_MAIL.md} +0 -0
@@ -0,0 +1 @@
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:"⬢"}},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);(0,i.useEffect)(()=>{let e=()=>s(window.scrollY>50);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(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 c=()=>{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.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"})]}),(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:c}),(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:c,children:"Demo"}),(0,n.jsx)("a",{href:"#features",onClick:c,children:"Features"}),(0,n.jsx)("a",{href:"#pricing",onClick:c,children:"Pricing"}),(0,n.jsx)("a",{href:"/docs",onClick:c,children:"Documentation"})]}),(0,n.jsxs)("div",{className:"mobile-nav-actions",children:[(0,n.jsx)("a",{href:"/login",className:"btn-ghost btn-full",onClick:c,children:"Sign In"}),(0,n.jsx)("a",{href:"/signup",className:"btn-primary btn-full",onClick:c,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 it out on a side project",features:["1 workspace","3 repositories","2 concurrent agents","10 compute hours/month","Community support"],cta:"Get Started",highlighted:!1},{name:"Pro",price:"$29",period:"/month",description:"For professional developers",features:["5 workspaces","20 repositories","10 concurrent agents","100 compute hours/month","Coordinator agents","Email support"],cta:"Start Free Trial",highlighted:!0},{name:"Team",price:"$99",period:"/month",description:"For growing teams",features:["20 workspaces","100 repositories","50 concurrent agents","500 compute hours/month","Coordinator agents","Priority support","Audit logs"],cta:"Start Free Trial",highlighted:!1},{name:"Enterprise",price:"Custom",period:"",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:"npx agent-relay init"})]}),(0,n.jsxs)("div",{className:"terminal-output",children:[(0,n.jsx)("span",{className:"output-line",children:"✓ Connected to Agent Relay Cloud"}),(0,n.jsx)("span",{className:"output-line",children:"✓ Workspace created: my-project"}),(0,n.jsx)("span",{className:"output-line",children:"✓ Ready to spawn agents"}),(0,n.jsx)("span",{className:"output-line cursor",children:"→ agent-relay spawn Lead --provider claude"})]})]})]})}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 it out on a side project",description:"Perfect for exploring AI agent orchestration on personal projects.",limits:{workspaces:1,repos:3,concurrentAgents:2,computeHours:10},features:[{name:"Workspaces",value:"1",included:!0},{name:"Repositories",value:"3",included:!0},{name:"Concurrent agents",value:"2",included:!0},{name:"Compute hours/month",value:"10",included:!0},{name:"Coordinator agents",value:null,included:!1},{name:"Team collaboration",value:null,included:!1},{name:"Priority support",value:null,included:!1},{name:"Audit logs",value:null,included:!1},{name:"SSO/SAML",value:null,included:!1},{name:"SLA guarantee",value:null,included:!1}],cta:"Get Started Free",ctaLink:"/signup",highlighted:!1},{id:"pro",name:"Pro",price:29,period:"/month",tagline:"For professional developers",description:"Unlock coordinator agents and scale your AI workforce.",limits:{workspaces:5,repos:20,concurrentAgents:10,computeHours:100},features:[{name:"Workspaces",value:"5",included:!0},{name:"Repositories",value:"20",included:!0},{name:"Concurrent agents",value:"10",included:!0},{name:"Compute hours/month",value:"100",included:!0},{name:"Coordinator agents",value:"Yes",included:!0},{name:"Team collaboration",value:null,included:!1},{name:"Priority support",value:null,included:!1},{name:"Audit logs",value:null,included:!1},{name:"SSO/SAML",value:null,included:!1},{name:"SLA guarantee",value:null,included:!1}],cta:"Start Free Trial",ctaLink:"/signup?plan=pro",highlighted:!0,badge:"Most Popular"},{id:"team",name:"Team",price:99,period:"/month",tagline:"For growing teams",description:"Collaborate with your team and ship faster together.",limits:{workspaces:20,repos:100,concurrentAgents:50,computeHours:500},features:[{name:"Workspaces",value:"20",included:!0},{name:"Repositories",value:"100",included:!0},{name:"Concurrent agents",value:"50",included:!0},{name:"Compute hours/month",value:"500",included:!0},{name:"Coordinator agents",value:"Yes",included:!0},{name:"Team collaboration",value:"Yes",included:!0},{name:"Priority support",value:"Yes",included:!0},{name:"Audit logs",value:"Yes",included:!0},{name:"SSO/SAML",value:null,included:!1},{name:"SLA guarantee",value:null,included:!1}],cta:"Start Free Trial",ctaLink:"/signup?plan=team",highlighted:!1},{id:"enterprise",name:"Enterprise",price:null,period:"",tagline:"For organizations at scale",description:"Custom solutions with dedicated support and SLA guarantees.",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:"Coordinator agents",value:"Yes",included:!0},{name:"Team collaboration",value:"Yes",included:!0},{name:"Priority support",value:"Dedicated",included:!0},{name:"Audit logs",value:"Yes",included:!0},{name:"SSO/SAML",value:"Yes",included:!0},{name:"SLA guarantee",value:"99.9%",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)(I,{}),(0,n.jsx)(O,{})]}),(0,n.jsx)(S,{}),(0,n.jsxs)("main",{children:[(0,n.jsx)(F,{billingCycle:e,setBillingCycle:s}),(0,n.jsx)(D,{billingCycle:e}),(0,n.jsx)(P,{}),(0,n.jsx)(L,{openFaq:a,setOpenFaq:r}),(0,n.jsx)(T,{})]}),(0,n.jsx)(R,{})]})}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 F(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 D(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 R(){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)(B,{})}),(0,n.jsx)("a",{href:"https://twitter.com/agent_relay","aria-label":"Twitter",children:(0,n.jsx)(z,{})}),(0,n.jsx)("a",{href:"https://discord.gg/agentrelay","aria-label":"Discord",children:(0,n.jsx)(E,{})})]})]})]})}function I(){return(0,n.jsxs)("div",{className:"grid-bg",children:[(0,n.jsx)("div",{className:"grid-lines"}),(0,n.jsx)("div",{className:"grid-glow"})]})}function O(){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 B(){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 z(){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 E(){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(){}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[191],{3561:function(e,t,r){Promise.resolve().then(r.bind(r,7047))},7047:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var s=r(7437),a=r(2265),o=r(6480),n=r(5372),l=r(6272),i=r(9116),c=r(3083),d=r(257);let x=[{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:"opencode",name:"OpenCode",displayName:"OpenCode",color:"#00D4AA",cliCommand:"opencode"},{id:"droid",name:"Factory",displayName:"Droid",color:"#6366F1",cliCommand:"droid"}],m="true"===d.env.NEXT_PUBLIC_FORCE_CLOUD_MODE;function u(){let[e,t]=(0,a.useState)("loading"),[r,d]=(0,a.useState)([]),[u,h]=(0,a.useState)([]),[p,b]=(0,a.useState)(null),[f,g]=(0,a.useState)(void 0),[w,j]=(0,a.useState)(null),[v,N]=(0,a.useState)(m),[k,y]=(0,a.useState)(null),[C,S]=(0,a.useState)(null);(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/auth/session",{credentials:"include"});if(404===e.status){if(m)throw Error("Cloud mode enforced but session endpoint returned 404. Is the cloud server running?");N(!1),t("local");return}let r=e.headers.get("X-CSRF-Token");if(r&&y(r),!(await e.json()).authenticated){window.location.href="/login";return}N(!0);let[s,a]=await Promise.all([fetch("/api/workspaces",{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(),n=a.ok?await a.json():{repositories:[]};d(o.workspaces||[]),h(n.repositories||[]);let l=(o.workspaces||[]).filter(e=>"running"===e.status&&e.publicUrl);1===l.length?F(l[0]):l.length>1?t("select-workspace"):(o.workspaces||[]).length>0?t("select-workspace"):(n.repositories||[]).length>0?t("no-workspaces"):window.location.href="/connect-repos"}catch(e){if(e instanceof TypeError&&e.message.includes("Failed to fetch")){if(m){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?"),t("error");return}N(!1),t("local");return}console.error("Init error:",e),j(e instanceof Error?e.message:"Failed to initialize"),t("error")}})()},[]);let F=(0,a.useCallback)(e=>{if(!e.publicUrl){j("Workspace has no public URL"),t("error");return}b(e),t("connecting"),(0,i.hc)(e.id);let r=new URL(e.publicUrl),s="https:"===r.protocol?"wss:":"ws:";g("".concat(s,"//").concat(r.host,"/ws")),t("connected")},[]),L=(0,a.useCallback)(async e=>{t("loading"),j(null);try{let r={"Content-Type":"application/json"};k&&(r["X-CSRF-Token"]=k);let s=await fetch("/api/workspaces/quick",{method:"POST",credentials:"include",headers:r,body:JSON.stringify({repositoryFullName:e})}),a=await s.json();if(!s.ok)throw Error(a.error||"Failed to create workspace");let o=async e=>{let r=0;for(;r<150;){let s=await fetch("/api/workspaces/".concat(e,"/status"),{credentials:"include"}),a=await s.json();if("running"===a.status){let r=await fetch("/api/workspaces/".concat(e),{credentials:"include"}),s=await r.json();if(s.publicUrl){b(s),t("connect-provider");return}}else if("error"===a.status){let e=a.errorMessage||"Workspace provisioning failed";throw Error(e)}await new Promise(e=>setTimeout(e,2e3)),++r%15==0&&console.log("[workspace] Still provisioning... (".concat(Math.floor(2e3*r/1e3),"s elapsed)"))}throw Error("Workspace provisioning timed out after 5 minutes. Please try again or contact support.")};await o(a.workspaceId)}catch(e){console.error("Create workspace error:",e),j(e instanceof Error?e.message:"Failed to create workspace"),t("no-workspaces")}},[F,k]),E=(0,a.useCallback)(e=>{p&&S(e.id)},[p]),M=(0,a.useCallback)(()=>{p&&(S(null),F(p))},[p,F]),U=(0,a.useCallback)(()=>{S(null)},[]),A=(0,a.useCallback)(async e=>{t("loading"),j(null);try{let t={};k&&(t["X-CSRF-Token"]=k);let r=await fetch("/api/workspaces/".concat(e.id,"/restart"),{method:"POST",credentials:"include",headers:t});if(!r.ok){let e=await r.json();throw Error(e.error||"Failed to start workspace")}let s=0;for(;s<60;){let t=await fetch("/api/workspaces/".concat(e.id,"/status"),{credentials:"include"}),r=await t.json();if("running"===r.status){let t=await fetch("/api/workspaces/".concat(e.id),{credentials:"include"}),r=await t.json();if(r.publicUrl){F({...e,...r});return}}await new Promise(e=>setTimeout(e,2e3)),s++}throw Error("Workspace start timed out")}catch(e){console.error("Start workspace error:",e),j(e instanceof Error?e.message:"Failed to start workspace"),t("select-workspace")}},[F,k]);return"loading"===e?(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..."})]})}):"local"===e?(0,s.jsx)(o.g,{}):"connected"===e&&f?(0,s.jsx)(n.TI,{cloudMode:!0,children:(0,s.jsx)(o.g,{wsUrl:f})}):"connecting"===e?(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.jsxs)("p",{className:"mt-4 text-white font-medium",children:["Connecting to ",null==p?void 0:p.name,"..."]}),(0,s.jsx)("p",{className:"mt-2 text-text-muted text-sm",children:null==p?void 0:p.publicUrl})]})}):"error"===e?(0,s.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,s.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,s.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-error/20 rounded-full flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-8 h-8 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Something went wrong"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:w}),(0,s.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&&p?(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-xl",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,s.jsx)(l.K7,{size:48,withGlow:!0}),(0,s.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Connect AI Provider"}),(0,s.jsxs)("p",{className:"mt-2 text-text-muted text-center",children:["Your workspace ",(0,s.jsx)("span",{className:"text-white",children:p.name})," is ready!",(0,s.jsx)("br",{}),"Connect an AI provider to start using agents."]})]}),C&&(()=>{let e="codex-device"===C,t=e?"codex":C,r=x.find(e=>e.id===t);return r?(0,s.jsxs)("div",{className:"mb-6 bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,s.jsx)(c.j,{provider:{id:r.id,name:r.name,displayName:r.displayName,color:r.color,requiresUrlCopy:!e&&r.requiresUrlCopy,supportsDeviceFlow:r.supportsDeviceFlow},workspaceId:p.id,csrfToken:k||void 0,useDeviceFlow:e,onSuccess:()=>{S(null)},onCancel:()=>{S(null)},onError:()=>{S(null)}}),(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t border-border-subtle space-y-3",children:[(0,s.jsx)("button",{onClick:U,className:"w-full py-3 px-4 bg-bg-tertiary border border-border-subtle text-white rounded-xl text-center hover:border-accent-cyan/50 transition-colors",children:"Connect Another Provider"}),(0,s.jsx)("button",{onClick:M,className:"w-full py-3 px-4 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-xl text-center hover:shadow-glow-cyan transition-all",children:"Continue to Dashboard"})]})]}):null})(),!C&&(0,s.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Choose an AI Provider"}),(0,s.jsx)("div",{className:"space-y-3",children:x.map(e=>(0,s.jsx)("div",{children:"codex"===e.id?(0,s.jsxs)("div",{className:"p-4 bg-bg-tertiary rounded-xl border border-border-subtle space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold flex-shrink-0",style:{backgroundColor:e.color},children:e.displayName[0]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-white font-medium",children:e.displayName}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:e.name})]})]}),(0,s.jsxs)("div",{className:"p-3 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[(0,s.jsx)("p",{className:"text-sm text-amber-400 font-medium mb-1",children:"⚠️ Heads up about the login flow"}),(0,s.jsxs)("p",{className:"text-xs text-amber-400/80",children:["OpenAI's OAuth redirects to ",(0,s.jsx)("code",{className:"bg-bg-deep px-1 rounded",children:"localhost"}),' after login, which will show a "Page not found" or "This site can\'t be reached" error.',(0,s.jsx)("strong",{className:"text-amber-400",children:" This is expected!"})," You'll need to copy the URL from your browser and paste it back here."]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("button",{onClick:()=>{S("codex-device")},className:"w-full flex items-center gap-3 p-3 bg-bg-card rounded-lg border border-accent-cyan/30 hover:border-accent-cyan/50 transition-colors text-left",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-lg bg-accent-cyan/20 flex items-center justify-center text-accent-cyan flex-shrink-0",children:(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("p",{className:"text-white font-medium text-sm",children:["Device Code Flow ",(0,s.jsx)("span",{className:"text-accent-cyan text-xs ml-1",children:"(Recommended)"})]}),(0,s.jsx)("p",{className:"text-text-muted text-xs",children:"Enter a code on OpenAI's website - no URL copying needed"})]}),(0,s.jsx)("svg",{className:"w-4 h-4 text-text-muted",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"})})]}),(0,s.jsxs)("button",{onClick:()=>E(e),className:"w-full flex items-center gap-3 p-3 bg-bg-card rounded-lg border border-border-subtle hover:border-accent-cyan/30 transition-colors text-left",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-lg bg-bg-tertiary flex items-center justify-center text-text-muted flex-shrink-0",children:(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9"})})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-white font-medium text-sm",children:"Standard Browser Flow"}),(0,s.jsx)("p",{className:"text-text-muted text-xs",children:"Login in browser, then copy the localhost URL back here"})]}),(0,s.jsx)("svg",{className:"w-4 h-4 text-text-muted",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"})})]})]})]}):(0,s.jsxs)("button",{onClick:()=>E(e),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,s.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold flex-shrink-0",style:{backgroundColor:e.color},children:e.displayName[0]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-white font-medium",children:e.displayName}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:e.name})]}),(0,s.jsx)("svg",{className:"w-5 h-5 text-text-muted",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.jsx)("div",{className:"mt-6 text-center",children:(0,s.jsx)("button",{onClick:M,className:"text-text-muted hover:text-white transition-colors text-sm",children:"Skip for now - I'll connect later"})})]})]}):(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)(l.K7,{size:48,withGlow:!0}),(0,s.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Agent Relay"}),(0,s.jsx)("p",{className:"mt-2 text-text-muted",children:"no-workspaces"===e?"Create a workspace to get started":"Select a workspace"})]}),w&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-error/10 border border-error/20 rounded-xl",children:(0,s.jsx)("p",{className:"text-error",children:w})}),"select-workspace"===e&&r.length>0&&(0,s.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Your Workspaces"}),(0,s.jsx)("div",{className:"space-y-3",children:r.map(e=>(0,s.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,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.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,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"running"===e.status?"Running":"provisioning"===e.status?"Starting...":"stopped"===e.status?"Stopped":"Error"})]})]}),(0,s.jsx)("div",{children:"running"===e.status&&e.publicUrl?(0,s.jsx)("button",{onClick:()=>F(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,s.jsx)("button",{onClick:()=>A(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,s.jsx)("span",{className:"text-text-muted text-sm",children:"Starting..."}):(0,s.jsx)("span",{className:"text-error text-sm",children:"Failed"})})]},e.id))}),u.length>0&&(0,s.jsxs)("div",{className:"mt-6 pt-6 border-t border-border-subtle",children:[(0,s.jsx)("p",{className:"text-text-muted text-sm mb-3",children:"Or create a new workspace:"}),(0,s.jsx)("div",{className:"flex gap-2 flex-wrap",children:u.slice(0,3).map(e=>(0,s.jsxs)("button",{onClick:()=>L(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,s.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Create Your First Workspace"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:"Select a repository to create a workspace where agents can work on your code."}),u.length>0?(0,s.jsx)("div",{className:"space-y-3",children:u.map(e=>(0,s.jsxs)("button",{onClick:()=>L(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,s.jsx)("svg",{className:"w-5 h-5 text-text-muted flex-shrink-0",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",children:e.fullName}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:e.isPrivate?"Private":"Public"})]}),(0,s.jsx)("svg",{className:"w-5 h-5 text-text-muted",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-8",children:[(0,s.jsx)("p",{className:"text-text-muted mb-4",children:"No repositories connected yet."}),(0,s.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,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-6 flex justify-center gap-4 text-sm",children:[(0,s.jsx)("a",{href:"/connect-repos",className:"text-text-muted hover:text-white transition-colors",children:"Manage Repositories"}),(0,s.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,s.jsx)("button",{onClick:async()=>{let e={};k&&(e["X-CSRF-Token"]=k),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,724,116,480,971,117,744],function(){return e(e.s=3561)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70],{7186: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=7186)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[811],{5924: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,h]=(0,a.useState)([]),[p,g]=(0,a.useState)([]),[k,C]=(0,a.useState)(null),[S,M]=(0,a.useState)(!0),[B,W]=(0,a.useState)(null),[H,D]=(0,a.useState)(""),[A,L]=(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?h(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());g(e)}}else{let t=await i.hi.getHistoryMessages(e);t.success&&t.data?g(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 _=(0,a.useCallback)(e=>{T(e),t("messages")},[]),F=(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)(f,{}),(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)(j,{})}),(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)(v,{}),"Conversations"]}),(0,r.jsxs)(o,{active:"sessions"===e,onClick:()=>t("sessions"),children:[(0,r.jsx)(y,{}),"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)(b,{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=>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"})]})}),"sessions"===e&&(0,r.jsx)("div",{className:"flex-1 max-w-md",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(b,{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=>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"})]})}),E&&(0,r.jsxs)("button",{onClick:F,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)(f,{}),"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:_}):"sessions"===e?(0,r.jsx)(m,{sessions:c}):(0,r.jsx)(u,{messages:p,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)(p,{icon:(0,r.jsx)(v,{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:g(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 m(e){let{sessions:t}=e;return 0===t.length?(0,r.jsx)(p,{icon:(0,r.jsx)(y,{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)(h,{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 h(e){let{isActive:t,closedBy:s}=e;if(t)return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full bg-success/15 text-success",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 bg-success rounded-full animate-pulse"}),"Active"]});let a={agent:{label:"Closed",className:"bg-text-muted/10 text-text-muted"},disconnect:{label:"Disconnected",className:"bg-warning/15 text-warning"},error:{label:"Error",className:"bg-error/15 text-error"}},n=s?a[s]:a.agent;return(0,r.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-full ".concat(n.className),children:n.label})}function u(e){let{messages:t,conversationTitle:s}=e;return 0===t.length?(0,r.jsx)(p,{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:g(e.timestamp)})]}),(0,r.jsx)("p",{className:"text-sm text-text-primary whitespace-pre-wrap break-words",children:e.content})]})]})},e.id)})]})}function p(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 g(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 f(){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 j(){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 b(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 v(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 y(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"})]})}}},function(e){e.O(0,[648,900,971,117,744],function(){return e(e.s=5924)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[811],{5924: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=5924)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{7899: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 o}});var r=n(7437),s=n(2265),a=n(282),i=n(6272);function o(){let[e,t]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),[c,l]=(0,s.useState)(""),[d,u]=(0,s.useState)(""),h=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=!0;return(async()=>{try{let n=await fetch("/api/auth/nango/login-session",{credentials:"include"}),r=await n.json();if(!e)return;if(!n.ok||!r.sessionToken){u("Failed to initialize. Please refresh the page.");return}h.current=new a.ZP({connectSessionToken:r.sessionToken}),t(!0)}catch(t){e&&(console.error("Init error:",t),u("Failed to initialize. Please refresh the page."))}})(),()=>{e=!1}},[]);let x=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()},m=async e=>{try{l("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 x(e);if(t&&t.ready){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),u(e instanceof Error?e.message:"Authentication failed"),o(!1),l("")}},f=async()=>{if(!h.current){u("Not ready. Please refresh the page.");return}o(!0),u(""),l("Connecting to GitHub...");try{let e=await h.current.auth("github");if(e&&"connectionId"in e)await m(e.connectionId);else throw Error("No connection ID returned")}catch(n){var e;if(console.error("GitHub auth error:",n),"user_cancelled"===n.type||(null===(e=n.message)||void 0===e?void 0:e.includes("closed"))){o(!1),l(""),fetch("/api/auth/nango/login-session",{credentials:"include"}).then(e=>e.json()).then(e=>{e.sessionToken&&(h.current=new a.ZP({connectSessionToken:e.sessionToken}),t(!0))});return}u(n.message||"Authentication failed"),o(!1),l("")}};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)(i.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.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:(0,r.jsxs)("div",{children:[d&&(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:d})}),(0,r.jsx)("button",{type:"button",onClick:f,disabled:!e||n,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:e?n?(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:c||"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)("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"})})]})]})}},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=7899)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[860],{3047:function(e,t,s){Promise.resolve().then(s.bind(s,5804))},5804:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var r=s(7437),n=s(2265),a=s(7648),l=s(9116);let c=["#4a9eff","#b388ff","#ff9e40","#00e676","#ff5c5c","#00ffc8"];function i(e){let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);return c[Math.abs(t)%c.length]}function o(e){return e.slice(0,2).toUpperCase()}function d(e){return e<60?"".concat(e,"s"):e<3600?"".concat(Math.floor(e/60),"m"):e<86400?"".concat(Math.floor(e/3600),"h ").concat(Math.floor(e%3600/60),"m"):"".concat(Math.floor(e/86400),"d ").concat(Math.floor(e%86400/3600),"h")}function x(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function m(){var e,t,s,c;let[i,o]=(0,n.useState)(null),[m,N]=(0,n.useState)(null),[M,S]=(0,n.useState)(null),[L,A]=(0,n.useState)(!0),[B,C]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{let e=(0,l.$3)(),t=async()=>{try{let t=await fetch("/api/auth/session",{credentials:"include"});if(404!==t.status&&(C(!0),!e))return window.location.href="/app",!1;return!0}catch(e){return!0}},s=async()=>{try{if(!await t())return;let[e,s]=await Promise.all([fetch((0,l.kG)("/api/metrics"),{credentials:"include"}),fetch((0,l.kG)("/api/metrics/agents"),{credentials:"include"})]);if(!e.ok)throw Error("Failed to fetch metrics");let r=await e.json();if(o(r),s.ok){let e=await s.json();N(e)}S(null)}catch(e){S(e instanceof Error?e.message:"Failed to load metrics")}finally{A(!1)}};s();let r=setInterval(s,5e3);return()=>clearInterval(r)},[]),L)return(0,r.jsx)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[(0,r.jsx)("div",{className:"w-8 h-8 border-2 border-border border-t-accent rounded-full animate-spin"}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"Loading metrics..."})]})});if(M||!i)return(0,r.jsx)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-error/10 flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-6 h-6 text-error",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,r.jsx)("p",{className:"text-text-secondary",children:M||"No metrics available"}),(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"px-5 py-2.5 bg-accent text-white rounded-lg text-sm font-medium transition-colors hover:bg-accent-hover",children:"Retry"})]})});let _=(null!==(s=null===(e=i.sessions)||void 0===e?void 0:e.errorRate)&&void 0!==s?s:0)<=1?"healthy":(null!==(c=null===(t=i.sessions)||void 0===t?void 0:t.errorRate)&&void 0!==c?c:0)<=5?"warning":"critical";return(0,r.jsxs)("div",{className:"min-h-screen bg-bg-primary text-text-primary font-sans",children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 bg-sidebar-bg border-b border-sidebar-border px-4 md:px-8 py-4",children:(0,r.jsxs)("div",{className:"max-w-[1400px] mx-auto flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)(a.default,{href:"/",className:"flex items-center gap-2 text-text-muted text-sm font-medium px-3 py-2 rounded-md transition-all hover:text-accent hover:bg-accent/10",children:[(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Dashboard"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-accent/80 to-accent rounded-lg flex items-center justify-center border border-accent/30",children:(0,r.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",children:[(0,r.jsx)("path",{d:"M3 3v18h18"}),(0,r.jsx)("path",{d:"M18 17V9"}),(0,r.jsx)("path",{d:"M13 17V5"}),(0,r.jsx)("path",{d:"M8 17v-3"})]})}),(0,r.jsxs)("div",{className:"text-lg font-semibold tracking-tight",children:["Agent ",(0,r.jsx)("span",{className:"text-accent",children:"Metrics"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-success/10 border border-success/30 rounded-full",children:[(0,r.jsx)("span",{className:"w-2 h-2 bg-success rounded-full animate-pulse shadow-[0_0_8px_rgba(43,172,118,0.5)]"}),(0,r.jsx)("span",{className:"text-success text-xs font-semibold font-mono tracking-wide",children:"LIVE"})]})]})}),(0,r.jsxs)("main",{className:"max-w-[1400px] mx-auto px-4 md:px-8 py-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,r.jsx)(u,{label:"Total Agents",value:i.totalAgents,subtext:"".concat(i.onlineAgents," online / ").concat(i.offlineAgents," offline"),accent:"cyan"}),(0,r.jsx)(u,{label:"Online Now",value:i.onlineAgents,subtext:"".concat(i.totalAgents>0?Math.round(i.onlineAgents/i.totalAgents*100):0,"% availability"),accent:"green"}),(0,r.jsx)(u,{label:"Total Messages",value:i.totalMessages.toLocaleString(),subtext:"all time",accent:"purple"}),(0,r.jsx)(u,{label:"Avg. Throughput",value:i.throughput.avgMessagesPerMinute,subtext:"messages / minute",accent:"orange"})]}),(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsx)(h,{title:"Message Throughput"}),(0,r.jsx)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,r.jsx)(g,{value:i.throughput.messagesLastMinute,label:"Last Minute",max:10}),(0,r.jsx)(g,{value:i.throughput.messagesLastHour,label:"Last Hour",max:100}),(0,r.jsx)(g,{value:i.throughput.messagesLast24Hours,label:"Last 24 Hours",max:1e3}),(0,r.jsx)(g,{value:i.throughput.avgMessagesPerMinute,label:"Avg / Min",max:5})]})})]}),i.sessions&&(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)(h,{title:"Session Lifecycle"}),(0,r.jsx)(p,{rate:i.sessions.errorRate||0,status:_})]}),(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-5 mb-6",children:[(0,r.jsx)(b,{value:i.sessions.totalSessions,label:"Total Sessions",accent:"purple"}),(0,r.jsx)(b,{value:i.sessions.activeSessions,label:"Active",accent:"blue"}),(0,r.jsx)(b,{value:i.sessions.closedByAgent,label:"Clean Close",accent:"green"}),(0,r.jsx)(b,{value:i.sessions.closedByDisconnect,label:"Disconnect",accent:"orange"}),(0,r.jsx)(b,{value:i.sessions.closedByError,label:"Error",accent:"red"})]}),i.sessions.recentSessions&&i.sessions.recentSessions.length>0&&(0,r.jsx)("div",{className:"overflow-x-auto -mx-6 px-6",children:(0,r.jsxs)("table",{className:"w-full min-w-[500px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Agent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Status"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Messages"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Started"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Duration"})]})}),(0,r.jsx)("tbody",{children:i.sessions.recentSessions.slice(0,5).map((e,t)=>{let s=new Date(e.startedAt),n=Math.floor(((e.endedAt?new Date(e.endedAt):new Date).getTime()-s.getTime())/1e3);return(0,r.jsxs)("tr",{className:"border-b border-border/50 last:border-0",children:[(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(f,{name:e.agentName})}),(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(v,{closedBy:e.closedBy})}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent",children:e.messageCount}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:x(e.startedAt)}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:d(n)})]},t)})})]})})]})]}),(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsx)(h,{title:"Agent Health"}),(0,r.jsx)("div",{className:"bg-bg-secondary border border-border rounded-lg overflow-hidden",children:0===i.agents.length?(0,r.jsxs)("div",{className:"py-12 text-center",children:[(0,r.jsxs)("svg",{className:"w-12 h-12 mx-auto mb-4 text-text-muted opacity-50",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"No agents registered yet"})]}):(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[700px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"bg-bg-tertiary border-b border-border",children:[(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Agent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Status"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Sent"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Received"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Uptime"}),(0,r.jsx)("th",{className:"text-left py-3 px-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:"Last Seen"})]})}),(0,r.jsx)("tbody",{children:i.agents.map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/50 last:border-0 transition-colors hover:bg-bg-hover",children:[(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(f,{name:e.name})}),(0,r.jsx)("td",{className:"py-3 px-4",children:(0,r.jsx)(j,{isOnline:e.isOnline})}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-accent",children:e.messagesSent.toLocaleString()}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-[#a78bfa]",children:e.messagesReceived.toLocaleString()}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:d(e.uptimeSeconds)}),(0,r.jsx)("td",{className:"py-3 px-4 font-mono text-sm text-text-muted",children:x(e.lastSeen)})]},e.name))})]})})})]}),m&&m.agents.length>0&&(0,r.jsxs)("section",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)(h,{title:"Agent Memory & Resources"}),(0,r.jsx)(y,{system:m.system})]}),(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,r.jsx)(w,{label:"Total Agents",value:m.agents.length,subtext:"being monitored",accent:"cyan"}),(0,r.jsx)(w,{label:"Healthy",value:m.agents.filter(e=>"normal"===e.alertLevel).length,subtext:"normal memory",accent:"green"}),(0,r.jsx)(w,{label:"Warning",value:m.agents.filter(e=>"warning"===e.alertLevel).length,subtext:"elevated usage",accent:"orange"}),(0,r.jsx)(w,{label:"Critical",value:m.agents.filter(e=>"critical"===e.alertLevel||"oom_imminent"===e.alertLevel).length,subtext:"needs attention",accent:"red"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:m.agents.map(e=>(0,r.jsx)(k,{agent:e},e.name))})]})]}),(0,r.jsxs)("div",{className:"text-center py-4 text-text-muted text-xs font-mono",children:["Last updated: ",x(i.timestamp)]})]})]})}function u(e){let{label:t,value:s,subtext:n,accent:a}=e;return(0,r.jsxs)("div",{className:"bg-bg-secondary border border-border rounded-lg p-5 transition-all hover:border-border-dark hover:bg-bg-tertiary group",children:[(0,r.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:t}),(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({cyan:"text-accent",green:"text-success",purple:"text-[#a78bfa]",orange:"text-warning"}[a]," transition-transform group-hover:scale-105 origin-left"),children:s}),(0,r.jsx)("div",{className:"text-xs text-text-muted font-mono mt-2",children:n})]})}function h(e){let{title:t}=e;return(0,r.jsxs)("h2",{className:"flex items-center gap-2.5 text-xs font-semibold uppercase tracking-wider text-text-muted mb-3",children:[(0,r.jsx)("span",{className:"w-[3px] h-3.5 bg-accent rounded-sm"}),t]})}function g(e){let{value:t,label:s,max:n}=e,a=Math.min(t/n*100,100);return(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"font-mono text-4xl font-bold text-accent leading-none",children:t}),(0,r.jsx)("div",{className:"text-xs text-text-muted uppercase tracking-wide mt-2",children:s}),(0,r.jsx)("div",{className:"h-1 bg-border rounded-full mt-3 overflow-hidden",children:(0,r.jsx)("div",{className:"h-full bg-gradient-to-r from-accent to-[#6366f1] rounded-full transition-all duration-500",style:{width:"".concat(a,"%")}})})]})}function b(e){let{value:t,label:s,accent:n}=e;return(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({purple:"text-[#a78bfa]",blue:"text-accent",green:"text-success",orange:"text-warning",red:"text-error"}[n]," leading-none"),children:t}),(0,r.jsx)("div",{className:"text-[11px] text-text-muted uppercase tracking-wide mt-2",children:s})]})}function p(e){let{rate:t,status:s}=e;return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold font-mono border ".concat({healthy:"bg-success/15 text-success border-success/30",warning:"bg-warning/15 text-warning border-warning/30",critical:"bg-error/15 text-error border-error/30"}[s]),children:[t.toFixed(1),"% error rate"]})}function f(e){let{name:t}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-white text-xs font-semibold",style:{backgroundColor:i(t)},children:o(t)}),(0,r.jsx)("span",{className:"font-semibold font-mono text-sm",children:t})]})}function j(e){let{isOnline:t}=e;return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ".concat(t?"bg-success/15 text-success":"bg-bg-hover text-text-muted"),children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(t?"bg-success":"bg-text-muted")}),t?"Online":"Offline"]})}function v(e){let{closedBy:t}=e,s={agent:{label:"Clean",className:"bg-success/15 text-success"},disconnect:{label:"Disconnect",className:"bg-warning/15 text-warning"},error:{label:"Error",className:"bg-error/15 text-error"},active:{label:"Active",className:"bg-accent/15 text-accent"}}[t||"active"];return(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-lg text-[11px] font-medium ".concat(s.className),children:s.label})}function N(e){if(0===e)return"0 B";let t=Math.floor(Math.log(Math.abs(e))/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(1)," ").concat(["B","KB","MB","GB","TB"][t])}function y(e){let{system:t}=e,s=Math.round((t.totalMemory-t.freeMemory)/t.totalMemory*100);return(0,r.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5 bg-bg-tertiary border border-border rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("svg",{className:"w-4 h-4 text-accent",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),(0,r.jsx)("rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",fill:"currentColor",opacity:"0.3"})]}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"System:"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-24 h-2 bg-border rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all ".concat(s>90?"bg-error":s>70?"bg-warning":"bg-accent"),style:{width:"".concat(s,"%")}})}),(0,r.jsxs)("span",{className:"text-xs font-mono text-text-muted",children:[s,"%"]})]}),(0,r.jsxs)("span",{className:"text-xs font-mono text-text-muted",children:[N(t.freeMemory)," free"]})]})}function w(e){let{label:t,value:s,subtext:n,accent:a}=e;return(0,r.jsxs)("div",{className:"bg-bg-tertiary border border-border/50 rounded-lg p-4 text-center",children:[(0,r.jsx)("div",{className:"font-mono text-3xl font-bold ".concat({cyan:"text-accent",green:"text-success",orange:"text-warning",red:"text-error"}[a]," leading-none"),children:s}),(0,r.jsx)("div",{className:"text-[11px] text-text-muted uppercase tracking-wide mt-2",children:t}),(0,r.jsx)("div",{className:"text-xs text-text-muted mt-1",children:n})]})}function k(e){var t;let{agent:s}=e,n=s.rssBytes?s.rssBytes/1048576:0,a={normal:{bg:"bg-success/10",border:"border-success/30",text:"text-success",label:"Healthy"},warning:{bg:"bg-warning/10",border:"border-warning/30",text:"text-warning",label:"Warning"},critical:{bg:"bg-error/10",border:"border-error/30",text:"text-error",label:"Critical"},oom_imminent:{bg:"bg-error/20",border:"border-error/50",text:"text-error",label:"OOM Risk"}}[s.alertLevel||"normal"],l={growing:{icon:"↑",color:"text-warning",label:"Growing"},stable:{icon:"→",color:"text-success",label:"Stable"},shrinking:{icon:"↓",color:"text-accent",label:"Shrinking"},unknown:{icon:"?",color:"text-text-muted",label:"Unknown"}}[s.trend||"unknown"];return(0,r.jsxs)("div",{className:"".concat(a.bg," border ").concat(a.border," rounded-lg p-4 transition-all hover:scale-[1.01]"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white text-sm font-semibold",style:{backgroundColor:i(s.name)},children:o(s.name)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold font-mono text-sm text-text-primary",children:s.name}),(0,r.jsxs)("div",{className:"text-xs text-text-muted",children:["PID: ",s.pid||"N/A"," • ",s.status]})]})]}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ".concat(a.bg," ").concat(a.text),children:a.label})})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Memory Usage"}),(0,r.jsx)("span",{className:"text-sm font-mono font-semibold text-text-primary",children:N(s.rssBytes||0)})]}),(0,r.jsx)("div",{className:"h-3 bg-bg-primary rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all duration-500 ".concat("critical"===s.alertLevel||"oom_imminent"===s.alertLevel?"bg-gradient-to-r from-error to-error/70":"warning"===s.alertLevel?"bg-gradient-to-r from-warning to-warning/70":"bg-gradient-to-r from-accent to-[#6366f1]"),style:{width:"".concat(Math.min(n/2048*100,100),"%")}})}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"0"}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"2 GB"})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("div",{className:"text-lg font-mono font-bold text-accent",children:[(null===(t=s.cpuPercent)||void 0===t?void 0:t.toFixed(1))||"0","%"]}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"CPU"})]}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("div",{className:"text-lg font-mono font-bold ".concat(l.color," flex items-center justify-center gap-1"),children:[(0,r.jsx)("span",{children:l.icon}),(0,r.jsx)("span",{className:"text-xs",children:l.label})]}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"Trend"})]}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"text-lg font-mono font-bold text-[#a78bfa]",children:N(s.highWatermark||0)}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted uppercase",children:"Peak"})]})]}),s.uptimeMs&&(0,r.jsxs)("div",{className:"mt-3 pt-3 border-t border-border/30 flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Uptime"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted",children:d(Math.floor(s.uptimeMs/1e3))})]})]})}}},function(e){e.O(0,[648,116,971,117,744],function(){return e(e.s=3047)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{3713:function(e,t,n){Promise.resolve().then(n.bind(n,7340))},7340:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var r=n(7437),u=n(2265),a=n(8766),c=n(6480);function l(){let[e,t]=(0,u.useState)(!1),[n,l]=(0,u.useState)(!1);return((0,u.useEffect)(()=>{t(function(){let e=window.location.hostname,t=new URLSearchParams(window.location.search);if("true"===t.get("landing")||"true"===t.get("cloud")||e.includes("agent-relay.com")||e.includes("agentrelay.dev")||e.includes(".fly.dev"))return!0;let n=document.querySelector('meta[name="agent-relay-cloud"]');return(null==n?void 0:n.getAttribute("content"))==="true"||"true"===localStorage.getItem("agent-relay-cloud-mode")}()),l(!0)},[]),n)?e?(0,r.jsx)(a.fy,{}):(0,r.jsx)(c.g,{}):(0,r.jsx)("div",{className:"flex h-screen bg-bg-deep font-sans text-text-primary items-center justify-center",children:(0,r.jsx)("div",{className:"text-text-muted",children:"Loading..."})})}}},function(e){e.O(0,[732,30,724,116,480,766,971,117,744],function(){return e(e.s=3713)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{8148:function(e,t,s){Promise.resolve().then(s.bind(s,9197))},9197:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return i}});var r=s(7437),n=s(2265),a=s(6272);function i(){let[e,t]=(0,n.useState)([]),[s,i]=(0,n.useState)(!0),[o,l]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),[x,u]=(0,n.useState)(""),[p,m]=(0,n.useState)(null);(0,n.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/providers",{credentials:"include"}),s=e.headers.get("X-CSRF-Token");if(s&&m(s),!e.ok){if(401===e.status){window.location.href="/login";return}throw Error("Failed to fetch providers")}let r=await e.json();t(r.providers||[])}catch(e){l(e instanceof Error?e.message:"Failed to load providers")}finally{i(!1)}})()},[]);let h=async e=>{if(!x.trim()){l("Please enter an API key");return}l(null),c(e);try{let s={"Content-Type":"application/json"};p&&(s["X-CSRF-Token"]=p);let r=await fetch("/api/providers/".concat(e,"/api-key"),{method:"POST",credentials:"include",headers:s,body:JSON.stringify({apiKey:x.trim()})}),n=await r.json();if(!r.ok)throw Error(n.error||"Failed to connect provider");t(t=>t.map(t=>t.id===e?{...t,isConnected:!0}:t)),u(""),c(null)}catch(e){l(e instanceof Error?e.message:"Failed to connect"),c(null)}},f=e.some(e=>e.isConnected&&"github"!==e.id);return 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.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 providers..."})]})}):(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)(a.K7,{size:48,withGlow:!0}),(0,r.jsx)("h1",{className:"mt-4 text-2xl font-bold text-white",children:"Connect AI Providers"}),(0,r.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Add your API keys to enable AI-powered coding assistants in your workspace."})]}),o&&(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:o})}),(0,r.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-6 space-y-4",children:e.filter(e=>"github"!==e.id).map(e=>(0,r.jsxs)("div",{className:"p-4 bg-bg-tertiary rounded-xl border border-border-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold",style:{backgroundColor:e.color},children:e.displayName[0]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-medium text-white",children:e.displayName}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:e.description})]})]}),e.isConnected&&(0,r.jsx)("span",{className:"px-3 py-1 bg-success/20 text-success text-sm rounded-full",children:"Connected"})]}),!e.isConnected&&(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{type:"password",placeholder:"Enter ".concat(e.displayName," API key"),value:d===e.id?x:"",onChange:t=>{c(e.id),u(t.target.value)},onFocus:()=>c(e.id),className:"flex-1 px-4 py-2 bg-bg-deep border border-border-subtle rounded-lg text-white placeholder-text-muted focus:outline-none focus:border-accent-cyan/50"}),(0,r.jsx)("button",{onClick:()=>h(e.id),disabled:d===e.id&&!x.trim(),className:"px-4 py-2 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-lg hover:shadow-glow-cyan transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:d===e.id?"Connecting...":"Connect"})]})]},e.id))}),(0,r.jsxs)("div",{className:"mt-6 flex flex-col items-center gap-4",children:[f?(0,r.jsx)("a",{href:"/app",className:"w-full py-3 px-6 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold rounded-xl text-center hover:shadow-glow-cyan transition-all",children:"Continue to Dashboard"}):(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"Connect at least one AI provider to continue"}),(0,r.jsx)("a",{href:"/app",className:"text-text-muted hover:text-white transition-colors text-sm",children:"Skip for now"})]})]})]})}},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,[971,117,744],function(){return e(e.s=8148)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[966],{4687:function(e,t,s){Promise.resolve().then(s.bind(s,4665))},4665:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return o}});var n=s(7437),r=s(2265),a=s(282),i=s(6272);function o(){let[e,t]=(0,r.useState)(!1),[s,o]=(0,r.useState)(!1),[c,l]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[x,u]=(0,r.useState)("/app"),[m,f]=(0,r.useState)(!1),p=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let e=await fetch("/api/auth/session",{credentials:"include"});if((await e.json()).authenticated){await j();return}}catch(e){}try{let s=await fetch("/api/auth/nango/login-session",{credentials:"include"}),n=await s.json();if(!e)return;if(!s.ok||!n.sessionToken){h("Failed to initialize. Please refresh the page.");return}p.current=new a.ZP({connectSessionToken:n.sessionToken}),t(!0)}catch(t){e&&(console.error("Init error:",t),h("Failed to initialize. Please refresh the page."))}})(),()=>{e=!1}},[]);let j=async()=>{l("Setting up your account...");try{let e=await fetch("/api/github-app/repos",{credentials:"include"}),t=await e.json();t.repositories&&t.repositories.length>0?u("/app"):u("/connect-repos"),f(!0),setTimeout(()=>{window.location.href=t.repositories&&t.repositories.length>0?"/app":"/connect-repos"},1500)}catch(e){console.error("Error checking repos:",e),u("/connect-repos"),f(!0),setTimeout(()=>{window.location.href="/connect-repos"},1500)}},g=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()},w=async e=>{try{l("Completing authentication...");let t=Date.now(),s=async()=>{if(Date.now()-t>3e4)throw Error("Authentication timed out. Please try again.");try{let t=await g(e);if(t&&t.ready){await j();return}return await new Promise(e=>setTimeout(e,1e3)),s()}catch(e){return await new Promise(e=>setTimeout(e,1e3)),s()}};await s()}catch(e){console.error("[AUTH] Authentication error:",e),h(e instanceof Error?e.message:"Authentication failed"),o(!1),l("")}},b=async()=>{if(!p.current){h("Not ready. Please refresh the page.");return}o(!0),h(""),l("Connecting to GitHub...");try{let e=await p.current.auth("github");if(e&&"connectionId"in e)await w(e.connectionId);else throw Error("No connection ID returned")}catch(s){var e;if(console.error("GitHub auth error:",s),"user_cancelled"===s.type||(null===(e=s.message)||void 0===e?void 0:e.includes("closed"))){o(!1),l(""),fetch("/api/auth/nango/login-session",{credentials:"include"}).then(e=>e.json()).then(e=>{e.sessionToken&&(p.current=new a.ZP({connectSessionToken:e.sessionToken}),t(!0))});return}h(s.message||"Authentication failed"),o(!1),l("")}};return(0,n.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0d1117] to-[#0a0a0f] flex flex-col items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 opacity-10",children:(0,n.jsx)("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px)",backgroundSize:"50px 50px"}})}),(0,n.jsxs)("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[(0,n.jsx)("div",{className:"absolute -top-40 -left-40 w-80 h-80 bg-accent-cyan/20 rounded-full blur-[100px]"}),(0,n.jsx)("div",{className:"absolute -bottom-40 -right-40 w-80 h-80 bg-[#00ffc8]/15 rounded-full blur-[100px]"})]}),(0,n.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)(i.K7,{size:56,withGlow:!0}),(0,n.jsx)("h1",{className:"mt-4 text-3xl font-bold text-white",children:"Get Started"}),(0,n.jsx)("p",{className:"mt-2 text-text-muted text-center",children:"Create your account and start orchestrating AI agents"})]}),(0,n.jsx)("div",{className:"bg-bg-primary/80 backdrop-blur-sm border border-border-subtle rounded-2xl p-8 shadow-xl",children:m?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-success/20 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Welcome to Agent Relay!"}),(0,n.jsx)("p",{className:"text-text-muted",children:"/connect-repos"===x?"Let's connect your repositories...":"Redirecting to dashboard..."})]}):s?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 flex items-center justify-center",children:(0,n.jsxs)("svg",{className:"w-8 h-8 text-accent-cyan animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Creating Account"}),(0,n.jsx)("p",{className:"text-text-muted",children:c||"Connecting to GitHub..."})]}):(0,n.jsxs)("div",{children:[d&&(0,n.jsx)("div",{className:"mb-4 p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,n.jsx)("p",{className:"text-error text-sm",children:d})}),(0,n.jsxs)("div",{className:"mb-6 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-accent-cyan/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-accent-cyan",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,n.jsx)("span",{children:"Deploy AI agents in seconds"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#00ffc8]/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-[#00ffc8]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})})}),(0,n.jsx)("span",{children:"Real-time agent collaboration"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 text-sm text-text-secondary",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#0891b2]/10 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-4 h-4 text-[#0891b2]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}),(0,n.jsx)("span",{children:"Secure credential management"})]})]}),(0,n.jsx)("button",{type:"button",onClick:b,disabled:!e||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:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})}),(0,n.jsx)("span",{children:"Sign up with GitHub"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,n.jsx)("span",{children:"Loading..."})]})}),(0,n.jsxs)("p",{className:"mt-6 text-center text-text-muted text-sm",children:["By signing up, you agree to our"," ",(0,n.jsx)("a",{href:"/terms",className:"text-accent-cyan hover:underline",children:"Terms of Service"})," ","and"," ",(0,n.jsx)("a",{href:"/privacy",className:"text-accent-cyan hover:underline",children:"Privacy Policy"})]})]})}),(0,n.jsx)("div",{className:"mt-6 text-center",children:(0,n.jsxs)("p",{className:"text-text-muted",children:["Already have an account?"," ",(0,n.jsx)("a",{href:"/login",className:"text-accent-cyan hover:underline font-medium",children:"Sign in"})]})}),(0,n.jsx)("div",{className:"mt-4 text-center",children:(0,n.jsx)("a",{href:"/",className:"text-text-muted hover:text-white transition-colors text-sm",children:"Back to home"})})]})]})}},6272:function(e,t,s){"use strict";s.d(t,{K7:function(){return r}});var n=s(7437);function r(e){let{size:t=24,className:s="",withGlow:r=!1}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"\n transition-all duration-300\n ".concat(r?"drop-shadow-[0_0_8px_rgba(0,217,255,0.3)]":"","\n ").concat(s,"\n "),"aria-label":"Agent Relay Logo",role:"img",children:[(0,n.jsx)("path",{d:"M30 80 L 50 20 L 70 80",stroke:"#00d9ff",strokeWidth:"5",strokeLinejoin:"round",strokeLinecap:"round",fill:"none"}),(0,n.jsx)("line",{x1:"40",y1:"50",x2:"60",y2:"50",stroke:"#00d9ff",strokeWidth:"5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M50 20 L 50 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),(0,n.jsx)("path",{d:"M50 20 C 80 20 80 50 50 50 L 80 80",stroke:"#00ffc8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:"0.7"})]})}s(2265)}},function(e){e.O(0,[282,971,117,744],function(){return e(e.s=4687)}),_N_E=e.O()}]);