@sleep2agi/agent-network-dashboard 0.4.5-preview.5 → 0.4.5-preview.7

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 (168) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +6 -6
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +2 -2
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/admin.html +2 -2
  24. package/.next/server/app/admin.rsc +2 -2
  25. package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
  26. package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  27. package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
  28. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
  31. package/.next/server/app/index.html +2 -2
  32. package/.next/server/app/index.rsc +2 -2
  33. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  36. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  37. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  38. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/login.html +2 -2
  40. package/.next/server/app/login.rsc +2 -2
  41. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  42. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  43. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  44. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  45. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  46. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  47. package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/logs.html +2 -2
  49. package/.next/server/app/logs.rsc +2 -2
  50. package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
  51. package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
  52. package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
  53. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
  55. package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
  56. package/.next/server/app/messages/page.js.nft.json +1 -1
  57. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/messages.html +2 -2
  59. package/.next/server/app/messages.rsc +3 -3
  60. package/.next/server/app/messages.segments/_full.segment.rsc +3 -3
  61. package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
  62. package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
  63. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  64. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
  65. package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
  66. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/node.html +2 -2
  68. package/.next/server/app/node.rsc +2 -2
  69. package/.next/server/app/node.segments/_full.segment.rsc +2 -2
  70. package/.next/server/app/node.segments/_head.segment.rsc +1 -1
  71. package/.next/server/app/node.segments/_index.segment.rsc +2 -2
  72. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  73. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
  74. package/.next/server/app/node.segments/node.segment.rsc +1 -1
  75. package/.next/server/app/nodes/page.js.nft.json +1 -1
  76. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/nodes.html +2 -2
  78. package/.next/server/app/nodes.rsc +3 -3
  79. package/.next/server/app/nodes.segments/_full.segment.rsc +3 -3
  80. package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
  81. package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
  82. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  83. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
  84. package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
  85. package/.next/server/app/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/server-logs.html +2 -2
  88. package/.next/server/app/server-logs.rsc +2 -2
  89. package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
  90. package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
  91. package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
  92. package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
  93. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
  94. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
  95. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/settings/networks.html +2 -2
  97. package/.next/server/app/settings/networks.rsc +2 -2
  98. package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
  99. package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
  100. package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
  101. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  102. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
  103. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
  104. package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
  105. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  107. package/.next/server/app/settings/tokens.html +2 -2
  108. package/.next/server/app/settings/tokens.rsc +2 -2
  109. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
  110. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
  111. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
  112. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  113. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
  114. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
  115. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
  116. package/.next/server/app/settings.html +2 -2
  117. package/.next/server/app/settings.rsc +2 -2
  118. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  119. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  120. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  121. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  122. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  123. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  124. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  125. package/.next/server/app/tasks/page.js.nft.json +1 -1
  126. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  127. package/.next/server/app/tasks.html +2 -2
  128. package/.next/server/app/tasks.rsc +3 -3
  129. package/.next/server/app/tasks.segments/_full.segment.rsc +3 -3
  130. package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
  131. package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
  132. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  133. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +2 -2
  134. package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
  135. package/.next/server/chunks/ssr/[root-of-the-server]__06pu~4t._.js +3 -0
  136. package/.next/server/chunks/ssr/[root-of-the-server]__06pu~4t._.js.map +1 -0
  137. package/.next/server/chunks/ssr/{_0d-fuox._.js → _0uw5cjt._.js} +2 -2
  138. package/.next/server/chunks/ssr/_0uw5cjt._.js.map +1 -0
  139. package/.next/server/chunks/ssr/{app_0ff~kjj._.js → app_0k8xbx~._.js} +3 -3
  140. package/.next/server/chunks/ssr/app_0k8xbx~._.js.map +1 -0
  141. package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js +1 -1
  142. package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js.map +1 -1
  143. package/.next/server/middleware-build-manifest.js +3 -3
  144. package/.next/server/pages/404.html +2 -2
  145. package/.next/server/pages/500.html +1 -1
  146. package/.next/server/server-reference-manifest.js +1 -1
  147. package/.next/server/server-reference-manifest.json +1 -1
  148. package/.next/static/chunks/0v~9m62eciynd.js +1 -0
  149. package/.next/static/chunks/0xh3wr5rwvifr.css +2 -0
  150. package/.next/static/chunks/{0svy-tmgb8ajq.js → 0z.pzy8zpa~js.js} +2 -2
  151. package/.next/static/chunks/11v5tec4s1168.js +1 -0
  152. package/.next/trace +2 -2
  153. package/.next/trace-build +1 -1
  154. package/app/components/AliasAvatar.tsx +51 -0
  155. package/app/messages/page.tsx +2 -30
  156. package/app/nodes/page.tsx +21 -23
  157. package/app/tasks/page.tsx +44 -24
  158. package/package.json +1 -1
  159. package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js +0 -3
  160. package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js.map +0 -1
  161. package/.next/server/chunks/ssr/_0d-fuox._.js.map +0 -1
  162. package/.next/server/chunks/ssr/app_0ff~kjj._.js.map +0 -1
  163. package/.next/static/chunks/0khpyxpdrp~ty.js +0 -1
  164. package/.next/static/chunks/0m328uz90rp81.js +0 -1
  165. package/.next/static/chunks/168ijr_r0ku-q.css +0 -2
  166. /package/.next/static/{HWCPpUEba8WqttkPXD5x8 → kyIvxswGu-u-KGQRAaXfV}/_buildManifest.js +0 -0
  167. /package/.next/static/{HWCPpUEba8WqttkPXD5x8 → kyIvxswGu-u-KGQRAaXfV}/_clientMiddlewareManifest.js +0 -0
  168. /package/.next/static/{HWCPpUEba8WqttkPXD5x8 → kyIvxswGu-u-KGQRAaXfV}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"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`}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(22016);let a={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 r({variant:e,size:s}){let a={width:s,height:s},n={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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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:l,sub:i,cta:o,compact:c=!1}){let x=a[e],d=l??x.title,m=i??x.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)(r,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),m&&(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:m}),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:"→"})]})})]})}e.s(["EmptyState",0,n,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(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.`}):(0,t.jsx)(n,{variant:"nodes",cta:{label:"Run anet quickstart",href:"https://anet.sh"}})}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:l}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,l),a,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${i}`,l),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},82756,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150),n=e.i(95356);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function i(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function o(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}let c=[180,200,220,270,300,330,30,90];function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[m,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(""),[g,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)("timeline"),f=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),v=(0,s.useMemo)(()=>{let t=h.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!m||e.type===m)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>i(e.created_at)-i(t.created_at))},[m,e,h]),w=(0,s.useMemo)(()=>{let e=new Map;return v.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,i(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[v]);return(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:"Messages"}),(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",children:e.length}),v.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=v.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"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`}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(22016);let a={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 r({variant:e,size:s}){let a={width:s,height:s},n={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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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",...a,children:(0,t.jsxs)("g",{...n,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:l,sub:i,cta:o,compact:c=!1}){let x=a[e],d=l??x.title,h=i??x.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)(r,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),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:"→"})]})})]})}e.s(["EmptyState",0,n,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(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.`}):(0,t.jsx)(n,{variant:"nodes",cta:{label:"Run anet quickstart",href:"https://anet.sh"}})}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:l}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,l),a,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${i}`,l),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(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 ${r}`,style:{width:a,height:a,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},82756,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150),n=e.i(95356),l=e.i(69874);let i={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function o(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function c(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[h,m]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[g,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)("timeline"),f=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),v=(0,s.useMemo)(()=>{let t=u.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!h||e.type===h)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>o(e.created_at)-o(t.created_at))},[h,e,u]),w=(0,s.useMemo)(()=>{let e=new Map;return v.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,o(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[v]);return(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:"Messages"}),(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",children:e.length}),v.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=v.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
2
2
 
3
3
  ${e.content||"--"}
4
4
 
5
5
  ---`).join("\n\n"),t=new Blob([`# Messages Export
6
6
 
7
- ${e}`],{type:"text/markdown"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download=`messages-${new Date().toISOString().slice(0,10)}.md`,a.click(),URL.revokeObjectURL(s)},className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors",children:"Export MD"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-3",children:[(0,t.jsx)("input",{type:"text",value:h,onChange:e=>p(e.target.value),placeholder:"Search from/to/content or use from:alias",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-full sm:w-72"}),(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All types"}),(0,t.jsx)("option",{value:"task",children:"task"}),(0,t.jsx)("option",{value:"message",children:"message"}),(0,t.jsx)("option",{value:"broadcast",children:"broadcast"}),(0,t.jsx)("option",{value:"reply",children:"reply"})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-0.5",children:["timeline","grouped"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>j(e),className:`rounded-md px-2.5 py-1.5 text-xs transition-colors ${b===e?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"timeline"===e?"Timeline":"Grouped"},e))}),(0,t.jsx)("button",{onClick:()=>y(!g),className:`text-xs px-3 py-2 rounded-lg border transition-colors ${g?"bg-yellow-500/10 text-yellow-300 border-yellow-500/20":"text-gray-500 border-gray-700/50 hover:text-gray-300"}`,children:g?"Debug ON":"Debug"})]}),f.length>0&&(0,t.jsxs)("div",{className:"mb-6 flex flex-wrap gap-2",children:[f.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>p(`from:${e}`),className:`rounded-full border px-3 py-1 text-xs transition-colors ${h===`from:${e}`?"border-cyan-500/30 bg-cyan-500/10 text-cyan-300":"border-[#2a2a4a] bg-[#111128] text-gray-400 hover:text-gray-200"}`,children:["from:",e]},e)),h.startsWith("from:")&&(0,t.jsx)("button",{type:"button",onClick:()=>p(""),className:"rounded-full border border-gray-700 px-3 py-1 text-xs text-gray-500 hover:text-gray-200",children:"Clear"})]}),d?(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 rounded-2xl bg-gray-800/20"},e))}):0===v.length?(0,t.jsx)(n.EmptyState,{variant:"messages"}):"grouped"===b?(0,t.jsx)("div",{className:"space-y-4",children:w.map((e,s)=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-4 py-2.5 border-b border-[#2a2a4a] flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-cyan-300 font-medium",children:e.participants[0]}),(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"↔"}),(0,t.jsx)("span",{className:"text-sm text-green-300 font-medium",children:e.participants[1]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-gray-600",children:[e.messages.length," messages"]})]}),(0,t.jsx)("div",{className:"px-4 py-2 space-y-2 max-h-64 overflow-y-auto",children:e.messages.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-xs py-1",children:[(0,t.jsx)("span",{className:`shrink-0 font-medium ${s.from_alias===e.participants[0]?"text-cyan-400":"text-green-400"}`,children:s.from_alias}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:s.content?.slice(0,120)||"--"}),(0,t.jsx)("span",{className:"text-[9px] text-gray-600 shrink-0",children:(0,r.timeAgo)(s.created_at||"")})]},s.id))})]},s))}):(0,t.jsx)("div",{className:"space-y-1",children:v.map((e,s)=>{var a;let n=v[s-1],d=!!n&&i(e.created_at)-i(n.created_at)>3e5,m=o(e),u=!!n&&!d&&o(n)===m&&(n.from_alias||"")===(e.from_alias||"")&&(n.to_alias||"")===(e.to_alias||""),p=e.from_alias||"?",y=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let s=c[t%c.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}(p);return(0,t.jsxs)("div",{children:[d&&(0,t.jsxs)("div",{className:"my-4 flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"}),(0,t.jsx)("div",{className:"text-[11px] text-gray-600",children:(a=e.created_at)?new Date(a.replace(" ","T")+"Z").toLocaleString():"Time gap"}),(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"})]}),"broadcast"===m?(0,t.jsx)("div",{className:u?"mt-1":"mt-3",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-purple-500/20 bg-purple-500/10 px-4 py-3 shadow-sm w-full",children:[(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${l[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:"text-sm font-medium text-purple-200",children:p}),e.to_alias&&(0,t.jsxs)("span",{className:"text-xs text-purple-200/80",children:["to ",e.to_alias]}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed text-gray-200",children:x(e.content,h)})]})}):(0,t.jsxs)("div",{className:`${u?"mt-1":"mt-3"} flex gap-2 ${"outgoing"===m?"flex-row-reverse":"flex-row"}`,children:[(0,t.jsx)("div",{className:"w-8 shrink-0 pt-1",children:!u&&(0,t.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border text-[11px] font-semibold",style:{backgroundColor:y.bg,borderColor:y.ring,color:y.text},title:p,children:p?(p.trim().match(/[\p{L}\p{N}]/u)?.[0]||p.trim()[0]||"·").toUpperCase():"·"})}),(0,t.jsxs)("div",{className:`min-w-0 max-w-3xl rounded-2xl border px-4 py-3 shadow-sm ${"outgoing"===m?"border-green-500/20 bg-green-500/10":"border-blue-500/20 bg-blue-500/10"}`,children:[!u&&(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${l[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:`text-sm font-medium ${"outgoing"===m?"text-green-300":"text-blue-300"}`,children:p}),(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"text-sm text-gray-300",children:e.to_alias||"--"}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed text-gray-200",children:x(e.content,h)}),u&&(0,t.jsx)("div",{className:"mt-1 text-[10px] text-gray-600 text-right",children:e.created_at?(0,r.timeAgo)(e.created_at):""}),g&&(0,t.jsxs)("div",{className:"mt-3 border-t border-white/10 pt-3 text-xs text-gray-500 space-y-1",children:[(0,t.jsxs)("div",{children:["ID: ",e.id]}),e.task_id&&(0,t.jsxs)("div",{children:["Task ID: ",e.task_id]}),(0,t.jsxs)("div",{children:["Created: ",e.created_at]})]})]})]})]},e.id)})})]})}])}]);
7
+ ${e}`],{type:"text/markdown"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download=`messages-${new Date().toISOString().slice(0,10)}.md`,a.click(),URL.revokeObjectURL(s)},className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors",children:"Export MD"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-3",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>p(e.target.value),placeholder:"Search from/to/content or use from:alias",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-full sm:w-72"}),(0,t.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All types"}),(0,t.jsx)("option",{value:"task",children:"task"}),(0,t.jsx)("option",{value:"message",children:"message"}),(0,t.jsx)("option",{value:"broadcast",children:"broadcast"}),(0,t.jsx)("option",{value:"reply",children:"reply"})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-0.5",children:["timeline","grouped"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>j(e),className:`rounded-md px-2.5 py-1.5 text-xs transition-colors ${b===e?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"timeline"===e?"Timeline":"Grouped"},e))}),(0,t.jsx)("button",{onClick:()=>y(!g),className:`text-xs px-3 py-2 rounded-lg border transition-colors ${g?"bg-yellow-500/10 text-yellow-300 border-yellow-500/20":"text-gray-500 border-gray-700/50 hover:text-gray-300"}`,children:g?"Debug ON":"Debug"})]}),f.length>0&&(0,t.jsxs)("div",{className:"mb-6 flex flex-wrap gap-2",children:[f.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>p(`from:${e}`),className:`rounded-full border px-3 py-1 text-xs transition-colors ${u===`from:${e}`?"border-cyan-500/30 bg-cyan-500/10 text-cyan-300":"border-[#2a2a4a] bg-[#111128] text-gray-400 hover:text-gray-200"}`,children:["from:",e]},e)),u.startsWith("from:")&&(0,t.jsx)("button",{type:"button",onClick:()=>p(""),className:"rounded-full border border-gray-700 px-3 py-1 text-xs text-gray-500 hover:text-gray-200",children:"Clear"})]}),d?(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 rounded-2xl bg-gray-800/20"},e))}):0===v.length?(0,t.jsx)(n.EmptyState,{variant:"messages"}):"grouped"===b?(0,t.jsx)("div",{className:"space-y-4",children:w.map((e,s)=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-4 py-2.5 border-b border-[#2a2a4a] flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-cyan-300 font-medium",children:e.participants[0]}),(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"↔"}),(0,t.jsx)("span",{className:"text-sm text-green-300 font-medium",children:e.participants[1]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-gray-600",children:[e.messages.length," messages"]})]}),(0,t.jsx)("div",{className:"px-4 py-2 space-y-2 max-h-64 overflow-y-auto",children:e.messages.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-xs py-1",children:[(0,t.jsx)("span",{className:`shrink-0 font-medium ${s.from_alias===e.participants[0]?"text-cyan-400":"text-green-400"}`,children:s.from_alias}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:s.content?.slice(0,120)||"--"}),(0,t.jsx)("span",{className:"text-[9px] text-gray-600 shrink-0",children:(0,r.timeAgo)(s.created_at||"")})]},s.id))})]},s))}):(0,t.jsx)("div",{className:"space-y-1",children:v.map((e,s)=>{var a;let n=v[s-1],d=!!n&&o(e.created_at)-o(n.created_at)>3e5,h=c(e),m=!!n&&!d&&c(n)===h&&(n.from_alias||"")===(e.from_alias||"")&&(n.to_alias||"")===(e.to_alias||""),p=e.from_alias||"?";return(0,t.jsxs)("div",{children:[d&&(0,t.jsxs)("div",{className:"my-4 flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"}),(0,t.jsx)("div",{className:"text-[11px] text-gray-600",children:(a=e.created_at)?new Date(a.replace(" ","T")+"Z").toLocaleString():"Time gap"}),(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"})]}),"broadcast"===h?(0,t.jsx)("div",{className:m?"mt-1":"mt-3",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-purple-500/20 bg-purple-500/10 px-4 py-3 shadow-sm w-full",children:[(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${i[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:"text-sm font-medium text-purple-200",children:p}),e.to_alias&&(0,t.jsxs)("span",{className:"text-xs text-purple-200/80",children:["to ",e.to_alias]}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed text-gray-200",children:x(e.content,u)})]})}):(0,t.jsxs)("div",{className:`${m?"mt-1":"mt-3"} flex gap-2 ${"outgoing"===h?"flex-row-reverse":"flex-row"}`,children:[(0,t.jsx)("div",{className:"w-8 shrink-0 pt-1",children:!m&&(0,t.jsx)(l.AliasAvatar,{alias:p,size:32})}),(0,t.jsxs)("div",{className:`min-w-0 max-w-3xl rounded-2xl border px-4 py-3 shadow-sm ${"outgoing"===h?"border-green-500/20 bg-green-500/10":"border-blue-500/20 bg-blue-500/10"}`,children:[!m&&(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${i[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:`text-sm font-medium ${"outgoing"===h?"text-green-300":"text-blue-300"}`,children:p}),(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"text-sm text-gray-300",children:e.to_alias||"--"}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed text-gray-200",children:x(e.content,u)}),m&&(0,t.jsx)("div",{className:"mt-1 text-[10px] text-gray-600 text-right",children:e.created_at?(0,r.timeAgo)(e.created_at):""}),g&&(0,t.jsxs)("div",{className:"mt-3 border-t border-white/10 pt-3 text-xs text-gray-500 space-y-1",children:[(0,t.jsxs)("div",{children:["ID: ",e.id]}),e.task_id&&(0,t.jsxs)("div",{children:["Task ID: ",e.task_id]}),(0,t.jsxs)("div",{children:["Created: ",e.created_at]})]})]})]})]},e.id)})})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"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`}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(22016);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 a({variant:e,size:s}){let r={width:s,height:s},n={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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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",...r,children:(0,t.jsxs)("g",{...n,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:i,sub:l,cta:c,compact:o=!1}){let d=r[e],x=i??d.title,h=l??d.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)(a,{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}),c&&(0,t.jsx)("div",{className:"mt-4",children:c.href?(0,t.jsxs)(s.default,{href:c.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[c.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:c.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[c.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}e.s(["EmptyState",0,n,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(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.`}):(0,t.jsx)(n,{variant:"nodes",cta:{label:"Run anet quickstart",href:"https://anet.sh"}})}])},16015,(e,t,s)=>{},98547,(e,t,s)=>{var r=e.i(47167);e.r(16015);var a=e.r(71645),n=a&&"object"==typeof a&&"default"in a?a:{default:a},i=void 0!==r.default&&r.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,a=t.optimizeForSpeed,n=void 0===a?i:a;o(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",o("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var c="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=c?c.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){o("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),o(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(o(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(o(l(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return i||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var s="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];o(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];o(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},s.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&o(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return s?a.insertBefore(r,s):a.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function o(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},x={};function h(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return x[r]||(x[r]="jsx-"+d(e+"-"+s)),x[r]}function u(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return x[s]||(x[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),x[s]}var m=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,a=t.optimizeForSpeed,n=void 0!==a&&a;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),r&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,a=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var n=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=n,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var a=h(r,s);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return u(a,e)}):[u(a,t)]}}return{styleId:h(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=a.createContext(null);function g(){return new m}function y(){return a.useContext(p)}p.displayName="StyleSheetContext";var f=n.default.useInsertionEffect||n.default.useLayoutEffect,b="u">typeof window?g():void 0;function j(e){var t=b||y();return t&&("u"<typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}j.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},s.StyleRegistry=function(e){var t=e.registry,s=e.children,r=a.useContext(p),i=a.useState(function(){return r||t||g()})[0];return n.default.createElement(p.Provider,{value:i},s)},s.createStyleRegistry=g,s.style=j,s.useStyleRegistry=y},21373,(e,t,s)=>{t.exports=e.r(98547).style},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:r=28,className:a=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let r=s[t%s.length];return{bg:`hsl(${r} 55% 22%)`,ring:`hsl(${r} 60% 45%)`,text:`hsl(${r} 80% 78%)`}}(e),i=Math.max(9,Math.round(.42*r));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${a}`,style:{width:r,height:r,fontSize:i,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},96527,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(58963),n=e.i(21373),i=e.i(18150);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 c({taskId:e,onClose:r}){let[a,o]=(0,s.useState)(null),[d,x]=(0,s.useState)([]),[h,u]=(0,s.useState)(!0);(0,s.useEffect)(()=>{(async()=>{try{let[t,s]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(e)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(e)}&limit=50`)]),r=await t.json(),a=await s.json();r.tasks?.[0]&&o(r.tasks[0]),x(a.events||[])}catch{}finally{u(!1)}})()},[e]);let m=a?[{label:"Created",time:a.created_at,color:"bg-gray-400"},{label:"Delivered",time:a.delivered_at,color:"bg-blue-400"},{label:"Started",time:a.started_at,color:"bg-green-400"},{label:"Completed",time:a.completed_at,color:"bg-purple-400"}]:[],p=a?.started_at&&a?.completed_at?Math.round((new Date(a.completed_at).getTime()-new Date(a.started_at).getTime())/1e3):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:r,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 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:"jsx-c3e56cbc81656d9 flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:"Task Detail"}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500 mt-0.5",children:[e.slice(0,16),"..."]})]}),(0,t.jsx)("button",{onClick:r,className:"jsx-c3e56cbc81656d9 text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-c3e56cbc81656d9 w-5 h-5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-c3e56cbc81656d9"})})})]}),h?(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 flex justify-center py-16",children:(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):a?(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 px-5 py-5 space-y-5",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-lg font-bold ${l[a.status]||"text-gray-400"}`,children:a.status}),"normal"!==a.priority&&(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-xs px-2 py-0.5 rounded border ${"high"===a.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:a.priority}),null!==p&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500",children:["⏱ ",p<60?`${p}s`:`${Math.floor(p/60)}m ${p%60}s`]})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-blue-400 font-medium",children:a.from_name||"--"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-cyan-400 font-medium",children:a.to_name||"--"})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-3",children:"Timeline"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-3",children:m.map((e,s)=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex flex-col items-center",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-3 h-3 rounded-full ${e.time?e.color:"bg-gray-700"}`}),s<m.length-1&&(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-0.5 h-4 mt-1 ${e.time&&m[s+1]?.time?"bg-gray-600":"bg-gray-800"}`})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex-1",children:[(0,t.jsx)("div",{className:`jsx-c3e56cbc81656d9 text-xs font-medium ${e.time?"text-gray-300":"text-gray-600"}`,children:e.label}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:e.time||"Pending"})]})]},e.label))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap",children:a.content||"--"})]}),a.result&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:a.result})]}),d.length>0&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:["Events (",d.length,")"]}),(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-1.5 max-h-40 overflow-y-auto",children:d.map(e=>(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-[11px]",children:[(0,t.jsx)("span",{className:`jsx-c3e56cbc81656d9 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:"jsx-c3e56cbc81656d9 text-gray-400",children:e.event_type}),e.from_status&&(0,t.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:[e.from_status,"→",e.to_status]}),(0,t.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600 ml-auto",children:(0,i.timeAgo)(e.created_at)})]},e.id))})]}),(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-600 space-y-1",children:[(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Task ID: ",a.task_id]}),a.expires_at&&(0,t.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Expires: ",a.expires_at]})]})]}):(0,t.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-center py-16 text-gray-500",children:"Task not found"})]}),(0,t.jsx)(n.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}var o=e.i(95356),d=e.i(69874);let x=["","created","delivered","acked","running","replied","closed","failed","cancelled","expired"],h={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"},u={created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"};function m(e){let t=h[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 p(e){return"high"===e?"text-red-400":"low"===e?"text-gray-600":"text-gray-400"}function g(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 y(){let e,n,i,l=(0,r.useSearchParams)(),{networkId:y}=(0,a.useNetworkId)(),[f,b]=(0,s.useState)([]),[j,v]=(0,s.useState)(0),[_,w]=(0,s.useState)(!0),[N,k]=(0,s.useState)(""),[S,C]=(0,s.useState)(new Set),[R,$]=(0,s.useState)(l.get("status")||""),[z,T]=(0,s.useState)(""),[F,A]=(0,s.useState)(""),[M,E]=(0,s.useState)(null),I=e=>{C(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},D=(0,s.useCallback)(async()=>{try{let e=new URLSearchParams;y&&e.set("network_id",y),R&&e.set("status",R),z&&e.set("from_name",z),F&&e.set("to_name",F),e.set("limit","100");let t=await fetch(`/api/hub/tasks?${e.toString()}`);if(401===t.status)return void window.location.assign("/login");let s=await t.json();b(s.tasks||[]),v(s.count??(s.tasks?.length||0)),k("")}catch(e){k(e instanceof Error?e.message:"fetch failed")}finally{w(!1)}},[R,z,F,y]);return(0,s.useEffect)(()=>{w(!0),D();let e=setInterval(D,5e3);return()=>clearInterval(e)},[D]),(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",children:j})]}),(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:["",...x.filter(Boolean)].map(e=>(0,t.jsxs)("button",{onClick:()=>$(e),className:`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap ${R===e?`${h[e]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40"}`,children:[e&&(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:u[e]||"#6b7280"}}),(0,t.jsx)("span",{children:e||"All"})]},e))})}),(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:z,onChange:e=>T(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:F,onChange:e=>A(e.target.value),placeholder:"any node",className:"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"})]}),(R||z||F)&&(0,t.jsx)("button",{type:"button",onClick:()=>{$(""),T(""),A("")},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"})]}),f.length>0&&!R&&(e={},f.forEach(t=>{e[t.status]=(e[t.status]||0)+1}),n=f.length||1,(i=[{key:"running",color:"bg-green-500",text:"text-green-400"},{key:"delivered",color:"bg-blue-500",text:"text-blue-400"},{key:"replied",color:"bg-purple-500",text:"text-purple-400"},{key:"failed",color:"bg-red-500",text:"text-red-400"},{key:"expired",color:"bg-orange-500",text:"text-orange-400"}].filter(t=>e[t.key])).length?(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:i.map(s=>(0,t.jsx)("div",{className:s.color,style:{width:`${e[s.key]/n*100}%`}},s.key))}),(0,t.jsx)("div",{className:"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500",children:i.map(s=>(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${s.color} mr-1`}),e[s.key]," ",s.key]},s.key))})]}):null),N&&(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: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===f.length?(0,t.jsx)(o.EmptyState,{variant:"tasks",sub:R||z||F?"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"})]}),f.map(e=>{let s=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 ${s?"border-[#3a3a5a] shadow-lg shadow-black/20":"border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]"}`,onClick:()=>I(e.task_id),role:"button",tabIndex:0,"aria-expanded":s,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),I(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:m(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)(d.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)(d.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:e.content||"--"}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs ${p(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:g(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 ${s?"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:m(e.status),children:e.status}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs ${p(e.priority)}`,children:e.priority||"normal"}),(0,t.jsx)("svg",{"aria-hidden":!0,className:`text-gray-600 transition-transform duration-200 ${s?"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)(d.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)(d.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",children:e.content||"--"}),(0,t.jsx)("div",{className:"text-xs text-gray-600",children:g(e.created_at)})]}),(0,t.jsx)("div",{className:`grid transition-all duration-300 ease-out ${s?"grid-rows-[1fr] opacity-100 mt-3":"grid-rows-[0fr] opacity-0"}`,"aria-hidden":!s,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,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-gray-600",children:[e,": "]}),(0,t.jsx)("span",{className:"text-gray-400",children:s?g(s):"--"})]},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})}),D()},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(),E(e.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})})})]},e.task_id)})]}),M&&(0,t.jsx)(c,{taskId:M,onClose:()=>E(null)})]})}e.s(["default",0,function(){return(0,t.jsx)(s.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)(y,{})})}],96527)}]);
package/.next/trace CHANGED
@@ -1,2 +1,2 @@
1
- [{"name":"generate-buildid","duration":313,"timestamp":187650083140,"id":4,"parentId":1,"tags":{},"startTime":1778559135908,"traceId":"f1f2b1018da01eef"},{"name":"load-custom-routes","duration":493,"timestamp":187650083601,"id":5,"parentId":1,"tags":{},"startTime":1778559135908,"traceId":"f1f2b1018da01eef"},{"name":"create-dist-dir","duration":1553,"timestamp":187650084141,"id":6,"parentId":1,"tags":{},"startTime":1778559135909,"traceId":"f1f2b1018da01eef"},{"name":"clean","duration":572,"timestamp":187650086560,"id":7,"parentId":1,"tags":{},"startTime":1778559135911,"traceId":"f1f2b1018da01eef"},{"name":"discover-routes","duration":25748,"timestamp":187650187825,"id":8,"parentId":1,"tags":{},"startTime":1778559136013,"traceId":"f1f2b1018da01eef"},{"name":"create-root-mapping","duration":112,"timestamp":187650213640,"id":9,"parentId":1,"tags":{},"startTime":1778559136038,"traceId":"f1f2b1018da01eef"},{"name":"generate-route-types","duration":20056,"timestamp":187650217820,"id":10,"parentId":1,"tags":{},"startTime":1778559136043,"traceId":"f1f2b1018da01eef"},{"name":"public-dir-conflict-check","duration":105,"timestamp":187650238073,"id":11,"parentId":1,"tags":{},"startTime":1778559136063,"traceId":"f1f2b1018da01eef"},{"name":"generate-routes-manifest","duration":4898,"timestamp":187650238318,"id":12,"parentId":1,"tags":{},"startTime":1778559136063,"traceId":"f1f2b1018da01eef"},{"name":"run-turbopack","duration":7545548,"timestamp":187650248050,"id":14,"parentId":1,"tags":{},"startTime":1778559136073,"traceId":"f1f2b1018da01eef"},{"name":"turbopack-build-events","duration":87,"timestamp":187650534122,"id":15,"parentId":1,"tags":{},"startTime":1778559136359,"traceId":"f1f2b1018da01eef"},{"name":"run-typescript","duration":7464896,"timestamp":187657801873,"id":16,"parentId":1,"tags":{},"startTime":1778559143627,"traceId":"f1f2b1018da01eef"},{"name":"generate-required-server-files","duration":2273,"timestamp":187665267623,"id":18,"parentId":1,"tags":{},"startTime":1778559151092,"traceId":"f1f2b1018da01eef"},{"name":"check-static-error-page","duration":12127,"timestamp":187665339402,"id":20,"parentId":19,"tags":{},"startTime":1778559151164,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":276498,"timestamp":187665354029,"id":62,"parentId":22,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":288915,"timestamp":187665341727,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778559151166,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":367994,"timestamp":187665354305,"id":64,"parentId":26,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":377259,"timestamp":187665345114,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778559151170,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":377173,"timestamp":187665354348,"id":65,"parentId":27,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":386301,"timestamp":187665345283,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778559151170,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":381910,"timestamp":187665354392,"id":66,"parentId":28,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":390923,"timestamp":187665345433,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778559151170,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":388484,"timestamp":187665354435,"id":67,"parentId":29,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":397408,"timestamp":187665345576,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778559151170,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":395683,"timestamp":187665354470,"id":68,"parentId":30,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":404415,"timestamp":187665345821,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":398013,"timestamp":187665353604,"id":61,"parentId":21,"tags":{},"startTime":1778559151178,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":411132,"timestamp":187665340537,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778559151165,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":402481,"timestamp":187665354139,"id":63,"parentId":25,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":411791,"timestamp":187665344882,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778559151170,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":416491,"timestamp":187665354506,"id":69,"parentId":32,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":424885,"timestamp":187665346227,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":419246,"timestamp":187665354672,"id":71,"parentId":34,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":427440,"timestamp":187665346533,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":423347,"timestamp":187665354695,"id":72,"parentId":35,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":431406,"timestamp":187665346700,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":423611,"timestamp":187665354774,"id":74,"parentId":37,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":431151,"timestamp":187665347269,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":427579,"timestamp":187665354785,"id":75,"parentId":38,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":435043,"timestamp":187665347369,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":429071,"timestamp":187665354756,"id":73,"parentId":36,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":436752,"timestamp":187665347102,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":431525,"timestamp":187665354795,"id":76,"parentId":39,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":438911,"timestamp":187665347439,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":432327,"timestamp":187665354800,"id":77,"parentId":40,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":442526,"timestamp":187665347515,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":435731,"timestamp":187665354817,"id":79,"parentId":42,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":442889,"timestamp":187665347706,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":439118,"timestamp":187665354823,"id":80,"parentId":43,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":446187,"timestamp":187665347791,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":439295,"timestamp":187665354809,"id":78,"parentId":41,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":446519,"timestamp":187665347611,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778559151172,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":442658,"timestamp":187665354831,"id":81,"parentId":44,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":449652,"timestamp":187665347874,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":445720,"timestamp":187665354845,"id":83,"parentId":46,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":452543,"timestamp":187665348059,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":453693,"timestamp":187665354853,"id":84,"parentId":47,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":460463,"timestamp":187665348140,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":455067,"timestamp":187665354836,"id":82,"parentId":45,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":461997,"timestamp":187665347956,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":460002,"timestamp":187665354858,"id":85,"parentId":48,"tags":{},"startTime":1778559151180,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":466709,"timestamp":187665348234,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":459380,"timestamp":187665357504,"id":86,"parentId":24,"tags":{},"startTime":1778559151182,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":474470,"timestamp":187665342454,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778559151167,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":460155,"timestamp":187665358427,"id":87,"parentId":31,"tags":{},"startTime":1778559151183,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":472725,"timestamp":187665345934,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":468998,"timestamp":187665354610,"id":70,"parentId":33,"tags":{},"startTime":1778559151179,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":477268,"timestamp":187665346387,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778559151171,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":465090,"timestamp":187665365823,"id":90,"parentId":50,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":482203,"timestamp":187665348759,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":471263,"timestamp":187665365835,"id":91,"parentId":51,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":488255,"timestamp":187665348912,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778559151174,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":479275,"timestamp":187665365841,"id":92,"parentId":52,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":496038,"timestamp":187665349131,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778559151174,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":483954,"timestamp":187665365850,"id":93,"parentId":53,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":500544,"timestamp":187665349309,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778559151174,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":489571,"timestamp":187665365856,"id":94,"parentId":55,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":505356,"timestamp":187665350122,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778559151175,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":493282,"timestamp":187665365776,"id":88,"parentId":23,"tags":{},"startTime":1778559151190,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":516842,"timestamp":187665342282,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778559151167,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":496285,"timestamp":187665365865,"id":95,"parentId":56,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":511917,"timestamp":187665350300,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778559151175,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":496560,"timestamp":187665365812,"id":89,"parentId":49,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":513787,"timestamp":187665348605,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778559151173,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":502217,"timestamp":187665365876,"id":96,"parentId":58,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":517320,"timestamp":187665350849,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778559151176,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":504608,"timestamp":187665365904,"id":99,"parentId":54,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":521037,"timestamp":187665349521,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778559151174,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":505060,"timestamp":187665365893,"id":98,"parentId":60,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":519705,"timestamp":187665351286,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778559151176,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":506982,"timestamp":187665369733,"id":100,"parentId":57,"tags":{},"startTime":1778559151194,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":526318,"timestamp":187665350452,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778559151175,"traceId":"f1f2b1018da01eef"},{"name":"is-page-static","duration":519943,"timestamp":187665365882,"id":97,"parentId":59,"tags":{},"startTime":1778559151191,"traceId":"f1f2b1018da01eef"},{"name":"check-page","duration":534817,"timestamp":187665351079,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778559151176,"traceId":"f1f2b1018da01eef"},{"name":"static-check","duration":547441,"timestamp":187665338504,"id":19,"parentId":1,"tags":{},"startTime":1778559151163,"traceId":"f1f2b1018da01eef"},{"name":"write-routes-manifest","duration":510,"timestamp":187665893653,"id":102,"parentId":1,"tags":{},"startTime":1778559151718,"traceId":"f1f2b1018da01eef"},{"name":"load-dotenv","duration":49,"timestamp":187665911834,"id":105,"parentId":104,"tags":{},"startTime":1778559151737,"traceId":"f1f2b1018da01eef"},{"name":"run-export-path-map","duration":968,"timestamp":187665915932,"id":106,"parentId":104,"tags":{},"startTime":1778559151741,"traceId":"f1f2b1018da01eef"},{"name":"next-export","duration":660967,"timestamp":187665909398,"id":104,"parentId":1,"tags":{},"startTime":1778559151734,"traceId":"f1f2b1018da01eef"},{"name":"move-exported-app-not-found-","duration":674,"timestamp":187666573534,"id":107,"parentId":103,"tags":{},"startTime":1778559152398,"traceId":"f1f2b1018da01eef"},{"name":"move-exported-app-global-error-","duration":451,"timestamp":187666574314,"id":108,"parentId":103,"tags":{},"startTime":1778559152399,"traceId":"f1f2b1018da01eef"}]
2
- [{"name":"static-generation","duration":678305,"timestamp":187665900854,"id":103,"parentId":1,"tags":{},"startTime":1778559151726,"traceId":"f1f2b1018da01eef"},{"name":"write-routes-manifest","duration":493,"timestamp":187666579347,"id":109,"parentId":1,"tags":{},"startTime":1778559152404,"traceId":"f1f2b1018da01eef"},{"name":"print-tree-view","duration":3647,"timestamp":187666588525,"id":110,"parentId":1,"tags":{},"startTime":1778559152413,"traceId":"f1f2b1018da01eef"},{"name":"write-route-bundle-stats","duration":36369,"timestamp":187666592214,"id":111,"parentId":1,"tags":{},"startTime":1778559152417,"traceId":"f1f2b1018da01eef"},{"name":"telemetry-flush","duration":8887,"timestamp":187666628632,"id":112,"parentId":1,"tags":{},"startTime":1778559152453,"traceId":"f1f2b1018da01eef"},{"name":"next-build","duration":16600722,"timestamp":187650036837,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778559135862,"traceId":"f1f2b1018da01eef"}]
1
+ [{"name":"generate-buildid","duration":553,"timestamp":188566565800,"id":4,"parentId":1,"tags":{},"startTime":1778560052391,"traceId":"b1e55b19f0ced665"},{"name":"load-custom-routes","duration":487,"timestamp":188566566548,"id":5,"parentId":1,"tags":{},"startTime":1778560052391,"traceId":"b1e55b19f0ced665"},{"name":"create-dist-dir","duration":1422,"timestamp":188566567081,"id":6,"parentId":1,"tags":{},"startTime":1778560052392,"traceId":"b1e55b19f0ced665"},{"name":"clean","duration":1414,"timestamp":188566569358,"id":7,"parentId":1,"tags":{},"startTime":1778560052394,"traceId":"b1e55b19f0ced665"},{"name":"discover-routes","duration":9657,"timestamp":188566684213,"id":8,"parentId":1,"tags":{},"startTime":1778560052509,"traceId":"b1e55b19f0ced665"},{"name":"create-root-mapping","duration":124,"timestamp":188566693934,"id":9,"parentId":1,"tags":{},"startTime":1778560052519,"traceId":"b1e55b19f0ced665"},{"name":"generate-route-types","duration":31168,"timestamp":188566696298,"id":10,"parentId":1,"tags":{},"startTime":1778560052521,"traceId":"b1e55b19f0ced665"},{"name":"public-dir-conflict-check","duration":113,"timestamp":188566727761,"id":11,"parentId":1,"tags":{},"startTime":1778560052552,"traceId":"b1e55b19f0ced665"},{"name":"generate-routes-manifest","duration":4238,"timestamp":188566727998,"id":12,"parentId":1,"tags":{},"startTime":1778560052553,"traceId":"b1e55b19f0ced665"},{"name":"run-turbopack","duration":7575321,"timestamp":188566737552,"id":14,"parentId":1,"tags":{},"startTime":1778560052562,"traceId":"b1e55b19f0ced665"},{"name":"turbopack-build-events","duration":88,"timestamp":188567012495,"id":15,"parentId":1,"tags":{},"startTime":1778560052837,"traceId":"b1e55b19f0ced665"},{"name":"run-typescript","duration":7357443,"timestamp":188574319533,"id":16,"parentId":1,"tags":{},"startTime":1778560060144,"traceId":"b1e55b19f0ced665"},{"name":"generate-required-server-files","duration":2495,"timestamp":188581677890,"id":18,"parentId":1,"tags":{},"startTime":1778560067503,"traceId":"b1e55b19f0ced665"},{"name":"check-static-error-page","duration":17768,"timestamp":188581742453,"id":20,"parentId":19,"tags":{},"startTime":1778560067567,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":292667,"timestamp":188581762520,"id":62,"parentId":22,"tags":{},"startTime":1778560067587,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":310489,"timestamp":188581744814,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778560067570,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":393750,"timestamp":188581762599,"id":63,"parentId":25,"tags":{},"startTime":1778560067587,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":408741,"timestamp":188581747680,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778560067572,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":408321,"timestamp":188581762224,"id":61,"parentId":21,"tags":{},"startTime":1778560067587,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":427015,"timestamp":188581743603,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778560067568,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":408114,"timestamp":188581762775,"id":65,"parentId":27,"tags":{},"startTime":1778560067587,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":422203,"timestamp":188581748714,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778560067573,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":415617,"timestamp":188581762736,"id":64,"parentId":26,"tags":{},"startTime":1778560067587,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":429852,"timestamp":188581748564,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778560067573,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":416189,"timestamp":188581762846,"id":67,"parentId":29,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":430142,"timestamp":188581748958,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778560067574,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":423845,"timestamp":188581762883,"id":68,"parentId":30,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":436480,"timestamp":188581750314,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778560067575,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":429558,"timestamp":188581763029,"id":70,"parentId":33,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":438570,"timestamp":188581754080,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778560067579,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":433380,"timestamp":188581762918,"id":69,"parentId":32,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":443285,"timestamp":188581753083,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778560067578,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":433413,"timestamp":188581763075,"id":71,"parentId":34,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":442243,"timestamp":188581754269,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778560067579,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":436914,"timestamp":188581763162,"id":73,"parentId":36,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":445387,"timestamp":188581754744,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778560067579,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":437169,"timestamp":188581763092,"id":72,"parentId":35,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":445898,"timestamp":188581754388,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778560067579,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":440941,"timestamp":188581763189,"id":75,"parentId":38,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":449208,"timestamp":188581754993,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":441203,"timestamp":188581763181,"id":74,"parentId":37,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":449530,"timestamp":188581754880,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":444769,"timestamp":188581763195,"id":76,"parentId":39,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":452947,"timestamp":188581755084,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":444993,"timestamp":188581763201,"id":77,"parentId":40,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":453048,"timestamp":188581755174,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":447652,"timestamp":188581763207,"id":78,"parentId":41,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":455662,"timestamp":188581755250,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":448155,"timestamp":188581763212,"id":79,"parentId":42,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":456076,"timestamp":188581755328,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":449948,"timestamp":188581763217,"id":80,"parentId":43,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":457805,"timestamp":188581755392,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":452136,"timestamp":188581763222,"id":81,"parentId":44,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":459922,"timestamp":188581755469,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":453451,"timestamp":188581763227,"id":82,"parentId":45,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":461178,"timestamp":188581755537,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":455765,"timestamp":188581763232,"id":83,"parentId":46,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":463407,"timestamp":188581755644,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":457781,"timestamp":188581763237,"id":84,"parentId":47,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":465340,"timestamp":188581755721,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":458695,"timestamp":188581763241,"id":85,"parentId":48,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":466167,"timestamp":188581755805,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778560067580,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":460547,"timestamp":188581762810,"id":66,"parentId":28,"tags":{},"startTime":1778560067588,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":474564,"timestamp":188581748829,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778560067574,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":454101,"timestamp":188581769772,"id":86,"parentId":24,"tags":{},"startTime":1778560067594,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":478686,"timestamp":188581745248,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778560067570,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":453907,"timestamp":188581772218,"id":87,"parentId":31,"tags":{},"startTime":1778560067597,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":475713,"timestamp":188581750467,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778560067575,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":446944,"timestamp":188581781995,"id":88,"parentId":23,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":483899,"timestamp":188581745076,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778560067570,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":452111,"timestamp":188581782069,"id":91,"parentId":51,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":477819,"timestamp":188581756424,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778560067581,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":457757,"timestamp":188581782077,"id":92,"parentId":52,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":483299,"timestamp":188581756600,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778560067581,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":463841,"timestamp":188581782085,"id":93,"parentId":53,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":489220,"timestamp":188581756764,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778560067581,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":469733,"timestamp":188581782090,"id":94,"parentId":55,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":494472,"timestamp":188581757410,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778560067582,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":474893,"timestamp":188581782173,"id":95,"parentId":56,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":499639,"timestamp":188581757563,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778560067582,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":479910,"timestamp":188581782048,"id":89,"parentId":49,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":505850,"timestamp":188581756179,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778560067581,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":480483,"timestamp":188581782184,"id":96,"parentId":58,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":502998,"timestamp":188581759717,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778560067584,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":486468,"timestamp":188581782203,"id":98,"parentId":60,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":508702,"timestamp":188581760023,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778560067585,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":489029,"timestamp":188581782059,"id":90,"parentId":50,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":514837,"timestamp":188581756315,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778560067581,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":489414,"timestamp":188581782189,"id":97,"parentId":59,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":511759,"timestamp":188581759888,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778560067585,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":491849,"timestamp":188581782216,"id":99,"parentId":54,"tags":{},"startTime":1778560067607,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":517140,"timestamp":188581756960,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778560067582,"traceId":"b1e55b19f0ced665"},{"name":"is-page-static","duration":484252,"timestamp":188581790881,"id":100,"parentId":57,"tags":{},"startTime":1778560067616,"traceId":"b1e55b19f0ced665"},{"name":"check-page","duration":517478,"timestamp":188581757706,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778560067582,"traceId":"b1e55b19f0ced665"},{"name":"static-check","duration":533625,"timestamp":188581741597,"id":19,"parentId":1,"tags":{},"startTime":1778560067566,"traceId":"b1e55b19f0ced665"},{"name":"write-routes-manifest","duration":482,"timestamp":188582281942,"id":102,"parentId":1,"tags":{},"startTime":1778560068107,"traceId":"b1e55b19f0ced665"},{"name":"load-dotenv","duration":46,"timestamp":188582294353,"id":105,"parentId":104,"tags":{},"startTime":1778560068119,"traceId":"b1e55b19f0ced665"},{"name":"run-export-path-map","duration":623,"timestamp":188582297080,"id":106,"parentId":104,"tags":{},"startTime":1778560068122,"traceId":"b1e55b19f0ced665"},{"name":"next-export","duration":543515,"timestamp":188582293137,"id":104,"parentId":1,"tags":{},"startTime":1778560068118,"traceId":"b1e55b19f0ced665"},{"name":"move-exported-app-not-found-","duration":1306,"timestamp":188582840087,"id":107,"parentId":103,"tags":{},"startTime":1778560068665,"traceId":"b1e55b19f0ced665"},{"name":"move-exported-app-global-error-","duration":395,"timestamp":188582841505,"id":108,"parentId":103,"tags":{},"startTime":1778560068666,"traceId":"b1e55b19f0ced665"}]
2
+ [{"name":"static-generation","duration":559889,"timestamp":188582286552,"id":103,"parentId":1,"tags":{},"startTime":1778560068111,"traceId":"b1e55b19f0ced665"},{"name":"write-routes-manifest","duration":496,"timestamp":188582846623,"id":109,"parentId":1,"tags":{},"startTime":1778560068671,"traceId":"b1e55b19f0ced665"},{"name":"print-tree-view","duration":3726,"timestamp":188582856753,"id":110,"parentId":1,"tags":{},"startTime":1778560068681,"traceId":"b1e55b19f0ced665"},{"name":"write-route-bundle-stats","duration":12663,"timestamp":188582860515,"id":111,"parentId":1,"tags":{},"startTime":1778560068685,"traceId":"b1e55b19f0ced665"},{"name":"telemetry-flush","duration":29856,"timestamp":188582873213,"id":112,"parentId":1,"tags":{},"startTime":1778560068698,"traceId":"b1e55b19f0ced665"},{"name":"next-build","duration":16395949,"timestamp":188566507168,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778560052332,"traceId":"b1e55b19f0ced665"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":7545548,"timestamp":187650248050,"id":14,"parentId":1,"tags":{},"startTime":1778559136073,"traceId":"f1f2b1018da01eef"},{"name":"turbopack-build-events","duration":87,"timestamp":187650534122,"id":15,"parentId":1,"tags":{},"startTime":1778559136359,"traceId":"f1f2b1018da01eef"},{"name":"run-typescript","duration":7464896,"timestamp":187657801873,"id":16,"parentId":1,"tags":{},"startTime":1778559143627,"traceId":"f1f2b1018da01eef"},{"name":"static-check","duration":547441,"timestamp":187665338504,"id":19,"parentId":1,"tags":{},"startTime":1778559151163,"traceId":"f1f2b1018da01eef"},{"name":"static-generation","duration":678305,"timestamp":187665900854,"id":103,"parentId":1,"tags":{},"startTime":1778559151726,"traceId":"f1f2b1018da01eef"},{"name":"telemetry-flush","duration":8887,"timestamp":187666628632,"id":112,"parentId":1,"tags":{},"startTime":1778559152453,"traceId":"f1f2b1018da01eef"},{"name":"next-build","duration":16600722,"timestamp":187650036837,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778559135862,"traceId":"f1f2b1018da01eef"}]
1
+ [{"name":"run-turbopack","duration":7575321,"timestamp":188566737552,"id":14,"parentId":1,"tags":{},"startTime":1778560052562,"traceId":"b1e55b19f0ced665"},{"name":"turbopack-build-events","duration":88,"timestamp":188567012495,"id":15,"parentId":1,"tags":{},"startTime":1778560052837,"traceId":"b1e55b19f0ced665"},{"name":"run-typescript","duration":7357443,"timestamp":188574319533,"id":16,"parentId":1,"tags":{},"startTime":1778560060144,"traceId":"b1e55b19f0ced665"},{"name":"static-check","duration":533625,"timestamp":188581741597,"id":19,"parentId":1,"tags":{},"startTime":1778560067566,"traceId":"b1e55b19f0ced665"},{"name":"static-generation","duration":559889,"timestamp":188582286552,"id":103,"parentId":1,"tags":{},"startTime":1778560068111,"traceId":"b1e55b19f0ced665"},{"name":"telemetry-flush","duration":29856,"timestamp":188582873213,"id":112,"parentId":1,"tags":{},"startTime":1778560068698,"traceId":"b1e55b19f0ced665"},{"name":"next-build","duration":16395949,"timestamp":188566507168,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778560052332,"traceId":"b1e55b19f0ced665"}]
@@ -0,0 +1,51 @@
1
+ /** Hue-hashed avatar pill for agent aliases. Same alias → same color across
2
+ * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline
3
+ * pills (16/20) vs card headers (28). Round 21 introduced the palette;
4
+ * round 22 promotes it from app/messages to a shared component. */
5
+
6
+ const AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];
7
+
8
+ export function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {
9
+ let h = 0;
10
+ for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;
11
+ const hue = AVATAR_HUES[h % AVATAR_HUES.length];
12
+ return {
13
+ bg: `hsl(${hue} 55% 22%)`,
14
+ ring: `hsl(${hue} 60% 45%)`,
15
+ text: `hsl(${hue} 80% 78%)`,
16
+ };
17
+ }
18
+
19
+ export function aliasInitial(alias?: string): string {
20
+ if (!alias) return '·';
21
+ const ch = alias.trim().match(/[\p{L}\p{N}]/u)?.[0] || alias.trim()[0] || '·';
22
+ return ch.toUpperCase();
23
+ }
24
+
25
+ interface AliasAvatarProps {
26
+ alias: string;
27
+ size?: number;
28
+ className?: string;
29
+ }
30
+
31
+ export function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {
32
+ const c = aliasAvatarColors(alias);
33
+ const fs = Math.max(9, Math.round(size * 0.42));
34
+ return (
35
+ <span
36
+ className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}
37
+ style={{
38
+ width: size,
39
+ height: size,
40
+ fontSize: fs,
41
+ backgroundColor: c.bg,
42
+ borderColor: c.ring,
43
+ color: c.text,
44
+ }}
45
+ title={alias}
46
+ aria-hidden
47
+ >
48
+ {aliasInitial(alias)}
49
+ </span>
50
+ );
51
+ }
@@ -4,6 +4,7 @@ import { useMemo, useState } from 'react';
4
4
  import { useMessages } from '../lib/hooks';
5
5
  import { timeAgo } from '../components/utils';
6
6
  import { EmptyState } from '../components/EmptyState';
7
+ import { AliasAvatar } from '../components/AliasAvatar';
7
8
 
8
9
  interface MessageItem {
9
10
  id: string;
@@ -40,26 +41,6 @@ function bubbleVariant(message: MessageItem) {
40
41
  return 'incoming';
41
42
  }
42
43
 
43
- /** Stable color hash for sender avatars — same alias always gets the same
44
- * ring, so users learn the colors over time. 8 hues, evenly spread. */
45
- const AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];
46
- function avatarColors(alias: string): { bg: string; ring: string; text: string } {
47
- let h = 0;
48
- for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;
49
- const hue = AVATAR_HUES[h % AVATAR_HUES.length];
50
- return {
51
- bg: `hsl(${hue} 55% 22%)`,
52
- ring: `hsl(${hue} 60% 45%)`,
53
- text: `hsl(${hue} 80% 78%)`,
54
- };
55
- }
56
- function avatarInitial(alias?: string): string {
57
- if (!alias) return '·';
58
- // Strip non-letter prefix, take first non-ws char; handle CJK directly.
59
- const ch = alias.trim().match(/[\p{L}\p{N}]/u)?.[0] || alias.trim()[0] || '·';
60
- return ch.toUpperCase();
61
- }
62
-
63
44
  /** Render message content, highlighting the search match inline (skips the
64
45
  * `from:` filter prefix since it filters by sender, not by content). */
65
46
  function renderHighlighted(content: string | undefined, search: string) {
@@ -259,7 +240,6 @@ export default function MessagesPage() {
259
240
  && (previous.from_alias || '') === (message.from_alias || '')
260
241
  && (previous.to_alias || '') === (message.to_alias || '');
261
242
  const fromAlias = message.from_alias || '?';
262
- const avColors = avatarColors(fromAlias);
263
243
 
264
244
  return (
265
245
  <div key={message.id}>
@@ -293,15 +273,7 @@ export default function MessagesPage() {
293
273
  <div className={`${samePrev ? 'mt-1' : 'mt-3'} flex gap-2 ${variant === 'outgoing' ? 'flex-row-reverse' : 'flex-row'}`}>
294
274
  {/* Avatar gutter — fixed width keeps bubble columns aligned even on streaks */}
295
275
  <div className="w-8 shrink-0 pt-1">
296
- {!samePrev && (
297
- <div
298
- className="flex h-8 w-8 items-center justify-center rounded-full border text-[11px] font-semibold"
299
- style={{ backgroundColor: avColors.bg, borderColor: avColors.ring, color: avColors.text }}
300
- title={fromAlias}
301
- >
302
- {avatarInitial(fromAlias)}
303
- </div>
304
- )}
276
+ {!samePrev && <AliasAvatar alias={fromAlias} size={32} />}
305
277
  </div>
306
278
  <div className={`min-w-0 max-w-3xl rounded-2xl border px-4 py-3 shadow-sm ${
307
279
  variant === 'outgoing'
@@ -6,6 +6,7 @@ import { timeAgo } from '../components/utils';
6
6
  import { useSessions, useHealth } from '../lib/hooks';
7
7
  import { TaskChatPanel } from '../components/TaskChatPanel';
8
8
  import { EmptyState } from '../components/EmptyState';
9
+ import { AliasAvatar } from '../components/AliasAvatar';
9
10
  import type { Session } from '../components/types';
10
11
 
11
12
  const STATUS_COLORS: Record<string, string> = {
@@ -188,14 +189,18 @@ export default function NodesPage() {
188
189
  </span>
189
190
  </div>
190
191
  )}
191
- <div className="flex items-start justify-between gap-3">
192
+ <div className="flex items-start gap-3">
193
+ <AliasAvatar alias={s.alias} size={36} />
192
194
  <Link href={`/node?alias=${encodeURIComponent(s.alias)}`} className="min-w-0 flex-1 hover:text-cyan-300">
193
195
  <div className="flex items-center gap-2">
194
196
  <span className="truncate text-base font-semibold text-white">{s.alias}</span>
195
- <span className={`shrink-0 rounded-md border px-2 py-0.5 text-[11px] ${STATUS_COLORS[statusKey] || STATUS_COLORS.offline}`}>
197
+ <span className={`shrink-0 rounded-md border px-2 py-0.5 text-[10px] uppercase tracking-wide ${STATUS_COLORS[statusKey] || STATUS_COLORS.offline}`}>
196
198
  {statusKey}
197
199
  </span>
198
200
  </div>
201
+ <div className="mt-0.5 truncate text-xs text-gray-500">
202
+ {(s.agent || '—')}<span className="text-gray-700 mx-1.5">·</span>{(s.server || '—')}
203
+ </div>
199
204
  </Link>
200
205
  <div className="flex gap-1.5 shrink-0">
201
206
  <button type="button" onClick={() => setChatAlias(s.alias)}
@@ -209,25 +214,16 @@ export default function NodesPage() {
209
214
  </div>
210
215
  </div>
211
216
 
212
- <div className="mt-3 space-y-2 text-xs text-gray-500">
213
- <div className="flex justify-between gap-3">
214
- <span>Agent</span>
215
- <span className="truncate text-gray-300">{s.agent || '--'}</span>
216
- </div>
217
- <div className="flex justify-between gap-3">
218
- <span>Server</span>
219
- <span className="truncate text-gray-300">{s.server || '--'}</span>
217
+ <div className="mt-3 rounded-lg border border-[#1a1a2a] bg-[#0a0a15] px-3 py-2 text-xs">
218
+ <div className="flex items-center justify-between gap-3">
219
+ <span className="text-[10px] uppercase tracking-wide text-gray-600">Current task</span>
220
+ <span className="text-[10px] text-gray-600">{timeAgo(s.last_seen_at || s.updated_at)}</span>
220
221
  </div>
221
- <div className="flex justify-between gap-3">
222
- <span>Updated</span>
223
- <span className="text-gray-300">{timeAgo(s.last_seen_at || s.updated_at)}</span>
222
+ <div className={`mt-1 line-clamp-2 ${s.task ? 'text-gray-300' : 'text-gray-600 italic'}`}>
223
+ {s.task || 'No current task'}
224
224
  </div>
225
225
  </div>
226
226
 
227
- <div className="mt-3 rounded-lg border border-[#1a1a2a] bg-[#0a0a15] px-3 py-2 text-xs text-gray-400">
228
- {s.task ? s.task : 'No current task'}
229
- </div>
230
-
231
227
  {progress > 0 && progress < 100 && (
232
228
  <div className="mt-3 h-1.5 overflow-hidden rounded-full bg-gray-800">
233
229
  <div className="h-1.5 rounded-full bg-cyan-400 transition-all" style={{ width: `${progress}%` }} />
@@ -297,8 +293,9 @@ export default function NodesPage() {
297
293
  </span>
298
294
  </div>
299
295
  <div className="col-span-2 min-w-0">
300
- <Link href={`/node?alias=${encodeURIComponent(s.alias)}`} className="truncate text-sm font-medium text-white hover:text-cyan-300">
301
- {s.alias}
296
+ <Link href={`/node?alias=${encodeURIComponent(s.alias)}`} className="flex items-center gap-2 min-w-0 hover:text-cyan-300">
297
+ <AliasAvatar alias={s.alias} size={20} />
298
+ <span className="truncate text-sm font-medium text-white">{s.alias}</span>
302
299
  </Link>
303
300
  </div>
304
301
  <div className="col-span-2 truncate text-xs text-gray-400">{s.agent || '--'}</div>
@@ -317,15 +314,16 @@ export default function NodesPage() {
317
314
  </div>
318
315
  </div>
319
316
  <div className="sm:hidden space-y-2">
320
- <div className="flex items-center justify-between gap-3">
321
- <Link href={`/node?alias=${encodeURIComponent(s.alias)}`} className="truncate text-sm font-medium text-white hover:text-cyan-300">
322
- {s.alias}
317
+ <div className="flex items-center gap-2.5">
318
+ <AliasAvatar alias={s.alias} size={28} />
319
+ <Link href={`/node?alias=${encodeURIComponent(s.alias)}`} className="min-w-0 flex-1 hover:text-cyan-300">
320
+ <div className="truncate text-sm font-medium text-white">{s.alias}</div>
321
+ <div className="truncate text-[10px] text-gray-500">{s.agent || '—'} · {timeAgo(s.last_seen_at || s.updated_at)}</div>
323
322
  </Link>
324
323
  <span className={`shrink-0 text-xs px-2 py-0.5 rounded-md border ${STATUS_COLORS[statusKey] || STATUS_COLORS.offline}`}>
325
324
  {statusKey}
326
325
  </span>
327
326
  </div>
328
- <div className="text-xs text-gray-500">{s.agent || '--'} · {timeAgo(s.last_seen_at || s.updated_at)}</div>
329
327
  {s.task && <div className="truncate text-xs text-gray-500">{s.task}</div>}
330
328
  <div className="flex gap-2">
331
329
  <button type="button" onClick={() => setChatAlias(s.alias)}