@sleep2agi/agent-network-dashboard 0.4.6-preview.26 → 0.4.6-preview.261

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 (459) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/diagnostics/route-bundle-stats.json +41 -41
  5. package/.next/fallback-build-manifest.json +3 -3
  6. package/.next/prerender-manifest.json +3 -3
  7. package/.next/routes-manifest.json +6 -0
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +2 -2
  17. package/.next/server/app/_not-found.rsc +12 -12
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  19. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  20. package/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  24. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/admin.html +2 -2
  26. package/.next/server/app/admin.rsc +14 -14
  27. package/.next/server/app/admin.segments/_full.segment.rsc +14 -14
  28. package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
  29. package/.next/server/app/admin.segments/_index.segment.rsc +7 -7
  30. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  31. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
  32. package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
  33. package/.next/server/app/api/hub/servers/route/app-paths-manifest.json +3 -0
  34. package/.next/server/app/api/hub/servers/route/build-manifest.json +9 -0
  35. package/.next/server/app/api/hub/servers/route/server-reference-manifest.json +4 -0
  36. package/.next/server/app/api/hub/servers/route.js +7 -0
  37. package/.next/server/app/api/hub/servers/route.js.map +5 -0
  38. package/.next/server/app/api/hub/servers/route.js.nft.json +1 -0
  39. package/.next/server/app/api/hub/servers/route_client-reference-manifest.js +3 -0
  40. package/.next/server/app/index.html +2 -2
  41. package/.next/server/app/index.rsc +14 -14
  42. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  43. package/.next/server/app/index.segments/_full.segment.rsc +14 -14
  44. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  45. package/.next/server/app/index.segments/_index.segment.rsc +7 -7
  46. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  47. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/login.html +2 -2
  49. package/.next/server/app/login.rsc +14 -14
  50. package/.next/server/app/login.segments/_full.segment.rsc +14 -14
  51. package/.next/server/app/login.segments/_head.segment.rsc +4 -4
  52. package/.next/server/app/login.segments/_index.segment.rsc +7 -7
  53. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  55. package/.next/server/app/login.segments/login.segment.rsc +3 -3
  56. package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/logs.html +2 -2
  58. package/.next/server/app/logs.rsc +14 -14
  59. package/.next/server/app/logs.segments/_full.segment.rsc +14 -14
  60. package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
  61. package/.next/server/app/logs.segments/_index.segment.rsc +7 -7
  62. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  63. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
  64. package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
  65. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/messages.html +2 -2
  67. package/.next/server/app/messages.rsc +14 -14
  68. package/.next/server/app/messages.segments/_full.segment.rsc +14 -14
  69. package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
  70. package/.next/server/app/messages.segments/_index.segment.rsc +7 -7
  71. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  72. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
  73. package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
  74. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/node.html +2 -2
  76. package/.next/server/app/node.rsc +14 -14
  77. package/.next/server/app/node.segments/_full.segment.rsc +14 -14
  78. package/.next/server/app/node.segments/_head.segment.rsc +4 -4
  79. package/.next/server/app/node.segments/_index.segment.rsc +7 -7
  80. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  81. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
  82. package/.next/server/app/node.segments/node.segment.rsc +3 -3
  83. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/nodes.html +2 -2
  85. package/.next/server/app/nodes.rsc +14 -14
  86. package/.next/server/app/nodes.segments/_full.segment.rsc +14 -14
  87. package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
  88. package/.next/server/app/nodes.segments/_index.segment.rsc +7 -7
  89. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  90. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
  91. package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
  92. package/.next/server/app/page_client-reference-manifest.js +1 -1
  93. package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/server-logs.html +2 -2
  95. package/.next/server/app/server-logs.rsc +14 -14
  96. package/.next/server/app/server-logs.segments/_full.segment.rsc +14 -14
  97. package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
  98. package/.next/server/app/server-logs.segments/_index.segment.rsc +7 -7
  99. package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
  100. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
  101. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
  102. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/settings/networks.html +2 -2
  104. package/.next/server/app/settings/networks.rsc +14 -14
  105. package/.next/server/app/settings/networks.segments/_full.segment.rsc +14 -14
  106. package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
  107. package/.next/server/app/settings/networks.segments/_index.segment.rsc +7 -7
  108. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  109. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
  110. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
  111. package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
  112. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  113. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/settings/tokens.html +2 -2
  115. package/.next/server/app/settings/tokens.rsc +14 -14
  116. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +14 -14
  117. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
  118. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +7 -7
  119. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
  121. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
  122. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
  123. package/.next/server/app/settings.html +2 -2
  124. package/.next/server/app/settings.rsc +14 -14
  125. package/.next/server/app/settings.segments/_full.segment.rsc +14 -14
  126. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  127. package/.next/server/app/settings.segments/_index.segment.rsc +7 -7
  128. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  129. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  130. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  131. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  132. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  133. package/.next/server/app/tasks.html +2 -2
  134. package/.next/server/app/tasks.rsc +14 -14
  135. package/.next/server/app/tasks.segments/_full.segment.rsc +14 -14
  136. package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  137. package/.next/server/app/tasks.segments/_index.segment.rsc +7 -7
  138. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  139. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  140. package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  141. package/.next/server/app-paths-manifest.json +1 -0
  142. package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js +3 -0
  143. package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js.map +1 -0
  144. package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js +3 -0
  145. package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js.map +1 -0
  146. package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js +1 -1
  147. package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js.map +1 -1
  148. package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
  149. package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
  150. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
  151. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
  152. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +4 -1
  153. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
  154. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  155. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  156. package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js +1 -1
  157. package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js.map +1 -1
  158. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  159. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  160. package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js +1 -1
  161. package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js.map +1 -1
  162. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
  163. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
  164. package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
  165. package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
  166. package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
  167. package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
  168. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
  169. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
  170. package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
  171. package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
  172. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js +1 -1
  173. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js.map +1 -1
  174. package/.next/server/middleware-build-manifest.js +3 -3
  175. package/.next/server/pages/404.html +2 -2
  176. package/.next/server/pages/500.html +1 -1
  177. package/.next/server/server-reference-manifest.js +1 -1
  178. package/.next/server/server-reference-manifest.json +1 -1
  179. package/.next/static/chunks/0-mpa_947ipeq.js +1 -0
  180. package/.next/static/chunks/00.pi0.850kxg.js +1 -0
  181. package/.next/static/chunks/01lmbsd37fybu.js +1 -0
  182. package/.next/static/chunks/03o.h6kvmw4l_.js +1 -0
  183. package/.next/static/chunks/03~~oirxz7~vc.js +1 -0
  184. package/.next/static/chunks/05uk96gc~9mni.js +1 -0
  185. package/.next/static/chunks/08kf-.bgs10ze.js +1 -0
  186. package/.next/static/chunks/08y27uzl7w6bx.css +2 -0
  187. package/.next/static/chunks/0ggj5ummw2a84.js +7 -0
  188. package/.next/static/chunks/0glmrdj9112tc.js +7 -0
  189. package/.next/static/chunks/0rxrez_cjn.eh.js +1 -0
  190. package/.next/static/chunks/0s64vw8kd5rn7.js +1 -0
  191. package/.next/static/chunks/0x8x.29hkju5a.js +1 -0
  192. package/.next/static/chunks/11drzen-wfaop.js +4 -0
  193. package/.next/static/chunks/174re5ar~kxne.js +1 -0
  194. package/.next/trace +2 -2
  195. package/.next/trace-build +1 -1
  196. package/.next/types/routes.d.ts +2 -1
  197. package/.next/types/validator.ts +9 -0
  198. package/app/api/hub/servers/route.ts +39 -0
  199. package/app/components/ChatPopover.tsx +38 -2
  200. package/app/components/CommandPalette.tsx +107 -0
  201. package/app/components/HelpOverlay.tsx +126 -0
  202. package/app/components/ServersDrawer.tsx +64 -27
  203. package/app/components/TopoGraph.tsx +5291 -237
  204. package/app/components/utils.ts +8 -7
  205. package/app/globals.css +110 -5
  206. package/app/lib/time.ts +36 -0
  207. package/package.json +2 -2
  208. package/scripts/help-overlay-topo-test.mjs +44 -0
  209. package/scripts/servers-drawer-live-test.mjs +96 -0
  210. package/scripts/topo-active-filter-pill-test.mjs +101 -0
  211. package/scripts/topo-active-links-chip-hover-test.mjs +103 -0
  212. package/scripts/topo-active-links-chip-nav-test.mjs +117 -0
  213. package/scripts/topo-active-links-chip-self-hover-test.mjs +171 -0
  214. package/scripts/topo-active-links-chip-test.mjs +73 -0
  215. package/scripts/topo-active-links-empty-recede-test.mjs +125 -0
  216. package/scripts/topo-active-links-freshness-test.mjs +113 -0
  217. package/scripts/topo-active-links-tooltip-test.mjs +79 -0
  218. package/scripts/topo-active-pulse-ease-test.mjs +120 -0
  219. package/scripts/topo-arrival-ping-test.mjs +87 -0
  220. package/scripts/topo-auto-fit-test.mjs +73 -0
  221. package/scripts/topo-canvas-aria-test.mjs +108 -0
  222. package/scripts/topo-chat-target-breath-test.mjs +84 -0
  223. package/scripts/topo-chat-target-ring-ease-test.mjs +82 -0
  224. package/scripts/topo-chat-target-ring-fade-test.mjs +124 -0
  225. package/scripts/topo-chip-empty-recede-test.mjs +116 -0
  226. package/scripts/topo-chip-focus-test.mjs +95 -0
  227. package/scripts/topo-chip-pin-mirror-test.mjs +113 -0
  228. package/scripts/topo-chip-row-tabular-test.mjs +111 -0
  229. package/scripts/topo-chrome-a11y-test.mjs +107 -0
  230. package/scripts/topo-chrome-pop-extension-test.mjs +98 -0
  231. package/scripts/topo-chrome-pop-nodesize-test.mjs +88 -0
  232. package/scripts/topo-chrome-press-state-test.mjs +135 -0
  233. package/scripts/topo-chrome-zoom-level-pop-test.mjs +122 -0
  234. package/scripts/topo-chrome-zoom-pop-test.mjs +130 -0
  235. package/scripts/topo-click-ripple-ease-test.mjs +94 -0
  236. package/scripts/topo-cmdk-edge-clear-test.mjs +109 -0
  237. package/scripts/topo-cmdk-layout-view-test.mjs +108 -0
  238. package/scripts/topo-cmdk-pin-test.mjs +123 -0
  239. package/scripts/topo-cmdk-vendor-clear-test.mjs +133 -0
  240. package/scripts/topo-cmdk-vendor-pin-test.mjs +103 -0
  241. package/scripts/topo-cwd-tooltip-test.mjs +64 -0
  242. package/scripts/topo-dblclick-reset-test.mjs +74 -0
  243. package/scripts/topo-dense-alias-fill-transition-test.mjs +133 -0
  244. package/scripts/topo-discrete-zoom-smooth-test.mjs +125 -0
  245. package/scripts/topo-dispatch-pulse-test.mjs +83 -0
  246. package/scripts/topo-edge-badge-click-pin-test.mjs +94 -0
  247. package/scripts/topo-edge-badge-crossfade-test.mjs +138 -0
  248. package/scripts/topo-edge-badge-hot-test.mjs +115 -0
  249. package/scripts/topo-edge-badge-hover-test.mjs +85 -0
  250. package/scripts/topo-edge-badge-lift-test.mjs +150 -0
  251. package/scripts/topo-edge-badge-ripple-test.mjs +111 -0
  252. package/scripts/topo-edge-badge-stroke-transition-test.mjs +118 -0
  253. package/scripts/topo-edge-badge-text-pin-test.mjs +121 -0
  254. package/scripts/topo-edge-badge-theme-ease-test.mjs +89 -0
  255. package/scripts/topo-edge-count-badge-test.mjs +86 -0
  256. package/scripts/topo-edge-endpoint-highlight-test.mjs +111 -0
  257. package/scripts/topo-edge-fadein-test.mjs +106 -0
  258. package/scripts/topo-edge-focus-test.mjs +113 -0
  259. package/scripts/topo-edge-hover-test.mjs +93 -0
  260. package/scripts/topo-edge-pill-hot-test.mjs +129 -0
  261. package/scripts/topo-edge-pill-test.mjs +105 -0
  262. package/scripts/topo-edge-smil-sync-test.mjs +148 -0
  263. package/scripts/topo-edge-smil-theme-ease-test.mjs +97 -0
  264. package/scripts/topo-edge-stroke-ease-test.mjs +100 -0
  265. package/scripts/topo-edge-stroke-transition-test.mjs +132 -0
  266. package/scripts/topo-edge-tooltip-test.mjs +70 -0
  267. package/scripts/topo-empty-state-breath-test.mjs +150 -0
  268. package/scripts/topo-empty-state-crossfade-test.mjs +130 -0
  269. package/scripts/topo-endpoint-ring-fade-test.mjs +132 -0
  270. package/scripts/topo-endpoint-ring-test.mjs +93 -0
  271. package/scripts/topo-endpoint-ring-thicken-test.mjs +112 -0
  272. package/scripts/topo-esc-clears-pin-test.mjs +98 -0
  273. package/scripts/topo-filter-pill-aliases-test.mjs +121 -0
  274. package/scripts/topo-filter-pill-body-click-test.mjs +112 -0
  275. package/scripts/topo-filter-pill-count-test.mjs +110 -0
  276. package/scripts/topo-filter-pill-mobile-test.mjs +90 -0
  277. package/scripts/topo-fit-key-test.mjs +106 -0
  278. package/scripts/topo-freshness-chip-test.mjs +74 -0
  279. package/scripts/topo-freshness-chip-transition-test.mjs +80 -0
  280. package/scripts/topo-fullscreen-active-test.mjs +115 -0
  281. package/scripts/topo-group-box-pinned-state-test.mjs +95 -0
  282. package/scripts/topo-group-count-test.mjs +68 -0
  283. package/scripts/topo-group-label-a11y-test.mjs +113 -0
  284. package/scripts/topo-group-label-count-inherit-test.mjs +99 -0
  285. package/scripts/topo-group-label-hover-test.mjs +119 -0
  286. package/scripts/topo-group-label-pin-spacing-test.mjs +136 -0
  287. package/scripts/topo-group-label-tint-test.mjs +99 -0
  288. package/scripts/topo-group-label-title-test.mjs +83 -0
  289. package/scripts/topo-group-pin-test.mjs +119 -0
  290. package/scripts/topo-group-pip-fadein-test.mjs +100 -0
  291. package/scripts/topo-group-pip-tabular-test.mjs +95 -0
  292. package/scripts/topo-group-status-pips-test.mjs +103 -0
  293. package/scripts/topo-groupbox-fadein-test.mjs +95 -0
  294. package/scripts/topo-groupbox-hover-lift-test.mjs +127 -0
  295. package/scripts/topo-groupbox-hubcore-ease-test.mjs +106 -0
  296. package/scripts/topo-groupbox-live-test.mjs +100 -0
  297. package/scripts/topo-groupbox-march-busyness-test.mjs +155 -0
  298. package/scripts/topo-groupbox-test.mjs +4 -2
  299. package/scripts/topo-halo-breath-ease-test.mjs +92 -0
  300. package/scripts/topo-halo-breath-stagger-test.mjs +89 -0
  301. package/scripts/topo-help-overlay-r109-test.mjs +67 -0
  302. package/scripts/topo-help-overlay-r118-test.mjs +69 -0
  303. package/scripts/topo-help-overlay-r123-test.mjs +69 -0
  304. package/scripts/topo-help-overlay-r134-test.mjs +74 -0
  305. package/scripts/topo-help-overlay-r137-test.mjs +81 -0
  306. package/scripts/topo-help-overlay-r141-test.mjs +86 -0
  307. package/scripts/topo-help-overlay-r153-test.mjs +85 -0
  308. package/scripts/topo-help-overlay-r59-test.mjs +67 -0
  309. package/scripts/topo-help-overlay-r65-test.mjs +64 -0
  310. package/scripts/topo-help-overlay-r70-test.mjs +63 -0
  311. package/scripts/topo-help-overlay-r78-test.mjs +59 -0
  312. package/scripts/topo-help-overlay-r81-test.mjs +58 -0
  313. package/scripts/topo-help-overlay-r87-test.mjs +64 -0
  314. package/scripts/topo-help-overlay-r91-test.mjs +65 -0
  315. package/scripts/topo-hot-tail-crossfade-test.mjs +117 -0
  316. package/scripts/topo-hub-a11y-test.mjs +112 -0
  317. package/scripts/topo-hub-busyness-test.mjs +100 -0
  318. package/scripts/topo-hub-center-crossfade-test.mjs +124 -0
  319. package/scripts/topo-hub-click-fit-test.mjs +137 -0
  320. package/scripts/topo-hub-digit-scale-test.mjs +129 -0
  321. package/scripts/topo-hub-fadein-test.mjs +88 -0
  322. package/scripts/topo-hub-hover-lift-test.mjs +101 -0
  323. package/scripts/topo-hub-hover-ring-test.mjs +82 -0
  324. package/scripts/topo-hub-pip-theme-ease-test.mjs +116 -0
  325. package/scripts/topo-hub-spoke-ease-test.mjs +120 -0
  326. package/scripts/topo-hub-title-test.mjs +93 -0
  327. package/scripts/topo-hub-working-count-test.mjs +99 -0
  328. package/scripts/topo-ingroup-edge-test.mjs +103 -0
  329. package/scripts/topo-label-card-theme-ease-test.mjs +85 -0
  330. package/scripts/topo-label-lift-test.mjs +119 -0
  331. package/scripts/topo-lastseen-tooltip-test.mjs +59 -0
  332. package/scripts/topo-layout-key-test.mjs +91 -0
  333. package/scripts/topo-layout-switch-crossfade-test.mjs +126 -0
  334. package/scripts/topo-layout-toggle-test.mjs +131 -0
  335. package/scripts/topo-legend-count-empty-test.mjs +126 -0
  336. package/scripts/topo-legend-count-test.mjs +88 -0
  337. package/scripts/topo-legend-count-tier-fill-test.mjs +121 -0
  338. package/scripts/topo-legend-hover-test.mjs +113 -0
  339. package/scripts/topo-legend-panel-header-test.mjs +83 -0
  340. package/scripts/topo-legend-pin-ring-fade-test.mjs +112 -0
  341. package/scripts/topo-legend-pin-test.mjs +128 -0
  342. package/scripts/topo-legend-row-hover-lift-test.mjs +109 -0
  343. package/scripts/topo-legend-row-pin-spacing-test.mjs +124 -0
  344. package/scripts/topo-legend-row-tint-test.mjs +95 -0
  345. package/scripts/topo-legend-row-title-test.mjs +102 -0
  346. package/scripts/topo-legend-swatch-grow-test.mjs +116 -0
  347. package/scripts/topo-minimap-a11y-test.mjs +101 -0
  348. package/scripts/topo-minimap-dot-transition-test.mjs +113 -0
  349. package/scripts/topo-minimap-test.mjs +68 -0
  350. package/scripts/topo-minimap-viewport-smooth-test.mjs +124 -0
  351. package/scripts/topo-mobile-chips-test.mjs +103 -0
  352. package/scripts/topo-node-a11y-test.mjs +107 -0
  353. package/scripts/topo-node-hover-lift-test.mjs +85 -0
  354. package/scripts/topo-node-label-card-elevation-test.mjs +157 -0
  355. package/scripts/topo-node-label-card-stroke-test.mjs +135 -0
  356. package/scripts/topo-node-stroke-transition-test.mjs +103 -0
  357. package/scripts/topo-node-text-fill-transition-test.mjs +119 -0
  358. package/scripts/topo-node-title-peers-test.mjs +107 -0
  359. package/scripts/topo-node-title-test.mjs +101 -0
  360. package/scripts/topo-nodesize-active-hover-test.mjs +109 -0
  361. package/scripts/topo-nodesize-crossfade-test.mjs +141 -0
  362. package/scripts/topo-online-chip-nav-test.mjs +143 -0
  363. package/scripts/topo-orbit-busyness-test.mjs +96 -0
  364. package/scripts/topo-orbit-opacity-bucket-test.mjs +124 -0
  365. package/scripts/topo-overlap-test.mjs +32 -5
  366. package/scripts/topo-pan-cursor-test.mjs +62 -0
  367. package/scripts/topo-panel-elevation-test.mjs +76 -0
  368. package/scripts/topo-panel-fadein-test.mjs +102 -0
  369. package/scripts/topo-panel-hot-tail-fade-test.mjs +132 -0
  370. package/scripts/topo-panel-hover-elevation-test.mjs +118 -0
  371. package/scripts/topo-panel-theme-ease-test.mjs +85 -0
  372. package/scripts/topo-particle-stagger-test.mjs +82 -0
  373. package/scripts/topo-pin-intersection-color-ease-test.mjs +111 -0
  374. package/scripts/topo-pin-intersection-empty-test.mjs +129 -0
  375. package/scripts/topo-pin-intersection-tabular-test.mjs +96 -0
  376. package/scripts/topo-pin-intersection-test.mjs +121 -0
  377. package/scripts/topo-pin-intersection-warning-crossfade-test.mjs +107 -0
  378. package/scripts/topo-pin-mirror-transition-test.mjs +101 -0
  379. package/scripts/topo-pin-persistence-test.mjs +105 -0
  380. package/scripts/topo-ping-pulse-ease-test.mjs +96 -0
  381. package/scripts/topo-popover-meta-test.mjs +78 -0
  382. package/scripts/topo-prepublish-guard-test.mjs +95 -0
  383. package/scripts/topo-pressure-bar-test.mjs +69 -0
  384. package/scripts/topo-pressure-hover-test.mjs +123 -0
  385. package/scripts/topo-pressure-pin-test.mjs +119 -0
  386. package/scripts/topo-pressure-seg-self-hover-test.mjs +126 -0
  387. package/scripts/topo-pressure-seg-tooltip-test.mjs +98 -0
  388. package/scripts/topo-pressure-seg-transition-test.mjs +107 -0
  389. package/scripts/topo-pulse-dot-crossfade-test.mjs +122 -0
  390. package/scripts/topo-pulse-rate-test.mjs +71 -0
  391. package/scripts/topo-recent-panel-count-freshness-test.mjs +109 -0
  392. package/scripts/topo-recent-panel-count-test.mjs +72 -0
  393. package/scripts/topo-recent-panel-hot-header-test.mjs +132 -0
  394. package/scripts/topo-recent-panel-more-crossfade-test.mjs +124 -0
  395. package/scripts/topo-recent-panel-more-cyan-hover-test.mjs +151 -0
  396. package/scripts/topo-recent-panel-more-nav-test.mjs +127 -0
  397. package/scripts/topo-recent-panel-more-test.mjs +106 -0
  398. package/scripts/topo-recent-row-count-fill-test.mjs +129 -0
  399. package/scripts/topo-recent-row-fadein-test.mjs +107 -0
  400. package/scripts/topo-recent-row-freshness-test.mjs +102 -0
  401. package/scripts/topo-recent-row-hot-test.mjs +110 -0
  402. package/scripts/topo-recent-row-hover-lift-test.mjs +128 -0
  403. package/scripts/topo-recent-row-hover-test.mjs +122 -0
  404. package/scripts/topo-recent-row-pin-spacing-test.mjs +137 -0
  405. package/scripts/topo-recent-row-pin-test.mjs +126 -0
  406. package/scripts/topo-recent-row-tint-test.mjs +91 -0
  407. package/scripts/topo-recent-row-title-test.mjs +112 -0
  408. package/scripts/topo-recent-row-ts-alpha-test.mjs +100 -0
  409. package/scripts/topo-recent-row-ts-test.mjs +95 -0
  410. package/scripts/topo-recent-row-typography-test.mjs +119 -0
  411. package/scripts/topo-recent-signal-empty-hint-test.mjs +73 -0
  412. package/scripts/topo-recent-signal-empty-test.mjs +63 -0
  413. package/scripts/topo-reduced-motion-test.mjs +77 -0
  414. package/scripts/topo-reset-spin-test.mjs +120 -0
  415. package/scripts/topo-runtime-badge-grow-test.mjs +114 -0
  416. package/scripts/topo-spoke-busyness-test.mjs +110 -0
  417. package/scripts/topo-spoke-tint-test.mjs +96 -0
  418. package/scripts/topo-status-chip-hover-test.mjs +101 -0
  419. package/scripts/topo-status-chip-tooltip-test.mjs +95 -0
  420. package/scripts/topo-statusbar-chips-self-hover-test.mjs +177 -0
  421. package/scripts/topo-svg-focus-test.mjs +112 -0
  422. package/scripts/topo-sweep-busyness-test.mjs +94 -0
  423. package/scripts/topo-tabular-nums-sweep-test.mjs +93 -0
  424. package/scripts/topo-tier-ring-fadein-test.mjs +107 -0
  425. package/scripts/topo-tier-ring-occupancy-test.mjs +87 -0
  426. package/scripts/topo-tier-ring-test.mjs +69 -0
  427. package/scripts/topo-tier-ring-tint-test.mjs +110 -0
  428. package/scripts/topo-tier-stagger-test.mjs +89 -0
  429. package/scripts/topo-tz-ghost-test.mjs +69 -0
  430. package/scripts/topo-vendor-chip-hover-test.mjs +111 -0
  431. package/scripts/topo-vendor-chip-self-hover-test.mjs +130 -0
  432. package/scripts/topo-vendor-chip-tabular-test.mjs +89 -0
  433. package/scripts/topo-vendor-letter-tooltip-test.mjs +92 -0
  434. package/scripts/topo-vendor-pill-test.mjs +125 -0
  435. package/scripts/topo-vendor-pin-test.mjs +125 -0
  436. package/scripts/topo-view-smooth-test.mjs +131 -0
  437. package/scripts/topo-wheel-zoom-test.mjs +79 -0
  438. package/scripts/topo-working-chip-pin-test.mjs +154 -0
  439. package/scripts/topo-working-halo-breath-test.mjs +86 -0
  440. package/scripts/topo-wrapper-flow-arrow-theme-test.mjs +97 -0
  441. package/scripts/topo-zoom-keys-test.mjs +89 -0
  442. package/.next/static/chunks/0-7iowzu4.798.js +0 -1
  443. package/.next/static/chunks/02t5jr4shh.hy.js +0 -1
  444. package/.next/static/chunks/09nd.t_hd.y6t.css +0 -2
  445. package/.next/static/chunks/0_qfg5s5uzs7..js +0 -7
  446. package/.next/static/chunks/0elalb9n_.~di.js +0 -1
  447. package/.next/static/chunks/0fqy_0wj_1xa7.js +0 -7
  448. package/.next/static/chunks/0j_q__o8p6g83.js +0 -1
  449. package/.next/static/chunks/0jl6_w50zh4l5.js +0 -1
  450. package/.next/static/chunks/0jzqhqbydbrm~.js +0 -1
  451. package/.next/static/chunks/0lvk7f2_5y8b3.js +0 -1
  452. package/.next/static/chunks/0r4q73.-1bkyl.js +0 -1
  453. package/.next/static/chunks/0r_c8eccg3z2o.js +0 -1
  454. package/.next/static/chunks/10oi7l-tycgl9.js +0 -1
  455. package/.next/static/chunks/11uk1izuv3~0t.js +0 -1
  456. package/.next/static/chunks/12maqvd_4t3sh.js +0 -1
  457. /package/.next/static/{iC9JNLo0IdNSaeynEneGT → -JO9tjmCkno3inrj-XBxj}/_buildManifest.js +0 -0
  458. /package/.next/static/{iC9JNLo0IdNSaeynEneGT → -JO9tjmCkno3inrj-XBxj}/_clientMiddlewareManifest.js +0 -0
  459. /package/.next/static/{iC9JNLo0IdNSaeynEneGT → -JO9tjmCkno3inrj-XBxj}/_ssgManifest.js +0 -0
@@ -0,0 +1,86 @@
1
+ /* Round 112 verification: working-status nodes get a halo opacity
2
+ * breath (SMIL <animate>) at 3s cycle. Idle + offline halos stay
3
+ * flat. reducedMotion suppresses the breath entirely.
4
+ *
5
+ * Fleet: 1 working + 1 idle + 1 offline.
6
+ * wkr → data-node-halo-breath="on", child <animate> present
7
+ * idl → data-node-halo-breath="off", no <animate> child
8
+ * off → data-node-halo-breath="off", no <animate> child
9
+ * Then probe reducedMotion=reduce → wkr also reads "off", no
10
+ * <animate>.
11
+ */
12
+ import { chromium } from 'playwright';
13
+ import { readFileSync } from 'node:fs';
14
+
15
+ const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
16
+ const browser = await chromium.launch({ headless: true });
17
+ const fresh = new Date(Date.now() - 60 * 1000).toISOString();
18
+ const stale10 = new Date(Date.now() - 10 * 60 * 1000).toISOString();
19
+
20
+ const probe = async (reducedMotion) => {
21
+ const ctx = await browser.newContext({
22
+ viewport: { width: 1400, height: 1500 },
23
+ reducedMotion: reducedMotion ? 'reduce' : 'no-preference',
24
+ });
25
+ await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
26
+ await ctx.addInitScript(() => {
27
+ try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
28
+ });
29
+ await ctx.route('**/api/hub/status*', async (route) => {
30
+ const r = await route.fetch();
31
+ const b = await r.json();
32
+ const nid = (b.sessions || [])[0]?.network_id || 'default';
33
+ const mk = (alias, status, ts) => ({
34
+ alias, status, model: 'claude-opus-4', runtime: 'cli-claude-code',
35
+ network_id: nid, project_dir: null,
36
+ created_at: ts, updated_at: ts, last_seen_at: ts,
37
+ });
38
+ await route.fulfill({ response: r, json: { ...b, sessions: [
39
+ mk('wkr', 'working', fresh),
40
+ mk('idl', 'idle', fresh),
41
+ mk('off', 'offline', stale10),
42
+ ] } });
43
+ });
44
+ await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
45
+ await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
46
+ const page = await ctx.newPage();
47
+ await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
48
+ await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
49
+ await page.waitForTimeout(400);
50
+ const data = await page.evaluate(() => {
51
+ const out = {};
52
+ for (const a of ['wkr', 'idl', 'off']) {
53
+ const g = document.querySelector(`g[data-node="${a}"]`);
54
+ const halo = g?.querySelector('[data-node-halo-breath]');
55
+ out[a] = {
56
+ attr: halo?.getAttribute('data-node-halo-breath') || '',
57
+ anim: !!halo?.querySelector('animate'),
58
+ dur: halo?.querySelector('animate')?.getAttribute('dur') || null,
59
+ };
60
+ }
61
+ return out;
62
+ });
63
+ await ctx.close();
64
+ return data;
65
+ };
66
+
67
+ const normal = await probe(false);
68
+ const reduced = await probe(true);
69
+ await browser.close();
70
+
71
+ const results = {
72
+ normal_wkrAttrOn: normal.wkr.attr === 'on',
73
+ normal_wkrHasAnimate: normal.wkr.anim === true,
74
+ normal_wkrDur3s: normal.wkr.dur === '3s',
75
+ normal_idlAttrOff: normal.idl.attr === 'off',
76
+ normal_idlNoAnimate: normal.idl.anim === false,
77
+ normal_offAttrOff: normal.off.attr === 'off',
78
+ normal_offNoAnimate: normal.off.anim === false,
79
+ reduced_wkrAttrOff: reduced.wkr.attr === 'off',
80
+ reduced_wkrNoAnimate: reduced.wkr.anim === false,
81
+ };
82
+ const ok = Object.values(results).every(Boolean);
83
+ console.log(`${ok ? '✅' : '❌'} working halo breath:`, JSON.stringify(results),
84
+ `\n normal=`, normal,
85
+ `\n reduced=`, reduced);
86
+ process.exit(ok ? 0 : 1);
@@ -0,0 +1,97 @@
1
+ /* Round 254 verification: three remaining theme-toggle snaps closed:
2
+ *
3
+ * 1. Top-level TopoGraph wrapper <div> — biggest theme-driven
4
+ * surface (whole canvas bg + border). Probe via [data-topo-svg]
5
+ * ancestor chain; the wrapper has ref={containerRef} but no
6
+ * data attr, so we look up via a known descendant.
7
+ * 2. Legend flow-arrow swatch <path> — added data-legend-flow-arrow.
8
+ * 3. Minimap container (only mounts when view is zoomed/panned) —
9
+ * programmatically zoom in to render minimap, then probe.
10
+ *
11
+ * Test scope:
12
+ * - Container has background-color + border-color transition 200ms
13
+ * - Flow-arrow swatch has stroke 200ms in style.transition
14
+ * - Minimap container has background-color + border-color + color
15
+ * transition 200ms
16
+ */
17
+ import { chromium } from 'playwright';
18
+ import { readFileSync } from 'node:fs';
19
+
20
+ const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
21
+ const browser = await chromium.launch({ headless: true });
22
+ const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
23
+ await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
24
+ await ctx.addInitScript(() => {
25
+ try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
26
+ });
27
+ const fresh = new Date(Date.now() - 60 * 1000).toISOString();
28
+ await ctx.route('**/api/hub/status*', async (route) => {
29
+ const r = await route.fetch();
30
+ const b = await r.json();
31
+ const nid = (b.sessions || [])[0]?.network_id || 'default';
32
+ const mk = (alias) => ({
33
+ alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
34
+ network_id: nid, project_dir: null,
35
+ created_at: fresh, updated_at: fresh, last_seen_at: fresh,
36
+ });
37
+ await route.fulfill({ response: r, json: { ...b, sessions: [
38
+ mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
39
+ ] } });
40
+ });
41
+ await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: [] } }));
42
+ await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
43
+
44
+ const page = await ctx.newPage();
45
+ await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
46
+ await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
47
+ await page.waitForSelector('[data-legend-flow-arrow]', { timeout: 10000 });
48
+ await page.waitForTimeout(300);
49
+
50
+ // Probe wrapper + flow arrow first
51
+ const baseline = await page.evaluate(() => {
52
+ const flowArrow = document.querySelector('[data-legend-flow-arrow]');
53
+ // Wrapper: the TopoGraph component's outer div sits as the
54
+ // grandparent of <svg> with the topo-panel rect inside. Use a
55
+ // robust climb from a known SVG element.
56
+ const wrapper = document.querySelector('[data-topo-wrapper]');
57
+ return {
58
+ wrapper: wrapper ? { transition: wrapper.style.transition } : null,
59
+ flowArrow: flowArrow ? { transition: flowArrow.style.transition } : null,
60
+ };
61
+ });
62
+
63
+ // Trigger minimap render — programmatically pan/zoom view via the
64
+ // reset button toggle or just dispatch a wheel event. Simpler:
65
+ // click the zoom-in button several times.
66
+ for (let i = 0; i < 3; i++) {
67
+ await page.locator('[data-topo-chrome-zoom-in]').click();
68
+ await page.waitForTimeout(120);
69
+ }
70
+ await page.waitForSelector('[data-topo-minimap]', { timeout: 5000 });
71
+ await page.waitForTimeout(300);
72
+ const minimap = await page.evaluate(() => {
73
+ const mm = document.querySelector('[data-topo-minimap]');
74
+ return mm ? { transition: mm.style.transition } : null;
75
+ });
76
+ await browser.close();
77
+
78
+ const has = (s, prop) => new RegExp(`${prop}\\s+(?:200ms|0\\.2s)`).test(s || '');
79
+
80
+ const results = {
81
+ wrapper_present: baseline.wrapper !== null,
82
+ wrapper_has_bg_color_200: has(baseline.wrapper?.transition, 'background-color'),
83
+ wrapper_has_border_color_200: has(baseline.wrapper?.transition, 'border-color'),
84
+
85
+ flow_arrow_present: baseline.flowArrow !== null,
86
+ flow_arrow_has_stroke_200: has(baseline.flowArrow?.transition, 'stroke'),
87
+
88
+ minimap_present: minimap !== null,
89
+ minimap_has_bg_color_200: has(minimap?.transition, 'background-color'),
90
+ minimap_has_border_color_200: has(minimap?.transition, 'border-color'),
91
+ minimap_has_color_200: has(minimap?.transition, '(?<!background-|border-)color'),
92
+ };
93
+ const ok = Object.values(results).every(Boolean);
94
+ console.log(`${ok ? '✅' : '❌'} wrapper + flow-arrow + minimap theme ease:`, JSON.stringify(results),
95
+ '\n baseline:', baseline,
96
+ '\n minimap:', minimap);
97
+ process.exit(ok ? 0 : 1);
@@ -0,0 +1,89 @@
1
+ /* Round 22 verification: keyboard zoom shortcuts (+/=, -, 0) + matching
2
+ * title hints on the existing buttons. The handler must NOT fire while
3
+ * an input/textarea has focus. */
4
+ import { chromium } from 'playwright';
5
+ import { readFileSync } from 'node:fs';
6
+
7
+ const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
8
+ const browser = await chromium.launch({ headless: true });
9
+ const ctx = await browser.newContext({ viewport: { width: 1280, height: 1600 } });
10
+ await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
11
+ await ctx.addInitScript(() => {
12
+ try {
13
+ localStorage.setItem('anet-theme', 'cyber');
14
+ localStorage.setItem('anet-topo-layout', 'grid');
15
+ sessionStorage.setItem('anet_v3_auth', '1');
16
+ } catch {}
17
+ });
18
+ const fresh = new Date(Date.now() - 60 * 1000).toISOString();
19
+ await ctx.route('**/api/hub/status*', async (route) => {
20
+ const r = await route.fetch();
21
+ const b = await r.json();
22
+ const nid = (b.sessions || [])[0]?.network_id || 'default';
23
+ const sessions = ['a', 'b'].map(a => ({
24
+ alias: a, status: 'idle', network_id: nid, project_dir: null,
25
+ created_at: fresh, updated_at: fresh, last_seen_at: fresh,
26
+ }));
27
+ await route.fulfill({ response: r, json: { ...b, sessions } });
28
+ });
29
+ await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
30
+ const page = await ctx.newPage();
31
+ await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
32
+ await page.waitForSelector('svg[viewBox="0 0 1000 680"]', { timeout: 30000 });
33
+ await page.waitForTimeout(400);
34
+
35
+ const readZoomPct = () => page.$eval(
36
+ 'button[title^="Zoom in"]',
37
+ btn => +btn.parentElement.querySelector('span[title*="zoom level"]').textContent.replace('%', ''),
38
+ );
39
+
40
+ const start = await readZoomPct();
41
+ await page.keyboard.press('=');
42
+ await page.waitForTimeout(50);
43
+ const afterPlus = await readZoomPct();
44
+
45
+ await page.keyboard.press('-');
46
+ await page.waitForTimeout(50);
47
+ const afterMinus = await readZoomPct();
48
+
49
+ // Zoom in twice via + then reset via 0
50
+ await page.keyboard.press('=');
51
+ await page.keyboard.press('=');
52
+ await page.waitForTimeout(50);
53
+ const beforeReset = await readZoomPct();
54
+ await page.keyboard.press('0');
55
+ await page.waitForTimeout(50);
56
+ const afterReset = await readZoomPct();
57
+
58
+ // Titles present
59
+ const titles = await page.evaluate(() => ({
60
+ out: document.querySelector('button[aria-label="Zoom out"]').getAttribute('title'),
61
+ in: document.querySelector('button[aria-label="Zoom in"]').getAttribute('title'),
62
+ reset: document.querySelector('button[aria-label="Reset view"]').getAttribute('title'),
63
+ }));
64
+
65
+ // Input-focus suppression: open Cmd+K, type "-", expect topology NOT to zoom
66
+ await page.keyboard.press('Meta+k');
67
+ await page.waitForTimeout(200);
68
+ const palette = await page.locator('input[placeholder*="Search"], input[type="search"], [role="dialog"] input').first();
69
+ await palette.focus().catch(() => {});
70
+ const zoomBeforeTyping = await readZoomPct();
71
+ await page.keyboard.press('-');
72
+ await page.waitForTimeout(80);
73
+ const zoomAfterTyping = await readZoomPct();
74
+ await page.keyboard.press('Escape');
75
+
76
+ await browser.close();
77
+ const results = {
78
+ startsAt100: start === 100,
79
+ plusZoomsIn: afterPlus === 120,
80
+ minusReverts: afterMinus === 100,
81
+ zeroResets: beforeReset > 100 && afterReset === 100,
82
+ titleOut: /Zoom out.*[(−\-]/.test(titles.out || ''),
83
+ titleIn: /Zoom in.*\(\+/.test(titles.in || ''),
84
+ titleReset: /\b0\b/.test(titles.reset || ''),
85
+ noZoomWhileTyping: zoomAfterTyping === zoomBeforeTyping,
86
+ };
87
+ const ok = Object.values(results).every(Boolean);
88
+ console.log(`${ok ? '✅' : '❌'} zoom keys:`, JSON.stringify(results), `titles=`, titles);
89
+ process.exit(ok ? 0 : 1);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98025,e=>{"use strict";e.s(["SESSION_STATUS_CHIP_CLASS",0,{working:"bg-green-500/10 text-green-300 border-green-500/20",idle:"bg-blue-500/10 text-blue-300 border-blue-500/20",blocked:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",error:"bg-red-500/10 text-red-300 border-red-500/20",offline:"bg-gray-500/10 text-gray-500 border-gray-500/20"},"SESSION_STATUS_TEXT_CLASS",0,{working:"text-green-400",idle:"text-blue-400",blocked:"text-yellow-400",error:"text-red-400",offline:"text-gray-500"},"STATUS_BAR_CLASS",0,{created:"bg-gray-500",delivered:"bg-blue-500",acked:"bg-cyan-500",running:"bg-green-500",replied:"bg-purple-500",closed:"bg-gray-600",failed:"bg-red-500",cancelled:"bg-yellow-500",expired:"bg-orange-500"},"STATUS_CHIP_CLASS",0,{created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"},"STATUS_DOT_HEX",0,{created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"},"TASK_STATUSES",0,["created","delivered","acked","running","replied","closed","failed","cancelled","expired"]])},3479,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},46228,e=>{"use strict";var t=e.i(22381);let a=[180,200,220,270,300,330,30,90];function s(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;let s=a[t%a.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:n=""}){let i=s(e),l=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${n}`,style:{width:a,height:a,fontSize:l,backgroundColor:i.bg,borderColor:i.ring,color:i.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,s,"aliasInitial",0,r])},76161,e=>{"use strict";var t=e.i(22381),a=e.i(23910),s=e.i(56839);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:a}){let s={width:a,height:a},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:a,sub:l,cta:d,compact:o=!1}){let c=r[e],x=a??c.title,h=l??c.sub;return(0,t.jsxs)("div",{className:`text-center ${o?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:o?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${o?"text-sm":"text-base"}`,children:x}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${o?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),d&&(0,t.jsx)("div",{className:"mt-4",children:d.href?(0,t.jsxs)(s.default,{href:d.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[d.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:d.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[d.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function d({cmd:e}){let[s,r]=(0,a.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":s?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:s?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:a=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):a>0?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${a.toLocaleString()} task${1===a?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(d,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},57602,e=>{"use strict";var t=e.i(22381),a=e.i(23910),s=e.i(56058),r=e.i(11449),n=e.i(3479),i=e.i(46228);let l={created:"text-gray-400",delivered:"text-blue-400",running:"text-green-400",replied:"text-purple-400",failed:"text-red-400",closed:"text-gray-500"};function d({taskId:e,onClose:s}){let[r,o]=(0,a.useState)(null),[c,x]=(0,a.useState)([]),[h,m]=(0,a.useState)(!0);(0,a.useEffect)(()=>{(async()=>{try{let[t,a]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(e)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(e)}&limit=50`)]),s=await t.json(),r=await a.json();s.tasks?.[0]&&o(s.tasks[0]),x(r.events||[])}catch{}finally{m(!1)}})()},[e]);let g=r?[{key:"created",label:"Created",time:r.created_at,color:"bg-gray-400"},{key:"delivered",label:"Delivered",time:r.delivered_at,color:"bg-blue-400"},{key:"started",label:"Started",time:r.started_at,color:"bg-green-400"},{key:"completed",label:"Completed",time:r.completed_at,color:"bg-purple-400"}].map(e=>({...e,done:!!e.time})):[],p=g.findIndex(e=>!e.done),u=r&&"completed"!==r.status&&"failed"!==r.status&&"expired"!==r.status&&"cancelled"!==r.status,y=r?.started_at&&r?.completed_at?Math.round((new Date(r.completed_at).getTime()-new Date(r.started_at).getTime())/1e3):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 z-40 anet-fade-in",onClick:s}),(0,t.jsxs)("div",{className:"fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:"Task Detail"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:[e.slice(0,16),"..."]})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),h?(0,t.jsx)("div",{className:"flex justify-center py-16",children:(0,t.jsx)("div",{className:"w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):r?(0,t.jsxs)("div",{className:"px-5 py-5 space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:`text-lg font-bold ${l[r.status]||"text-gray-400"}`,children:r.status}),"normal"!==r.priority&&(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"high"===r.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:r.priority}),null!==y&&(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["⏱ ",y<60?`${y}s`:`${Math.floor(y/60)}m ${y%60}s`]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm flex-wrap",children:[r.from_name&&(0,t.jsx)(i.AliasAvatar,{alias:r.from_name,size:18}),(0,t.jsx)("span",{className:"text-gray-200 font-medium",children:r.from_name||"--"}),(0,t.jsx)("span",{className:"text-gray-600",children:"→"}),r.to_name&&(0,t.jsx)(i.AliasAvatar,{alias:r.to_name,size:18}),(0,t.jsx)("span",{className:"text-gray-200 font-medium",children:r.to_name||"--"})]}),(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Timeline"}),null!==y&&(0,t.jsxs)("div",{className:"text-[10px] text-gray-600",children:[y<60?`${y}s`:`${Math.floor(y/60)}m ${y%60}s`," runtime"]})]}),(0,t.jsx)("div",{className:"space-y-3",children:g.map((e,a)=>{let s=u&&a===p,r=!!g[a+1]?.done;return(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center pt-0.5",children:[(0,t.jsx)("span",{className:`relative w-3 h-3 rounded-full shrink-0 ${e.done?e.color:"bg-gray-700"}`,children:s&&(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute -inset-1 rounded-full border border-current opacity-60 anet-current-step-pulse",style:{borderColor:"currentColor"}})}),a<g.length-1&&(0,t.jsx)("div",{className:`w-0.5 h-5 mt-1 ${e.done&&r?"bg-gray-500":e.done?"bg-gradient-to-b from-gray-500 to-gray-800":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:`text-xs font-medium flex items-center gap-2 ${e.done?"text-gray-200":s?"text-cyan-300":"text-gray-600"}`,children:[(0,t.jsx)("span",{children:e.label}),s&&(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-wide text-cyan-400",children:"in progress"})]}),(0,t.jsx)("div",{className:"text-[10px] text-gray-500",title:e.time||void 0,children:e.time?(0,n.timeAgo)(e.time):s?"—":"Pending"})]})]},e.key)})})]}),(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap",children:r.content||"--"})]}),r.result&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,t.jsx)("div",{className:"text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:r.result})]}),c.length>0&&(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500 uppercase mb-2",children:["Events (",c.length,")"]}),(0,t.jsx)("div",{className:"space-y-1.5 max-h-40 overflow-y-auto",children:c.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[11px]",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"running"===e.to_status?"bg-green-400":"replied"===e.to_status?"bg-purple-400":"failed"===e.to_status?"bg-red-400":"bg-blue-400"}`}),(0,t.jsx)("span",{className:"text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"text-gray-600",children:[e.from_status,"→",e.to_status]}),(0,t.jsx)("span",{className:"text-gray-600 ml-auto",children:(0,n.timeAgo)(e.created_at)})]},e.id))})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-600 space-y-1",children:[(0,t.jsxs)("div",{children:["Task ID: ",r.task_id]}),r.expires_at&&(0,t.jsxs)("div",{children:["Expires: ",r.expires_at]})]})]}):(0,t.jsx)("div",{className:"text-center py-16 text-gray-500",children:"Task not found"})]})]})}var o=e.i(76161),c=e.i(98025);function x(e){let t=c.STATUS_CHIP_CLASS[e]||"bg-gray-500/10 text-gray-400 border-gray-500/20";return`text-xs px-2 py-0.5 rounded-md border ${t}`}function h(e){return"high"===e?"text-red-400":"low"===e?"text-gray-600":"text-gray-400"}function m(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function g(){let e,l,g,p,u=(0,s.useSearchParams)(),{networkId:y}=(0,r.useNetworkId)(),[b,j]=(0,a.useState)([]),[f,v]=(0,a.useState)(0),[N,w]=(0,a.useState)(!0),[k,_]=(0,a.useState)(""),[S,C]=(0,a.useState)(new Set),[T,$]=(0,a.useState)(u.get("status")||""),[A,L]=(0,a.useState)(""),[M,E]=(0,a.useState)(""),[D,I]=(0,a.useState)(null),U=e=>{C(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},B=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams;y&&e.set("network_id",y),T&&e.set("status",T),A&&e.set("from_name",A),M&&e.set("to_name",M),e.set("limit","100");let t=await fetch(`/api/hub/tasks?${e.toString()}`);if(401===t.status)return void window.location.assign("/login");let a=await t.json();j(a.tasks||[]),v(a.count??(a.tasks?.length||0)),_("")}catch(e){_(e instanceof Error?e.message:"fetch failed")}finally{w(!1)}},[T,A,M,y]);return(0,a.useEffect)(()=>{w(!0),B();let e=setInterval(B,5e3);return()=>clearInterval(e)},[B]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Tasks"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums",title:b.length<f?`Showing ${b.length} of ${f} tasks`:void 0,children:b.length<f?`${b.length} / ${f}`:f})]}),b.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"anet-tabstrip-wrap mb-4",children:(0,t.jsx)("div",{className:"anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin",children:(e={},b.forEach(t=>{e[t.status]=(e[t.status]||0)+1}),["",...c.TASK_STATUSES].map(a=>{let s=""===a?b.length:e[a]||0,r=T===a;return(0,t.jsxs)("button",{onClick:()=>$(a),disabled:0===s&&""!==a&&!r,className:`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap disabled:opacity-30 disabled:cursor-not-allowed ${r?`${c.STATUS_CHIP_CLASS[a]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40"}`,children:[a&&(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:c.STATUS_DOT_HEX[a]||"#6b7280"}}),(0,t.jsx)("span",{children:a||"All"}),(0,t.jsx)("span",{className:`text-[10px] tabular-nums ${r?"opacity-80":"text-gray-600"}`,children:s})]},a)}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"From"}),(0,t.jsx)("input",{type:"text",value:A,onChange:e=>L(e.target.value),placeholder:"any node",className:"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"To"}),(0,t.jsx)("input",{type:"text",value:M,onChange:e=>E(e.target.value),placeholder:"any node",className:"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"})]}),(T||A||M)&&(0,t.jsx)("button",{type:"button",onClick:()=>{$(""),L(""),E("")},className:"rounded-lg border border-gray-700 px-2.5 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:border-gray-600",children:"Clear filters"})]})]}),b.length>0&&!T&&(l={},b.forEach(e=>{l[e.status]=(l[e.status]||0)+1}),g=b.length||1,(p=c.TASK_STATUSES.map(e=>({key:e,color:c.STATUS_BAR_CLASS[e]})).filter(e=>l[e.key])).length?(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:p.map(e=>(0,t.jsx)("div",{className:e.color,style:{width:`${l[e.key]/g*100}%`},title:`${e.key}: ${l[e.key]}`},e.key))})}):null),k&&(0,t.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:k}),N?(0,t.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40"},e))}):0===b.length?(0,t.jsx)(o.EmptyState,{variant:"tasks",sub:T||A||M?"No tasks match the current filters. Try clearing them.":"Tasks will appear here when agents send them via CommHub."}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,t.jsx)("div",{className:"col-span-1",children:"Status"}),(0,t.jsx)("div",{className:"col-span-2",children:"From"}),(0,t.jsx)("div",{className:"col-span-2",children:"To"}),(0,t.jsx)("div",{className:"col-span-4",children:"Content"}),(0,t.jsx)("div",{className:"col-span-1",children:"Priority"}),(0,t.jsx)("div",{className:"col-span-2",children:"Time"})]}),b.map(e=>{let a=S.has(e.task_id);return(0,t.jsxs)("div",{className:`anet-task-row group bg-[#111128] border rounded-lg px-4 py-3 transition-all duration-200 cursor-pointer ${a?"border-[#3a3a5a] shadow-lg shadow-black/20":"border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]"}`,onClick:()=>U(e.task_id),role:"button",tabIndex:0,"aria-expanded":a,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),U(e.task_id))},children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:x(e.status),children:e.status})}),(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-1.5 min-w-0",title:e.from_name,children:[e.from_name&&(0,t.jsx)(i.AliasAvatar,{alias:e.from_name,size:18}),(0,t.jsx)("span",{className:"truncate text-sm text-gray-200",children:e.from_name||"--"})]}),(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-1.5 min-w-0",title:e.to_name,children:[e.to_name&&(0,t.jsx)(i.AliasAvatar,{alias:e.to_name,size:18}),(0,t.jsx)("span",{className:"truncate text-sm text-gray-200",children:e.to_name||"--"})]}),(0,t.jsx)("div",{className:"col-span-4 text-xs text-gray-400 truncate",title:e.content,children:(0,n.previewContent)(e.content)}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs ${h(e.priority)}`,children:e.priority||"normal"})}),(0,t.jsxs)("div",{className:"col-span-2 text-xs text-gray-500 flex items-center justify-between gap-2",title:e.created_at,children:[(0,t.jsx)("span",{className:"truncate",children:m(e.created_at)}),(0,t.jsx)("svg",{"aria-hidden":!0,className:`shrink-0 text-gray-600 group-hover:text-gray-400 transition-transform duration-200 ${a?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,t.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:x(e.status),children:e.status}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs ${h(e.priority)}`,children:e.priority||"normal"}),(0,t.jsx)("svg",{"aria-hidden":!0,className:`text-gray-600 transition-transform duration-200 ${a?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-gray-300 min-w-0",children:[e.from_name&&(0,t.jsx)(i.AliasAvatar,{alias:e.from_name,size:16}),(0,t.jsx)("span",{className:"truncate max-w-[40%]",children:e.from_name||"--"}),(0,t.jsx)("span",{className:"text-gray-600",children:"→"}),e.to_name&&(0,t.jsx)(i.AliasAvatar,{alias:e.to_name,size:16}),(0,t.jsx)("span",{className:"truncate max-w-[40%]",children:e.to_name||"--"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-400 line-clamp-1",title:e.content,children:(0,n.previewContent)(e.content)}),(0,t.jsx)("div",{className:"text-xs text-gray-600",children:m(e.created_at)})]}),(0,t.jsx)("div",{className:`grid transition-all duration-300 ease-out ${a?"grid-rows-[1fr] opacity-100 mt-3":"grid-rows-[0fr] opacity-0"}`,"aria-hidden":!a,children:(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a] space-y-3",children:[e.content&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Content"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:e.content})]}),e.result&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Result"}),(0,t.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto",children:e.result})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[["Created",e.created_at],["Delivered",e.delivered_at],["Started",e.started_at],["Completed",e.completed_at]].map(([e,a])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-gray-600",children:[e,": "]}),(0,t.jsx)("span",{className:"text-gray-400",children:a?m(a):"--"})]},e))}),e.expires_at&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Expires: "}),(0,t.jsx)("span",{className:"text-orange-400",children:e.expires_at})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 truncate",title:e.task_id,children:["ID: ",e.task_id]}),(0,t.jsxs)("div",{className:"flex gap-2 shrink-0",children:[("failed"===e.status||"expired"===e.status)&&(0,t.jsx)("button",{onClick:async t=>{t.stopPropagation(),await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e.to_name,task:e.content,priority:e.priority})}),B()},className:"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10",children:"Retry"}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),I(e.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})})})]},e.task_id)})]}),D&&(0,t.jsx)(d,{taskId:D,onClose:()=>I(null)})]})}e.s(["default",0,function(){return(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading tasks..."}),children:(0,t.jsx)(g,{})})}],57602)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},46228,e=>{"use strict";var t=e.i(22381);let a=[180,200,220,270,300,330,30,90];function s(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;let s=a[t%a.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:i=""}){let n=s(e),l=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${i}`,style:{width:a,height:a,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,s,"aliasInitial",0,r])},76161,e=>{"use strict";var t=e.i(22381),a=e.i(23910),s=e.i(56839);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function i({variant:e,size:a}){let s={width:a,height:a},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function n({variant:e="generic",title:a,sub:l,cta:o,compact:c=!1}){let d=r[e],x=a??d.title,h=l??d.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(i,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:x}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(s.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[s,r]=(0,a.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":s?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:s?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,n,"NodesEmptyState",0,function({hint:e,taskHistoryCount:a=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):a>0?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${a.toLocaleString()} task${1===a?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(o,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},46860,e=>{"use strict";var t=e.i(22381),a=e.i(23910),s=e.i(56839),r=e.i(3479),i=e.i(11449),n=e.i(76161),l=e.i(46228);let o={register:"bg-green-500/10 text-green-300 border-green-500/20",login:"bg-blue-500/10 text-blue-300 border-blue-500/20",login_failed:"bg-red-500/10 text-red-300 border-red-500/20",create_network:"bg-purple-500/10 text-purple-300 border-purple-500/20",send_task:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"},c={register:"#4ade80",login:"#60a5fa",login_failed:"#ef4444",create_network:"#a78bfa",send_task:"#22d3ee"};e.s(["default",0,function(){let e,d,{networkId:x}=(0,i.useNetworkId)(),[h,m]=(0,a.useState)([]),[g,y]=(0,a.useState)(!0),[u,p]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),f=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams({limit:"100"});x&&e.set("network_id",x),j&&e.set("action",j);let t=sessionStorage.getItem("anet_v3_auth");if(t)try{let a=JSON.parse(t);a.token&&e.set("token",a.token)}catch{}let a=await fetch(`/api/hub/audit-log?${e.toString()}`);if(401===a.status)return void window.location.assign("/login");let s=await a.json();m(s.logs||[]),p(s.error&&!s.logs?.length?s.error:"")}catch(e){p(e instanceof Error?e.message:"fetch failed")}finally{y(!1)}},[j,x]);return(0,a.useEffect)(()=>{y(!0),f();let e=setInterval(f,1e4);return()=>clearInterval(e)},[f]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Audit Log"})}),(0,t.jsx)("div",{className:"mb-6 flex flex-wrap items-center gap-1 anet-tabstrip-wrap overflow-x-auto sm:overflow-x-visible",children:(e={},h.forEach(t=>{e[t.action]=(e[t.action]||0)+1}),[{key:"",label:"All"},{key:"login",label:"login",dot:c.login},{key:"login_failed",label:"login_failed",dot:c.login_failed},{key:"register",label:"register",dot:c.register},{key:"create_network",label:"create_network",dot:c.create_network},{key:"send_task",label:"send_task",dot:c.send_task}].map(a=>{let s=""===a.key?h.length:e[a.key]||0,r=j===a.key;return(0,t.jsxs)("button",{type:"button",onClick:()=>b(a.key),disabled:0===s&&""!==a.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed shrink-0 whitespace-nowrap ${r?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[a.dot&&(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:a.dot}}),(0,t.jsx)("span",{children:a.label}),(0,t.jsx)("span",{className:`text-[10px] tabular-nums ${r?"text-cyan-400":"text-gray-600"}`,children:s})]},a.key||"all")}))}),u&&(d=/unauthor|401|forbidden|403|admin/i.test(u),(0,t.jsxs)("div",{className:"anet-warn-chip bg-yellow-900/20 border border-yellow-800/40 text-yellow-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-start gap-3",role:"alert",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-base leading-none",children:"⚠"}),(0,t.jsx)("div",{className:"flex-1",children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"需要 admin 权限查看审计日志"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"审计日志记录用户注册 / 登录 / 网络变更等事件,需要 admin 角色。"}),(0,t.jsx)(s.default,{href:"/login",className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"切到 admin 账号 →"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"加载失败"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"请检查 CommHub 是否在线,或稍后重试。"}),(0,t.jsx)("button",{onClick:()=>window.location.reload(),className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"重新加载 →"})]})})]})),g?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-14 bg-gray-800/20 rounded-lg"},e))}):0===h.length?(0,t.jsx)(n.EmptyState,{variant:"logs"}):(0,t.jsx)("div",{className:"space-y-2",children:h.map(e=>{let a=e.username||e.user_id;return(0,t.jsxs)("div",{className:"relative bg-[#111128] border border-[#2a2a4a] rounded-lg pl-4 pr-4 py-3 hover:border-[#3a3a5a] transition-colors overflow-hidden",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute left-0 top-0 bottom-0 w-0.5",style:{backgroundColor:c[e.action]||"transparent"}}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${o[e.action]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.action}),a&&(0,t.jsx)(l.AliasAvatar,{alias:a,size:16}),(0,t.jsx)("span",{className:"text-sm text-gray-200 font-medium",children:a}),e.target_type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsxs)("span",{className:"text-xs text-gray-400",children:[e.target_type,e.target_id?`:${e.target_id.slice(0,12)}`:""]})]}),(0,t.jsx)("span",{className:"text-xs text-gray-600 ml-auto",children:(0,r.timeAgo)(e.created_at)})]}),e.detail&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.detail}),e.ip&&"unknown"!==e.ip&&(0,t.jsxs)("div",{className:"text-[10px] text-gray-700",children:["IP: ",e.ip]})]},e.id)})})]})}])}]);