agent-relay 2.0.22 → 2.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/bin/relay-pty-linux-arm64 +0 -0
  2. package/dist/src/cli/index.d.ts +3 -3
  3. package/dist/src/cli/index.js +31 -100
  4. package/package.json +22 -29
  5. package/packages/api-types/package.json +1 -1
  6. package/packages/bridge/package.json +8 -8
  7. package/packages/cli-tester/package.json +1 -1
  8. package/packages/cloud/dist/server.js +25 -4
  9. package/packages/cloud/package.json +6 -6
  10. package/packages/config/package.json +2 -2
  11. package/packages/continuity/package.json +1 -1
  12. package/packages/daemon/dist/orchestrator.js +19 -1
  13. package/packages/daemon/package.json +12 -12
  14. package/packages/hooks/package.json +4 -4
  15. package/packages/mcp/package.json +2 -2
  16. package/packages/memory/package.json +2 -2
  17. package/packages/policy/package.json +2 -2
  18. package/packages/protocol/package.json +1 -1
  19. package/packages/resiliency/package.json +1 -1
  20. package/packages/sdk/package.json +2 -2
  21. package/packages/spawner/package.json +1 -1
  22. package/packages/state/package.json +1 -1
  23. package/packages/storage/package.json +2 -2
  24. package/packages/telemetry/package.json +1 -1
  25. package/packages/trajectory/package.json +2 -2
  26. package/packages/user-directory/package.json +2 -2
  27. package/packages/utils/dist/update-checker.js +4 -0
  28. package/packages/utils/package.json +1 -1
  29. package/packages/wrapper/package.json +6 -6
  30. package/deploy/workspace/codex.config.toml +0 -20
  31. package/deploy/workspace/entrypoint-browser.sh +0 -118
  32. package/deploy/workspace/entrypoint.sh +0 -612
  33. package/deploy/workspace/gh-credential-relay +0 -90
  34. package/deploy/workspace/gh-relay +0 -156
  35. package/deploy/workspace/git-credential-relay +0 -330
  36. package/deploy/workspace/git-credential-relay.test.sh +0 -230
  37. package/dist/dashboard/out/404.html +0 -1
  38. package/dist/dashboard/out/_next/static/91mkGYq3qbG8WHE6VytQ8/_buildManifest.js +0 -1
  39. package/dist/dashboard/out/_next/static/91mkGYq3qbG8WHE6VytQ8/_ssgManifest.js +0 -1
  40. package/dist/dashboard/out/_next/static/chunks/116-a883fca163f3a5bc.js +0 -1
  41. package/dist/dashboard/out/_next/static/chunks/117-c8afed19e821a35d.js +0 -2
  42. package/dist/dashboard/out/_next/static/chunks/282-980c2eb8fff20123.js +0 -1
  43. package/dist/dashboard/out/_next/static/chunks/320-a6304232cd0ee2ce.js +0 -1
  44. package/dist/dashboard/out/_next/static/chunks/532-bace199897eeab37.js +0 -9
  45. package/dist/dashboard/out/_next/static/chunks/631-16b905e5920f9b59.js +0 -1
  46. package/dist/dashboard/out/_next/static/chunks/648-acb2ff9f77cbfbd3.js +0 -1
  47. package/dist/dashboard/out/_next/static/chunks/766-2aea80818f7eb0d8.js +0 -1
  48. package/dist/dashboard/out/_next/static/chunks/83-26d2bde54616ee90.js +0 -1
  49. package/dist/dashboard/out/_next/static/chunks/847-f1f467060f32afff.js +0 -1
  50. package/dist/dashboard/out/_next/static/chunks/891-5cb1513eeb97a891.js +0 -1
  51. package/dist/dashboard/out/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +0 -1
  52. package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +0 -1
  53. package/dist/dashboard/out/_next/static/chunks/app/app/page-366fb7c078d4e9e0.js +0 -1
  54. package/dist/dashboard/out/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +0 -1
  55. package/dist/dashboard/out/_next/static/chunks/app/complete-profile/page-dd64bbdf66b639cd.js +0 -1
  56. package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +0 -1
  57. package/dist/dashboard/out/_next/static/chunks/app/history/page-9965d2483011b846.js +0 -1
  58. package/dist/dashboard/out/_next/static/chunks/app/layout-6b91e33784c20610.js +0 -1
  59. package/dist/dashboard/out/_next/static/chunks/app/login/page-435eceb0073be027.js +0 -1
  60. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +0 -1
  61. package/dist/dashboard/out/_next/static/chunks/app/page-8119d4246743574e.js +0 -1
  62. package/dist/dashboard/out/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +0 -1
  63. package/dist/dashboard/out/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +0 -1
  64. package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +0 -1
  65. package/dist/dashboard/out/_next/static/chunks/app/signup/page-c7a0a28341365ae0.js +0 -1
  66. package/dist/dashboard/out/_next/static/chunks/e868780c-48e5f147c90a3a41.js +0 -18
  67. package/dist/dashboard/out/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +0 -1
  68. package/dist/dashboard/out/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
  69. package/dist/dashboard/out/_next/static/chunks/main-311c3db74dcfadb7.js +0 -1
  70. package/dist/dashboard/out/_next/static/chunks/main-app-fdbeb09028f57c9f.js +0 -1
  71. package/dist/dashboard/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
  72. package/dist/dashboard/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
  73. package/dist/dashboard/out/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  74. package/dist/dashboard/out/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +0 -1
  75. package/dist/dashboard/out/_next/static/css/4034f236dd1a3178.css +0 -1
  76. package/dist/dashboard/out/_next/static/css/6892f8422896ef7a.css +0 -1
  77. package/dist/dashboard/out/alt-logos/agent-relay-logo-128.png +0 -0
  78. package/dist/dashboard/out/alt-logos/agent-relay-logo-256.png +0 -0
  79. package/dist/dashboard/out/alt-logos/agent-relay-logo-32.png +0 -0
  80. package/dist/dashboard/out/alt-logos/agent-relay-logo-512.png +0 -0
  81. package/dist/dashboard/out/alt-logos/agent-relay-logo-64.png +0 -0
  82. package/dist/dashboard/out/alt-logos/agent-relay-logo.svg +0 -45
  83. package/dist/dashboard/out/alt-logos/logo.svg +0 -38
  84. package/dist/dashboard/out/alt-logos/monogram-logo-128.png +0 -0
  85. package/dist/dashboard/out/alt-logos/monogram-logo-256.png +0 -0
  86. package/dist/dashboard/out/alt-logos/monogram-logo-32.png +0 -0
  87. package/dist/dashboard/out/alt-logos/monogram-logo-512.png +0 -0
  88. package/dist/dashboard/out/alt-logos/monogram-logo-64.png +0 -0
  89. package/dist/dashboard/out/alt-logos/monogram-logo.svg +0 -38
  90. package/dist/dashboard/out/app/onboarding.html +0 -1
  91. package/dist/dashboard/out/app/onboarding.txt +0 -7
  92. package/dist/dashboard/out/app.html +0 -1
  93. package/dist/dashboard/out/app.txt +0 -7
  94. package/dist/dashboard/out/apple-icon.png +0 -0
  95. package/dist/dashboard/out/cloud/link.html +0 -1
  96. package/dist/dashboard/out/cloud/link.txt +0 -7
  97. package/dist/dashboard/out/complete-profile.html +0 -5
  98. package/dist/dashboard/out/complete-profile.txt +0 -7
  99. package/dist/dashboard/out/connect-repos.html +0 -1
  100. package/dist/dashboard/out/connect-repos.txt +0 -7
  101. package/dist/dashboard/out/history.html +0 -1
  102. package/dist/dashboard/out/history.txt +0 -7
  103. package/dist/dashboard/out/index.html +0 -1
  104. package/dist/dashboard/out/index.txt +0 -7
  105. package/dist/dashboard/out/login.html +0 -5
  106. package/dist/dashboard/out/login.txt +0 -7
  107. package/dist/dashboard/out/metrics.html +0 -1
  108. package/dist/dashboard/out/metrics.txt +0 -7
  109. package/dist/dashboard/out/pricing.html +0 -13
  110. package/dist/dashboard/out/pricing.txt +0 -7
  111. package/dist/dashboard/out/providers/setup/claude.html +0 -1
  112. package/dist/dashboard/out/providers/setup/claude.txt +0 -8
  113. package/dist/dashboard/out/providers/setup/codex.html +0 -1
  114. package/dist/dashboard/out/providers/setup/codex.txt +0 -8
  115. package/dist/dashboard/out/providers/setup/cursor.html +0 -1
  116. package/dist/dashboard/out/providers/setup/cursor.txt +0 -8
  117. package/dist/dashboard/out/providers.html +0 -1
  118. package/dist/dashboard/out/providers.txt +0 -7
  119. package/dist/dashboard/out/signup.html +0 -6
  120. package/dist/dashboard/out/signup.txt +0 -7
  121. package/dist/src/dashboard-server/index.d.ts +0 -8
  122. package/dist/src/dashboard-server/index.js +0 -8
  123. package/packages/dashboard/README.md +0 -48
  124. package/packages/dashboard/dist/health-worker-manager.d.ts +0 -62
  125. package/packages/dashboard/dist/health-worker-manager.js +0 -144
  126. package/packages/dashboard/dist/health-worker.d.ts +0 -9
  127. package/packages/dashboard/dist/health-worker.js +0 -79
  128. package/packages/dashboard/dist/index.d.ts +0 -20
  129. package/packages/dashboard/dist/index.js +0 -19
  130. package/packages/dashboard/dist/metrics.d.ts +0 -105
  131. package/packages/dashboard/dist/metrics.js +0 -193
  132. package/packages/dashboard/dist/needs-attention.d.ts +0 -24
  133. package/packages/dashboard/dist/needs-attention.js +0 -78
  134. package/packages/dashboard/dist/server.d.ts +0 -25
  135. package/packages/dashboard/dist/server.js +0 -5270
  136. package/packages/dashboard/dist/start.d.ts +0 -6
  137. package/packages/dashboard/dist/start.js +0 -13
  138. package/packages/dashboard/dist/types/threading.d.ts +0 -8
  139. package/packages/dashboard/dist/types/threading.js +0 -2
  140. package/packages/dashboard/dist/user-bridge.d.ts +0 -154
  141. package/packages/dashboard/dist/user-bridge.js +0 -372
  142. package/packages/dashboard/package.json +0 -65
  143. package/packages/dashboard/ui/app/app/onboarding/page.tsx +0 -394
  144. package/packages/dashboard/ui/app/app/page.tsx +0 -667
  145. package/packages/dashboard/ui/app/apple-icon.png +0 -0
  146. package/packages/dashboard/ui/app/cloud/link/page.tsx +0 -464
  147. package/packages/dashboard/ui/app/complete-profile/page.tsx +0 -204
  148. package/packages/dashboard/ui/app/connect-repos/page.tsx +0 -410
  149. package/packages/dashboard/ui/app/favicon.png +0 -0
  150. package/packages/dashboard/ui/app/globals.css +0 -59
  151. package/packages/dashboard/ui/app/history/page.tsx +0 -658
  152. package/packages/dashboard/ui/app/layout.tsx +0 -25
  153. package/packages/dashboard/ui/app/login/page.tsx +0 -424
  154. package/packages/dashboard/ui/app/metrics/page.tsx +0 -751
  155. package/packages/dashboard/ui/app/page.tsx +0 -59
  156. package/packages/dashboard/ui/app/pricing/page.tsx +0 -7
  157. package/packages/dashboard/ui/app/providers/page.tsx +0 -193
  158. package/packages/dashboard/ui/app/providers/setup/[provider]/ProviderSetupClient.tsx +0 -148
  159. package/packages/dashboard/ui/app/providers/setup/[provider]/constants.ts +0 -35
  160. package/packages/dashboard/ui/app/providers/setup/[provider]/page.tsx +0 -42
  161. package/packages/dashboard/ui/app/signup/page.tsx +0 -533
  162. package/packages/dashboard/ui/index.ts +0 -49
  163. package/packages/dashboard/ui/landing/LandingPage.tsx +0 -713
  164. package/packages/dashboard/ui/landing/PricingPage.tsx +0 -559
  165. package/packages/dashboard/ui/landing/index.ts +0 -6
  166. package/packages/dashboard/ui/landing/styles.css +0 -2850
  167. package/packages/dashboard/ui/lib/agent-merge.ts +0 -35
  168. package/packages/dashboard/ui/lib/api.ts +0 -1155
  169. package/packages/dashboard/ui/lib/cloudApi.ts +0 -877
  170. package/packages/dashboard/ui/lib/colors.ts +0 -218
  171. package/packages/dashboard/ui/lib/hierarchy.ts +0 -242
  172. package/packages/dashboard/ui/lib/stuckDetection.ts +0 -142
  173. package/packages/dashboard/ui/next-env.d.ts +0 -5
  174. package/packages/dashboard/ui/next.config.js +0 -41
  175. package/packages/dashboard/ui/package-lock.json +0 -2882
  176. package/packages/dashboard/ui/package.json +0 -33
  177. package/packages/dashboard/ui/postcss.config.js +0 -5
  178. package/packages/dashboard/ui/react-components/ActivityFeed.tsx +0 -216
  179. package/packages/dashboard/ui/react-components/AddWorkspaceModal.tsx +0 -170
  180. package/packages/dashboard/ui/react-components/AgentCard.tsx +0 -587
  181. package/packages/dashboard/ui/react-components/AgentList.tsx +0 -411
  182. package/packages/dashboard/ui/react-components/AgentProfilePanel.tsx +0 -564
  183. package/packages/dashboard/ui/react-components/App.tsx +0 -3033
  184. package/packages/dashboard/ui/react-components/BillingPanel.tsx +0 -922
  185. package/packages/dashboard/ui/react-components/BillingResult.tsx +0 -447
  186. package/packages/dashboard/ui/react-components/BroadcastComposer.tsx +0 -690
  187. package/packages/dashboard/ui/react-components/ChannelAdminPanel.tsx +0 -773
  188. package/packages/dashboard/ui/react-components/ChannelBrowser.tsx +0 -385
  189. package/packages/dashboard/ui/react-components/ChannelChat.tsx +0 -261
  190. package/packages/dashboard/ui/react-components/ChannelSidebar.tsx +0 -399
  191. package/packages/dashboard/ui/react-components/CloudSessionProvider.tsx +0 -130
  192. package/packages/dashboard/ui/react-components/CommandPalette.tsx +0 -815
  193. package/packages/dashboard/ui/react-components/ConfirmationDialog.tsx +0 -133
  194. package/packages/dashboard/ui/react-components/ConversationHistory.tsx +0 -518
  195. package/packages/dashboard/ui/react-components/CoordinatorPanel.tsx +0 -944
  196. package/packages/dashboard/ui/react-components/DecisionQueue.tsx +0 -717
  197. package/packages/dashboard/ui/react-components/DirectMessageView.tsx +0 -164
  198. package/packages/dashboard/ui/react-components/FileAutocomplete.tsx +0 -368
  199. package/packages/dashboard/ui/react-components/FleetOverview.tsx +0 -278
  200. package/packages/dashboard/ui/react-components/LogViewer.tsx +0 -310
  201. package/packages/dashboard/ui/react-components/LogViewerPanel.tsx +0 -482
  202. package/packages/dashboard/ui/react-components/Logo.tsx +0 -284
  203. package/packages/dashboard/ui/react-components/MentionAutocomplete.tsx +0 -384
  204. package/packages/dashboard/ui/react-components/MessageComposer.tsx +0 -457
  205. package/packages/dashboard/ui/react-components/MessageList.tsx +0 -649
  206. package/packages/dashboard/ui/react-components/MessageSenderName.tsx +0 -91
  207. package/packages/dashboard/ui/react-components/MessageStatusIndicator.tsx +0 -142
  208. package/packages/dashboard/ui/react-components/NewConversationModal.tsx +0 -400
  209. package/packages/dashboard/ui/react-components/NotificationToast.tsx +0 -488
  210. package/packages/dashboard/ui/react-components/OnlineUsersIndicator.tsx +0 -164
  211. package/packages/dashboard/ui/react-components/Pagination.tsx +0 -124
  212. package/packages/dashboard/ui/react-components/PricingPlans.tsx +0 -386
  213. package/packages/dashboard/ui/react-components/ProjectList.tsx +0 -625
  214. package/packages/dashboard/ui/react-components/ProviderAuthFlow.tsx +0 -853
  215. package/packages/dashboard/ui/react-components/ProviderConnectionList.tsx +0 -378
  216. package/packages/dashboard/ui/react-components/ProvisioningProgress.tsx +0 -730
  217. package/packages/dashboard/ui/react-components/RepoAccessPanel.tsx +0 -549
  218. package/packages/dashboard/ui/react-components/ServerCard.tsx +0 -202
  219. package/packages/dashboard/ui/react-components/SessionExpiredModal.tsx +0 -128
  220. package/packages/dashboard/ui/react-components/SpawnModal.tsx +0 -804
  221. package/packages/dashboard/ui/react-components/TaskAssignmentUI.tsx +0 -375
  222. package/packages/dashboard/ui/react-components/TerminalProviderSetup.tsx +0 -608
  223. package/packages/dashboard/ui/react-components/ThemeProvider.tsx +0 -325
  224. package/packages/dashboard/ui/react-components/ThinkingIndicator.tsx +0 -231
  225. package/packages/dashboard/ui/react-components/ThreadList.tsx +0 -198
  226. package/packages/dashboard/ui/react-components/ThreadPanel.tsx +0 -346
  227. package/packages/dashboard/ui/react-components/TrajectoryViewer.tsx +0 -698
  228. package/packages/dashboard/ui/react-components/TypingIndicator.tsx +0 -69
  229. package/packages/dashboard/ui/react-components/UsageBanner.tsx +0 -231
  230. package/packages/dashboard/ui/react-components/UserProfilePanel.tsx +0 -233
  231. package/packages/dashboard/ui/react-components/WorkspaceContext.tsx +0 -107
  232. package/packages/dashboard/ui/react-components/WorkspaceSelector.tsx +0 -234
  233. package/packages/dashboard/ui/react-components/WorkspaceStatusIndicator.tsx +0 -370
  234. package/packages/dashboard/ui/react-components/XTermInteractive.tsx +0 -510
  235. package/packages/dashboard/ui/react-components/XTermLogViewer.tsx +0 -719
  236. package/packages/dashboard/ui/react-components/channels/ChannelDialogs.tsx +0 -1411
  237. package/packages/dashboard/ui/react-components/channels/ChannelHeader.tsx +0 -317
  238. package/packages/dashboard/ui/react-components/channels/ChannelMessageList.tsx +0 -463
  239. package/packages/dashboard/ui/react-components/channels/ChannelViewV1.tsx +0 -146
  240. package/packages/dashboard/ui/react-components/channels/MessageInput.tsx +0 -288
  241. package/packages/dashboard/ui/react-components/channels/SearchInput.tsx +0 -172
  242. package/packages/dashboard/ui/react-components/channels/SearchResults.tsx +0 -336
  243. package/packages/dashboard/ui/react-components/channels/api.ts +0 -697
  244. package/packages/dashboard/ui/react-components/channels/index.ts +0 -76
  245. package/packages/dashboard/ui/react-components/channels/mockApi.ts +0 -344
  246. package/packages/dashboard/ui/react-components/channels/types.ts +0 -566
  247. package/packages/dashboard/ui/react-components/hooks/index.ts +0 -57
  248. package/packages/dashboard/ui/react-components/hooks/useAgentLogs.ts +0 -394
  249. package/packages/dashboard/ui/react-components/hooks/useAgents.ts +0 -127
  250. package/packages/dashboard/ui/react-components/hooks/useBroadcastDedup.ts +0 -86
  251. package/packages/dashboard/ui/react-components/hooks/useChannelAdmin.ts +0 -329
  252. package/packages/dashboard/ui/react-components/hooks/useChannelBrowser.ts +0 -239
  253. package/packages/dashboard/ui/react-components/hooks/useChannelCommands.ts +0 -138
  254. package/packages/dashboard/ui/react-components/hooks/useChannels.ts +0 -328
  255. package/packages/dashboard/ui/react-components/hooks/useDebounce.ts +0 -29
  256. package/packages/dashboard/ui/react-components/hooks/useDirectMessage.ts +0 -141
  257. package/packages/dashboard/ui/react-components/hooks/useMessages.ts +0 -309
  258. package/packages/dashboard/ui/react-components/hooks/useOrchestrator.ts +0 -364
  259. package/packages/dashboard/ui/react-components/hooks/usePinnedAgents.ts +0 -140
  260. package/packages/dashboard/ui/react-components/hooks/usePresence.ts +0 -340
  261. package/packages/dashboard/ui/react-components/hooks/useRecentRepos.ts +0 -130
  262. package/packages/dashboard/ui/react-components/hooks/useSession.ts +0 -209
  263. package/packages/dashboard/ui/react-components/hooks/useTrajectory.ts +0 -265
  264. package/packages/dashboard/ui/react-components/hooks/useWebSocket.ts +0 -169
  265. package/packages/dashboard/ui/react-components/hooks/useWorkspaceMembers.ts +0 -120
  266. package/packages/dashboard/ui/react-components/hooks/useWorkspaceRepos.ts +0 -73
  267. package/packages/dashboard/ui/react-components/hooks/useWorkspaceStatus.ts +0 -237
  268. package/packages/dashboard/ui/react-components/index.ts +0 -81
  269. package/packages/dashboard/ui/react-components/layout/Header.tsx +0 -355
  270. package/packages/dashboard/ui/react-components/layout/RepoContextHeader.tsx +0 -361
  271. package/packages/dashboard/ui/react-components/layout/Sidebar.archive.test.tsx +0 -126
  272. package/packages/dashboard/ui/react-components/layout/Sidebar.test.tsx +0 -691
  273. package/packages/dashboard/ui/react-components/layout/Sidebar.tsx +0 -930
  274. package/packages/dashboard/ui/react-components/layout/index.ts +0 -7
  275. package/packages/dashboard/ui/react-components/settings/BillingSettingsPanel.tsx +0 -564
  276. package/packages/dashboard/ui/react-components/settings/SettingsPage.tsx +0 -544
  277. package/packages/dashboard/ui/react-components/settings/TeamSettingsPanel.tsx +0 -560
  278. package/packages/dashboard/ui/react-components/settings/WorkspaceSettingsPanel.tsx +0 -1386
  279. package/packages/dashboard/ui/react-components/settings/index.ts +0 -11
  280. package/packages/dashboard/ui/react-components/settings/types.ts +0 -53
  281. package/packages/dashboard/ui/react-components/utils/messageFormatting.tsx +0 -370
  282. package/packages/dashboard/ui/tailwind.config.js +0 -148
  283. package/packages/dashboard/ui/types/index.ts +0 -304
  284. package/packages/dashboard/ui/types/threading.ts +0 -7
  285. package/packages/dashboard/ui-dist/404.html +0 -1
  286. package/packages/dashboard/ui-dist/_next/static/91mkGYq3qbG8WHE6VytQ8/_buildManifest.js +0 -1
  287. package/packages/dashboard/ui-dist/_next/static/91mkGYq3qbG8WHE6VytQ8/_ssgManifest.js +0 -1
  288. package/packages/dashboard/ui-dist/_next/static/T2rV14eEU5OweDeV29SvG/_buildManifest.js +0 -1
  289. package/packages/dashboard/ui-dist/_next/static/T2rV14eEU5OweDeV29SvG/_ssgManifest.js +0 -1
  290. package/packages/dashboard/ui-dist/_next/static/chunks/116-a883fca163f3a5bc.js +0 -1
  291. package/packages/dashboard/ui-dist/_next/static/chunks/117-c8afed19e821a35d.js +0 -2
  292. package/packages/dashboard/ui-dist/_next/static/chunks/282-980c2eb8fff20123.js +0 -1
  293. package/packages/dashboard/ui-dist/_next/static/chunks/320-a6304232cd0ee2ce.js +0 -1
  294. package/packages/dashboard/ui-dist/_next/static/chunks/532-bace199897eeab37.js +0 -9
  295. package/packages/dashboard/ui-dist/_next/static/chunks/631-16b905e5920f9b59.js +0 -1
  296. package/packages/dashboard/ui-dist/_next/static/chunks/648-acb2ff9f77cbfbd3.js +0 -1
  297. package/packages/dashboard/ui-dist/_next/static/chunks/766-2aea80818f7eb0d8.js +0 -1
  298. package/packages/dashboard/ui-dist/_next/static/chunks/83-26d2bde54616ee90.js +0 -1
  299. package/packages/dashboard/ui-dist/_next/static/chunks/847-f1f467060f32afff.js +0 -1
  300. package/packages/dashboard/ui-dist/_next/static/chunks/891-5cb1513eeb97a891.js +0 -1
  301. package/packages/dashboard/ui-dist/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +0 -1
  302. package/packages/dashboard/ui-dist/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +0 -1
  303. package/packages/dashboard/ui-dist/_next/static/chunks/app/app/page-366fb7c078d4e9e0.js +0 -1
  304. package/packages/dashboard/ui-dist/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +0 -1
  305. package/packages/dashboard/ui-dist/_next/static/chunks/app/complete-profile/page-dd64bbdf66b639cd.js +0 -1
  306. package/packages/dashboard/ui-dist/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +0 -1
  307. package/packages/dashboard/ui-dist/_next/static/chunks/app/history/page-9965d2483011b846.js +0 -1
  308. package/packages/dashboard/ui-dist/_next/static/chunks/app/layout-6b91e33784c20610.js +0 -1
  309. package/packages/dashboard/ui-dist/_next/static/chunks/app/login/page-435eceb0073be027.js +0 -1
  310. package/packages/dashboard/ui-dist/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +0 -1
  311. package/packages/dashboard/ui-dist/_next/static/chunks/app/page-8119d4246743574e.js +0 -1
  312. package/packages/dashboard/ui-dist/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +0 -1
  313. package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +0 -1
  314. package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +0 -1
  315. package/packages/dashboard/ui-dist/_next/static/chunks/app/signup/page-c7a0a28341365ae0.js +0 -1
  316. package/packages/dashboard/ui-dist/_next/static/chunks/e868780c-48e5f147c90a3a41.js +0 -18
  317. package/packages/dashboard/ui-dist/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +0 -1
  318. package/packages/dashboard/ui-dist/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
  319. package/packages/dashboard/ui-dist/_next/static/chunks/main-311c3db74dcfadb7.js +0 -1
  320. package/packages/dashboard/ui-dist/_next/static/chunks/main-app-fdbeb09028f57c9f.js +0 -1
  321. package/packages/dashboard/ui-dist/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
  322. package/packages/dashboard/ui-dist/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
  323. package/packages/dashboard/ui-dist/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  324. package/packages/dashboard/ui-dist/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +0 -1
  325. package/packages/dashboard/ui-dist/_next/static/css/4034f236dd1a3178.css +0 -1
  326. package/packages/dashboard/ui-dist/_next/static/css/6892f8422896ef7a.css +0 -1
  327. package/packages/dashboard/ui-dist/_next/static/l8L2OscDSR2vsMIlWcC48/_buildManifest.js +0 -1
  328. package/packages/dashboard/ui-dist/_next/static/l8L2OscDSR2vsMIlWcC48/_ssgManifest.js +0 -1
  329. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-128.png +0 -0
  330. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-256.png +0 -0
  331. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-32.png +0 -0
  332. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-512.png +0 -0
  333. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-64.png +0 -0
  334. package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo.svg +0 -45
  335. package/packages/dashboard/ui-dist/alt-logos/logo.svg +0 -38
  336. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-128.png +0 -0
  337. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-256.png +0 -0
  338. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-32.png +0 -0
  339. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-512.png +0 -0
  340. package/packages/dashboard/ui-dist/alt-logos/monogram-logo-64.png +0 -0
  341. package/packages/dashboard/ui-dist/alt-logos/monogram-logo.svg +0 -38
  342. package/packages/dashboard/ui-dist/app/onboarding.html +0 -1
  343. package/packages/dashboard/ui-dist/app/onboarding.txt +0 -7
  344. package/packages/dashboard/ui-dist/app.html +0 -1
  345. package/packages/dashboard/ui-dist/app.txt +0 -7
  346. package/packages/dashboard/ui-dist/apple-icon.png +0 -0
  347. package/packages/dashboard/ui-dist/cloud/link.html +0 -1
  348. package/packages/dashboard/ui-dist/cloud/link.txt +0 -7
  349. package/packages/dashboard/ui-dist/complete-profile.html +0 -5
  350. package/packages/dashboard/ui-dist/complete-profile.txt +0 -7
  351. package/packages/dashboard/ui-dist/connect-repos.html +0 -1
  352. package/packages/dashboard/ui-dist/connect-repos.txt +0 -7
  353. package/packages/dashboard/ui-dist/history.html +0 -1
  354. package/packages/dashboard/ui-dist/history.txt +0 -7
  355. package/packages/dashboard/ui-dist/index.html +0 -1
  356. package/packages/dashboard/ui-dist/index.txt +0 -7
  357. package/packages/dashboard/ui-dist/login.html +0 -5
  358. package/packages/dashboard/ui-dist/login.txt +0 -7
  359. package/packages/dashboard/ui-dist/metrics.html +0 -1
  360. package/packages/dashboard/ui-dist/metrics.txt +0 -7
  361. package/packages/dashboard/ui-dist/pricing.html +0 -13
  362. package/packages/dashboard/ui-dist/pricing.txt +0 -7
  363. package/packages/dashboard/ui-dist/providers/setup/claude.html +0 -1
  364. package/packages/dashboard/ui-dist/providers/setup/claude.txt +0 -8
  365. package/packages/dashboard/ui-dist/providers/setup/codex.html +0 -1
  366. package/packages/dashboard/ui-dist/providers/setup/codex.txt +0 -8
  367. package/packages/dashboard/ui-dist/providers/setup/cursor.html +0 -1
  368. package/packages/dashboard/ui-dist/providers/setup/cursor.txt +0 -8
  369. package/packages/dashboard/ui-dist/providers.html +0 -1
  370. package/packages/dashboard/ui-dist/providers.txt +0 -7
  371. package/packages/dashboard/ui-dist/signup.html +0 -6
  372. package/packages/dashboard/ui-dist/signup.txt +0 -7
  373. package/packages/dashboard-server/dist/health-worker-manager.d.ts +0 -62
  374. package/packages/dashboard-server/dist/health-worker-manager.js +0 -144
  375. package/packages/dashboard-server/dist/health-worker.d.ts +0 -9
  376. package/packages/dashboard-server/dist/health-worker.js +0 -79
  377. package/packages/dashboard-server/dist/index.d.ts +0 -18
  378. package/packages/dashboard-server/dist/index.js +0 -17
  379. package/packages/dashboard-server/dist/metrics.d.ts +0 -105
  380. package/packages/dashboard-server/dist/metrics.js +0 -193
  381. package/packages/dashboard-server/dist/needs-attention.d.ts +0 -24
  382. package/packages/dashboard-server/dist/needs-attention.js +0 -78
  383. package/packages/dashboard-server/dist/server.d.ts +0 -25
  384. package/packages/dashboard-server/dist/server.js +0 -5158
  385. package/packages/dashboard-server/dist/start.d.ts +0 -6
  386. package/packages/dashboard-server/dist/start.js +0 -13
  387. package/packages/dashboard-server/dist/types/threading.d.ts +0 -8
  388. package/packages/dashboard-server/dist/types/threading.js +0 -2
  389. package/packages/dashboard-server/dist/user-bridge.d.ts +0 -158
  390. package/packages/dashboard-server/dist/user-bridge.js +0 -390
  391. package/packages/dashboard-server/package.json +0 -55
@@ -1,698 +0,0 @@
1
- /**
2
- * TrajectoryViewer Component
3
- *
4
- * Displays an agent's action history as a refined timeline,
5
- * with a distinctive futuristic aesthetic emphasizing clarity and flow.
6
- * Uses Tailwind CSS with Mission Control theme.
7
- */
8
-
9
- import React, { useState, useMemo, useEffect } from 'react';
10
-
11
- export interface TrajectoryStep {
12
- id: string;
13
- timestamp: string | number;
14
- type: 'tool_call' | 'decision' | 'message' | 'state_change' | 'error' | 'phase_transition';
15
- phase?: 'plan' | 'design' | 'execute' | 'review' | 'observe';
16
- title: string;
17
- description?: string;
18
- metadata?: Record<string, unknown>;
19
- duration?: number;
20
- status?: 'pending' | 'running' | 'success' | 'error';
21
- }
22
-
23
- export interface TrajectoryHistoryEntry {
24
- id: string;
25
- title: string;
26
- status: 'active' | 'completed' | 'abandoned';
27
- startedAt: string;
28
- completedAt?: string;
29
- agents?: string[];
30
- summary?: string;
31
- confidence?: number;
32
- }
33
-
34
- export interface TrajectoryViewerProps {
35
- agentName: string;
36
- steps: TrajectoryStep[];
37
- history?: TrajectoryHistoryEntry[];
38
- selectedTrajectoryId?: string | null;
39
- onSelectTrajectory?: (id: string | null) => void;
40
- isLoading?: boolean;
41
- onStepClick?: (step: TrajectoryStep) => void;
42
- compact?: boolean;
43
- }
44
-
45
- export function TrajectoryViewer({
46
- agentName,
47
- steps,
48
- history = [],
49
- selectedTrajectoryId,
50
- onSelectTrajectory,
51
- isLoading = false,
52
- onStepClick,
53
- compact = false,
54
- }: TrajectoryViewerProps) {
55
- const [expandedSteps, setExpandedSteps] = useState<Set<string>>(new Set());
56
- const [filter, setFilter] = useState<TrajectoryStep['type'] | 'all'>('all');
57
- const [searchQuery, setSearchQuery] = useState('');
58
- // Show history list when no trajectory is selected, allowing users to browse all trajectories
59
- // When a trajectory is selected, show its steps instead
60
- const isHistoryView = selectedTrajectoryId === null && history.length > 0;
61
-
62
- useEffect(() => {
63
- setFilter('all');
64
- }, [selectedTrajectoryId]);
65
-
66
- // Filter steps
67
- const filteredSteps = useMemo(() => {
68
- if (filter === 'all') return steps;
69
- return steps.filter((s) => s.type === filter);
70
- }, [steps, filter]);
71
-
72
- const filteredHistory = useMemo(() => {
73
- const query = searchQuery.trim().toLowerCase();
74
- if (!query) return history;
75
-
76
- return history.filter((entry) => {
77
- const inTitle = entry.title?.toLowerCase().includes(query);
78
- const inSummary = entry.summary?.toLowerCase().includes(query);
79
- const inAgents = entry.agents?.some((agent) => agent.toLowerCase().includes(query));
80
- const inStatus = entry.status?.toLowerCase().includes(query);
81
- const inId = entry.id?.toLowerCase().includes(query);
82
- return inTitle || inSummary || inAgents || inStatus || inId;
83
- });
84
- }, [history, searchQuery]);
85
-
86
- // Toggle step expansion
87
- const toggleStep = (stepId: string) => {
88
- setExpandedSteps((prev) => {
89
- const next = new Set(prev);
90
- if (next.has(stepId)) {
91
- next.delete(stepId);
92
- } else {
93
- next.add(stepId);
94
- }
95
- return next;
96
- });
97
- };
98
-
99
- const typeFilters: { value: TrajectoryStep['type'] | 'all'; label: string; icon: React.ReactNode }[] = [
100
- { value: 'all', label: 'All', icon: <FilterAllIcon /> },
101
- { value: 'tool_call', label: 'Tools', icon: <ToolIcon /> },
102
- { value: 'decision', label: 'Decisions', icon: <DecisionIcon /> },
103
- { value: 'message', label: 'Messages', icon: <MessageIcon /> },
104
- { value: 'state_change', label: 'State', icon: <StateIcon /> },
105
- { value: 'phase_transition', label: 'Phases', icon: <PhaseIcon /> },
106
- { value: 'error', label: 'Errors', icon: <ErrorIcon /> },
107
- ];
108
-
109
- // Calculate phase distribution for the mini progress bar
110
- const phaseStats = useMemo(() => {
111
- const phases = steps.filter(s => s.phase).reduce((acc, s) => {
112
- if (s.phase) acc[s.phase] = (acc[s.phase] || 0) + 1;
113
- return acc;
114
- }, {} as Record<string, number>);
115
- const total = Object.values(phases).reduce((a, b) => a + b, 0);
116
- return { phases, total };
117
- }, [steps]);
118
-
119
- return (
120
- <div className="h-full flex flex-col bg-gradient-to-b from-bg-card to-bg-tertiary rounded-xl border border-border/50 overflow-hidden shadow-lg backdrop-blur-sm">
121
- {/* Header with gradient accent line */}
122
- <div className="relative">
123
- <div className="absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-blue-500 via-accent-cyan to-blue-500 opacity-60" />
124
-
125
- <div className="flex items-center justify-between px-5 py-4 border-b border-border/30">
126
- <div className="flex items-center gap-3">
127
- {/* Back button when viewing a specific trajectory */}
128
- {selectedTrajectoryId && onSelectTrajectory && (
129
- <button
130
- onClick={() => onSelectTrajectory(null)}
131
- className="flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-medium text-text-muted hover:text-accent-cyan bg-bg-elevated/50 hover:bg-bg-elevated rounded-lg border border-border/30 hover:border-accent-cyan/30 transition-all duration-200"
132
- title="Back to trajectory list"
133
- >
134
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
135
- <path d="M19 12H5M12 19l-7-7 7-7" strokeLinecap="round" strokeLinejoin="round" />
136
- </svg>
137
- <span>List</span>
138
- </button>
139
- )}
140
- <div className="relative">
141
- <div className="w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500/20 to-accent-cyan/20 flex items-center justify-center border border-blue-500/30">
142
- <TrajectoryHeaderIcon />
143
- </div>
144
- {steps.some(s => s.status === 'running') && (
145
- <span className="absolute -top-1 -right-1 w-3 h-3 bg-accent-cyan rounded-full animate-pulse shadow-[0_0_8px_rgba(0,217,255,0.6)]" />
146
- )}
147
- </div>
148
- <div className="flex flex-col">
149
- <span className="font-semibold text-sm text-text-primary tracking-wide">Trajectory</span>
150
- <div className="flex items-center gap-2">
151
- <span className="text-[11px] text-text-muted font-mono">
152
- {steps.length} {steps.length === 1 ? 'step' : 'steps'}
153
- </span>
154
- {agentName && (
155
- <>
156
- <span className="text-text-dim">|</span>
157
- <span className="text-[11px] text-accent-cyan/80 font-medium truncate max-w-[120px]">{agentName}</span>
158
- </>
159
- )}
160
- </div>
161
- </div>
162
- </div>
163
-
164
- {/* Mini phase progress indicator */}
165
- {phaseStats.total > 0 && !compact && (
166
- <div className="flex items-center gap-1.5">
167
- {(['plan', 'design', 'execute', 'review', 'observe'] as const).map(phase => {
168
- const count = phaseStats.phases[phase] || 0;
169
- const color = getPhaseColor(phase);
170
- return count > 0 ? (
171
- <div
172
- key={phase}
173
- className="h-1.5 rounded-full transition-all duration-300"
174
- style={{
175
- width: `${Math.max(8, (count / phaseStats.total) * 48)}px`,
176
- backgroundColor: color || 'var(--color-border)',
177
- }}
178
- title={`${phase}: ${count}`}
179
- />
180
- ) : null;
181
- })}
182
- </div>
183
- )}
184
- </div>
185
-
186
- {/* Filter tabs */}
187
- {!compact && !isHistoryView && (
188
- <div className="flex items-center gap-1 px-4 py-2 bg-bg-elevated/50 border-b border-border/20 overflow-x-auto scrollbar-thin">
189
- {typeFilters.map((f) => (
190
- <button
191
- key={f.value}
192
- className={`flex items-center gap-1.5 px-3 py-1.5 text-[11px] font-medium rounded-lg transition-all duration-200 whitespace-nowrap ${
193
- filter === f.value
194
- ? 'bg-blue-500/20 text-blue-500 border border-blue-500/30 shadow-[0_0_12px_rgba(59,130,246,0.15)]'
195
- : 'text-text-muted hover:text-text-secondary hover:bg-bg-hover/50'
196
- }`}
197
- onClick={() => setFilter(f.value)}
198
- >
199
- <span className="opacity-70">{f.icon}</span>
200
- {f.label}
201
- </button>
202
- ))}
203
- </div>
204
- )}
205
- </div>
206
-
207
- {/* Timeline */}
208
- <div className="flex-1 min-h-0 overflow-y-auto px-4 py-3 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent">
209
- {isLoading ? (
210
- <div className="flex flex-col items-center justify-center gap-4 py-12 text-text-muted">
211
- <div className="relative">
212
- <Spinner />
213
- <div className="absolute inset-0 bg-accent-cyan/10 rounded-full blur-xl" />
214
- </div>
215
- <span className="text-sm font-medium">Loading trajectory...</span>
216
- </div>
217
- ) : isHistoryView ? (
218
- /* Show trajectory history list - allows browsing all trajectories */
219
- <div className="flex flex-col gap-2">
220
- <div className="flex items-center justify-between gap-3 px-2">
221
- <span className="text-xs font-medium text-text-secondary uppercase tracking-wider">All Trajectories</span>
222
- <input
223
- type="search"
224
- value={searchQuery}
225
- onChange={(event) => setSearchQuery(event.target.value)}
226
- placeholder="Search trajectories..."
227
- className="text-[11px] text-text-secondary bg-bg-elevated/60 border border-border/30 rounded-md px-2 py-1 w-40 focus:outline-none focus:border-accent-cyan/40"
228
- />
229
- </div>
230
- <div className="flex flex-col gap-1">
231
- {filteredHistory.map((entry) => (
232
- <button
233
- key={entry.id}
234
- onClick={() => onSelectTrajectory?.(entry.id)}
235
- className={`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 border ${
236
- entry.status === 'active'
237
- ? 'bg-blue-500/10 border-blue-500/30 hover:bg-blue-500/20'
238
- : 'bg-bg-tertiary/50 border-transparent hover:bg-bg-elevated/60 hover:border-border/40'
239
- }`}
240
- >
241
- <div className="flex items-center justify-between gap-2">
242
- <span className="text-[13px] font-medium text-text-primary truncate flex-1">
243
- {entry.title}
244
- </span>
245
- <span className={`text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0 ${
246
- entry.status === 'completed'
247
- ? 'bg-green-500/15 text-green-500'
248
- : entry.status === 'active'
249
- ? 'bg-blue-500/15 text-blue-500'
250
- : 'bg-amber-500/15 text-amber-500'
251
- }`}>
252
- {entry.status}
253
- </span>
254
- </div>
255
- <div className="flex items-center gap-2 mt-1">
256
- <span className="text-[10px] text-text-dim">
257
- {formatRelativeTime(entry.startedAt)}
258
- </span>
259
- {entry.confidence && (
260
- <span className="text-[10px] text-text-dim">
261
- • {Math.round(entry.confidence * 100)}% confidence
262
- </span>
263
- )}
264
- </div>
265
- {entry.summary && (
266
- <p className="text-[11px] text-text-muted mt-1 line-clamp-2">
267
- {entry.summary}
268
- </p>
269
- )}
270
- </button>
271
- ))}
272
- {filteredHistory.length === 0 && (
273
- <div className="px-3 py-4 text-[11px] text-text-muted">
274
- No matching trajectories. Try a different search.
275
- </div>
276
- )}
277
- </div>
278
- </div>
279
- ) : filteredSteps.length === 0 ? (
280
- <div className="flex flex-col gap-4 py-4 text-text-muted">
281
- {steps.length === 0 ? (
282
- <div className="flex flex-col items-center justify-center gap-4 py-8">
283
- <div className="w-16 h-16 rounded-2xl bg-bg-elevated/50 flex items-center justify-center border border-border/30">
284
- <EmptyIcon />
285
- </div>
286
- <div className="text-center">
287
- <p className="text-sm font-medium text-text-secondary">No steps recorded</p>
288
- <p className="text-xs text-text-dim mt-1">Steps will appear here as the agent works</p>
289
- </div>
290
- </div>
291
- ) : (
292
- <div className="flex flex-col items-center justify-center gap-4 py-8">
293
- <div className="w-16 h-16 rounded-2xl bg-bg-elevated/50 flex items-center justify-center border border-border/30">
294
- <EmptyIcon />
295
- </div>
296
- <div className="text-center">
297
- <p className="text-sm font-medium text-text-secondary">No matching steps</p>
298
- <p className="text-xs text-text-dim mt-1">Try a different filter or select "All"</p>
299
- </div>
300
- </div>
301
- )}
302
- </div>
303
- ) : (
304
- <div className="flex flex-col gap-0.5">
305
- {filteredSteps.map((step, index) => (
306
- <TrajectoryStepItem
307
- key={step.id}
308
- step={step}
309
- isExpanded={expandedSteps.has(step.id)}
310
- isLast={index === filteredSteps.length - 1}
311
- isFirst={index === 0}
312
- compact={compact}
313
- onToggle={() => toggleStep(step.id)}
314
- onClick={onStepClick ? () => onStepClick(step) : undefined}
315
- />
316
- ))}
317
- </div>
318
- )}
319
- </div>
320
- </div>
321
- );
322
- }
323
-
324
- interface TrajectoryStepItemProps {
325
- step: TrajectoryStep;
326
- isExpanded: boolean;
327
- isLast: boolean;
328
- isFirst?: boolean;
329
- compact?: boolean;
330
- onToggle: () => void;
331
- onClick?: () => void;
332
- }
333
-
334
- function TrajectoryStepItem({
335
- step,
336
- isExpanded,
337
- isLast,
338
- isFirst = false,
339
- compact = false,
340
- onToggle,
341
- onClick,
342
- }: TrajectoryStepItemProps) {
343
- const timestamp = formatTimestamp(step.timestamp);
344
- const icon = getStepIcon(step.type);
345
- const statusColor = getStatusColor(step.status);
346
- const phaseColor = getPhaseColor(step.phase);
347
- const typeColor = getTypeColor(step.type);
348
- const hasMetadata = step.metadata && Object.keys(step.metadata).length > 0;
349
- const hasDetailContent = !!step.description || hasMetadata || !!onClick;
350
-
351
- return (
352
- <div className="flex gap-3 group">
353
- {/* Timeline line and node */}
354
- <div className="flex flex-col items-center w-7 relative">
355
- {/* Connecting line above (if not first) */}
356
- {!isFirst && (
357
- <div
358
- className="absolute top-0 w-px h-2 transition-colors"
359
- style={{ backgroundColor: phaseColor ? `${phaseColor}40` : 'var(--color-border)' }}
360
- />
361
- )}
362
-
363
- {/* Node */}
364
- <div
365
- className={`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 z-10 mt-2 transition-all duration-200 ${
366
- step.status === 'running'
367
- ? 'animate-pulse shadow-[0_0_12px_rgba(0,217,255,0.4)]'
368
- : 'group-hover:scale-110'
369
- }`}
370
- style={{
371
- background: statusColor
372
- ? `linear-gradient(135deg, ${statusColor}40, ${statusColor}20)`
373
- : phaseColor
374
- ? `linear-gradient(135deg, ${phaseColor}30, ${phaseColor}10)`
375
- : `linear-gradient(135deg, ${typeColor}30, ${typeColor}10)`,
376
- borderWidth: '1px',
377
- borderStyle: 'solid',
378
- borderColor: statusColor || phaseColor || typeColor || 'var(--color-border)',
379
- color: statusColor || phaseColor || typeColor || 'var(--color-text-secondary)',
380
- }}
381
- >
382
- {icon}
383
- </div>
384
-
385
- {/* Connecting line below (if not last) */}
386
- {!isLast && (
387
- <div
388
- className="w-px flex-1 mt-1 transition-colors"
389
- style={{
390
- background: `linear-gradient(to bottom, ${phaseColor || typeColor || 'var(--color-border)'}40, transparent)`
391
- }}
392
- />
393
- )}
394
- </div>
395
-
396
- {/* Content */}
397
- <div className={`flex-1 min-w-0 pt-1 ${isLast ? 'pb-1' : 'pb-3'}`}>
398
- <button
399
- className={`w-full flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 text-left border ${
400
- isExpanded
401
- ? 'bg-bg-elevated/80 border-border/60 shadow-sm'
402
- : 'bg-bg-tertiary/50 border-transparent hover:bg-bg-elevated/60 hover:border-border/40'
403
- }`}
404
- onClick={onToggle}
405
- >
406
- <div className="flex items-center gap-2 min-w-0 flex-1">
407
- <span className="text-[13px] font-medium text-text-primary truncate">
408
- {step.title}
409
- </span>
410
- <span
411
- className="text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0"
412
- style={{
413
- backgroundColor: `${typeColor}15`,
414
- color: typeColor,
415
- }}
416
- >
417
- {formatType(step.type)}
418
- </span>
419
- {step.phase && phaseColor && (
420
- <span
421
- className="text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0"
422
- style={{
423
- backgroundColor: `${phaseColor}15`,
424
- color: phaseColor,
425
- }}
426
- >
427
- {step.phase}
428
- </span>
429
- )}
430
- </div>
431
- <div className="flex items-center gap-2 flex-shrink-0">
432
- {step.duration !== undefined && (
433
- <span className="text-[10px] font-mono text-text-muted px-1.5 py-0.5 bg-bg-elevated/50 rounded">
434
- {formatDuration(step.duration)}
435
- </span>
436
- )}
437
- <span className="text-[10px] text-text-dim">{timestamp}</span>
438
- {!compact && <ChevronIcon isExpanded={isExpanded} />}
439
- </div>
440
- </button>
441
-
442
- {/* Expanded details */}
443
- {isExpanded && !compact && hasDetailContent && (
444
- <div className="mt-2 ml-1 pl-3 border-l-2 border-border/30">
445
- {step.description && (
446
- <p className="text-[13px] text-text-secondary mb-3 leading-relaxed">
447
- {step.description}
448
- </p>
449
- )}
450
- {hasMetadata && (
451
- <div className="bg-bg-elevated/50 rounded-lg p-3 mb-3 overflow-x-auto border border-border/20">
452
- <pre className="text-[11px] font-mono text-text-muted whitespace-pre-wrap break-words leading-relaxed">
453
- {JSON.stringify(step.metadata, null, 2)}
454
- </pre>
455
- </div>
456
- )}
457
- {onClick && (
458
- <button
459
- className="inline-flex items-center gap-1.5 px-3 py-1.5 text-[11px] font-medium text-accent-cyan bg-accent-cyan/10 border border-accent-cyan/20 rounded-md hover:bg-accent-cyan/20 hover:border-accent-cyan/30 transition-colors"
460
- onClick={(e) => {
461
- e.stopPropagation();
462
- onClick();
463
- }}
464
- >
465
- <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
466
- <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
467
- <polyline points="15 3 21 3 21 9" />
468
- <line x1="10" y1="14" x2="21" y2="3" />
469
- </svg>
470
- View Details
471
- </button>
472
- )}
473
- </div>
474
- )}
475
- </div>
476
- </div>
477
- );
478
- }
479
-
480
- // Helper functions
481
- function formatTimestamp(ts: string | number): string {
482
- const date = new Date(ts);
483
- return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
484
- }
485
-
486
- function formatRelativeTime(dateStr: string): string {
487
- const date = new Date(dateStr);
488
- const now = new Date();
489
- const diffMs = now.getTime() - date.getTime();
490
- const diffMins = Math.floor(diffMs / 60000);
491
- const diffHours = Math.floor(diffMs / 3600000);
492
- const diffDays = Math.floor(diffMs / 86400000);
493
-
494
- if (diffMins < 1) return 'just now';
495
- if (diffMins < 60) return `${diffMins}m ago`;
496
- if (diffHours < 24) return `${diffHours}h ago`;
497
- if (diffDays < 7) return `${diffDays}d ago`;
498
- return date.toLocaleDateString();
499
- }
500
-
501
- function formatDuration(ms: number): string {
502
- if (ms < 1000) return `${ms}ms`;
503
- if (ms < 60000) return `${(ms / 1000).toFixed(1)}s`;
504
- return `${(ms / 60000).toFixed(1)}m`;
505
- }
506
-
507
- function formatType(type: TrajectoryStep['type']): string {
508
- const labels: Record<TrajectoryStep['type'], string> = {
509
- tool_call: 'Tool',
510
- decision: 'Decision',
511
- message: 'Message',
512
- state_change: 'State',
513
- phase_transition: 'Phase',
514
- error: 'Error',
515
- };
516
- return labels[type];
517
- }
518
-
519
- function getStatusColor(status?: TrajectoryStep['status']): string | null {
520
- switch (status) {
521
- case 'running':
522
- return '#ff6b35'; // warning/orange
523
- case 'success':
524
- return '#00ffc8'; // success/green
525
- case 'error':
526
- return '#ff4757'; // error/red
527
- default:
528
- return null;
529
- }
530
- }
531
-
532
- function getPhaseColor(phase?: TrajectoryStep['phase']): string | null {
533
- switch (phase) {
534
- case 'plan':
535
- return '#3b82f6'; // blue
536
- case 'design':
537
- return '#00d9ff'; // cyan
538
- case 'execute':
539
- return '#ff6b35'; // orange
540
- case 'review':
541
- return '#00ffc8'; // green
542
- case 'observe':
543
- return '#fbbf24'; // yellow
544
- default:
545
- return null;
546
- }
547
- }
548
-
549
- function getTypeColor(type: TrajectoryStep['type']): string {
550
- switch (type) {
551
- case 'tool_call':
552
- return '#00d9ff'; // cyan
553
- case 'decision':
554
- return '#3b82f6'; // blue
555
- case 'message':
556
- return '#3b82f6'; // blue
557
- case 'state_change':
558
- return '#10b981'; // emerald
559
- case 'phase_transition':
560
- return '#f59e0b'; // amber
561
- case 'error':
562
- return '#ef4444'; // red
563
- default:
564
- return '#6b7280'; // gray
565
- }
566
- }
567
-
568
- function getStepIcon(type: TrajectoryStep['type']): React.ReactNode {
569
- switch (type) {
570
- case 'tool_call':
571
- return <ToolIcon />;
572
- case 'decision':
573
- return <DecisionIcon />;
574
- case 'message':
575
- return <MessageIcon />;
576
- case 'state_change':
577
- return <StateIcon />;
578
- case 'phase_transition':
579
- return <PhaseIcon />;
580
- case 'error':
581
- return <ErrorIcon />;
582
- default:
583
- return null;
584
- }
585
- }
586
-
587
- // Icon components
588
- function TrajectoryHeaderIcon() {
589
- return (
590
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" className="text-blue-500">
591
- <path d="M3 12h4l3 9 4-18 3 9h4" strokeLinecap="round" strokeLinejoin="round" />
592
- </svg>
593
- );
594
- }
595
-
596
- function FilterAllIcon() {
597
- return (
598
- <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
599
- <circle cx="12" cy="12" r="3" />
600
- <path d="M12 2v4m0 12v4m-7.07-14.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83" />
601
- </svg>
602
- );
603
- }
604
-
605
- function ToolIcon() {
606
- return (
607
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
608
- <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
609
- </svg>
610
- );
611
- }
612
-
613
- function DecisionIcon() {
614
- return (
615
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
616
- <path d="M12 2l2.4 7.4H22l-6 4.6 2.3 7-6.3-4.6L5.7 21l2.3-7-6-4.6h7.6z" />
617
- </svg>
618
- );
619
- }
620
-
621
- function MessageIcon() {
622
- return (
623
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
624
- <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
625
- </svg>
626
- );
627
- }
628
-
629
- function StateIcon() {
630
- return (
631
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
632
- <rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
633
- <path d="M9 12h6m-3-3v6" />
634
- </svg>
635
- );
636
- }
637
-
638
- function PhaseIcon() {
639
- return (
640
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
641
- <circle cx="12" cy="12" r="10" />
642
- <path d="M12 6v6l4 2" />
643
- </svg>
644
- );
645
- }
646
-
647
- function ErrorIcon() {
648
- return (
649
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
650
- <circle cx="12" cy="12" r="10" />
651
- <line x1="12" y1="8" x2="12" y2="12" />
652
- <circle cx="12" cy="16" r="0.5" fill="currentColor" />
653
- </svg>
654
- );
655
- }
656
-
657
- function ChevronIcon({ isExpanded }: { isExpanded: boolean }) {
658
- return (
659
- <svg
660
- width="14"
661
- height="14"
662
- viewBox="0 0 24 24"
663
- fill="none"
664
- stroke="currentColor"
665
- strokeWidth="2"
666
- className={`text-text-muted transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
667
- >
668
- <polyline points="6 9 12 15 18 9" />
669
- </svg>
670
- );
671
- }
672
-
673
- function EmptyIcon() {
674
- return (
675
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" className="text-text-dim">
676
- <circle cx="12" cy="12" r="10" />
677
- <line x1="8" y1="12" x2="16" y2="12" />
678
- </svg>
679
- );
680
- }
681
-
682
- function Spinner() {
683
- return (
684
- <svg className="animate-spin" width="20" height="20" viewBox="0 0 24 24">
685
- <circle
686
- cx="12"
687
- cy="12"
688
- r="10"
689
- stroke="currentColor"
690
- strokeWidth="2"
691
- fill="none"
692
- strokeDasharray="32"
693
- strokeLinecap="round"
694
- className="text-accent"
695
- />
696
- </svg>
697
- );
698
- }