@sleep2agi/agent-network-dashboard 0.4.6-preview.65 → 0.4.6-preview.67

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 (159) 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 +31 -31
  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 +11 -11
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  17. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  18. package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  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 +13 -13
  25. package/.next/server/app/admin.segments/_full.segment.rsc +13 -13
  26. package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
  27. package/.next/server/app/admin.segments/_index.segment.rsc +6 -6
  28. package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  29. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
  30. package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
  31. package/.next/server/app/index.html +2 -2
  32. package/.next/server/app/index.rsc +13 -13
  33. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  34. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  35. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  36. package/.next/server/app/index.segments/_index.segment.rsc +6 -6
  37. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  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 +13 -13
  41. package/.next/server/app/login.segments/_full.segment.rsc +13 -13
  42. package/.next/server/app/login.segments/_head.segment.rsc +4 -4
  43. package/.next/server/app/login.segments/_index.segment.rsc +6 -6
  44. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  45. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  46. package/.next/server/app/login.segments/login.segment.rsc +3 -3
  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 +13 -13
  50. package/.next/server/app/logs.segments/_full.segment.rsc +13 -13
  51. package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
  52. package/.next/server/app/logs.segments/_index.segment.rsc +6 -6
  53. package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
  54. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
  55. package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
  56. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/messages.html +2 -2
  58. package/.next/server/app/messages.rsc +13 -13
  59. package/.next/server/app/messages.segments/_full.segment.rsc +13 -13
  60. package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
  61. package/.next/server/app/messages.segments/_index.segment.rsc +6 -6
  62. package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
  63. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
  64. package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
  65. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/node.html +2 -2
  67. package/.next/server/app/node.rsc +13 -13
  68. package/.next/server/app/node.segments/_full.segment.rsc +13 -13
  69. package/.next/server/app/node.segments/_head.segment.rsc +4 -4
  70. package/.next/server/app/node.segments/_index.segment.rsc +6 -6
  71. package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
  72. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
  73. package/.next/server/app/node.segments/node.segment.rsc +3 -3
  74. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/nodes.html +2 -2
  76. package/.next/server/app/nodes.rsc +13 -13
  77. package/.next/server/app/nodes.segments/_full.segment.rsc +13 -13
  78. package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
  79. package/.next/server/app/nodes.segments/_index.segment.rsc +6 -6
  80. package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
  81. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
  82. package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
  83. package/.next/server/app/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/server-logs.html +2 -2
  86. package/.next/server/app/server-logs.rsc +13 -13
  87. package/.next/server/app/server-logs.segments/_full.segment.rsc +13 -13
  88. package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
  89. package/.next/server/app/server-logs.segments/_index.segment.rsc +6 -6
  90. package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
  91. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
  92. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
  93. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/settings/networks.html +2 -2
  95. package/.next/server/app/settings/networks.rsc +13 -13
  96. package/.next/server/app/settings/networks.segments/_full.segment.rsc +13 -13
  97. package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
  98. package/.next/server/app/settings/networks.segments/_index.segment.rsc +6 -6
  99. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
  100. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
  101. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
  102. package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
  103. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  105. package/.next/server/app/settings/tokens.html +2 -2
  106. package/.next/server/app/settings/tokens.rsc +13 -13
  107. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +13 -13
  108. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
  109. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +6 -6
  110. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
  111. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
  112. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
  113. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
  114. package/.next/server/app/settings.html +2 -2
  115. package/.next/server/app/settings.rsc +13 -13
  116. package/.next/server/app/settings.segments/_full.segment.rsc +13 -13
  117. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  118. package/.next/server/app/settings.segments/_index.segment.rsc +6 -6
  119. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  120. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  121. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  122. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  123. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/tasks.html +2 -2
  125. package/.next/server/app/tasks.rsc +13 -13
  126. package/.next/server/app/tasks.segments/_full.segment.rsc +13 -13
  127. package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  128. package/.next/server/app/tasks.segments/_index.segment.rsc +6 -6
  129. package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
  130. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  131. package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  132. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +2 -2
  133. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
  134. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  135. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  136. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  137. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  138. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js +1 -1
  139. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js.map +1 -1
  140. package/.next/server/middleware-build-manifest.js +3 -3
  141. package/.next/server/pages/404.html +2 -2
  142. package/.next/server/pages/500.html +1 -1
  143. package/.next/server/server-reference-manifest.js +1 -1
  144. package/.next/server/server-reference-manifest.json +1 -1
  145. package/.next/static/chunks/0-2pp4l8uv5ee.js +2 -0
  146. package/.next/static/chunks/{0g~q-_zjjmoy..js → 09lsp3ttcsb.5.js} +1 -1
  147. package/.next/static/chunks/{15m0r9jrlvq5w.js → 0fwql~eyp6cpi.js} +1 -1
  148. package/.next/static/chunks/{0mqwn-l7wtcdo.js → 0p8ot1ky-l3_o.js} +3 -3
  149. package/.next/trace +2 -2
  150. package/.next/trace-build +1 -1
  151. package/app/components/HelpOverlay.tsx +8 -1
  152. package/app/components/TopoGraph.tsx +58 -10
  153. package/package.json +1 -1
  154. package/scripts/topo-help-overlay-r59-test.mjs +67 -0
  155. package/scripts/topo-pressure-pin-test.mjs +112 -0
  156. package/.next/static/chunks/175dz37akp~1a.js +0 -2
  157. /package/.next/static/{b7ggYFk6pw_uSqPPuo9jy → FKxkjxZ3oooqJKbmQmbOM}/_buildManifest.js +0 -0
  158. /package/.next/static/{b7ggYFk6pw_uSqPPuo9jy → FKxkjxZ3oooqJKbmQmbOM}/_clientMiddlewareManifest.js +0 -0
  159. /package/.next/static/{b7ggYFk6pw_uSqPPuo9jy → FKxkjxZ3oooqJKbmQmbOM}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.65"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.67"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
@@ -1,7 +1,7 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24156,e=>{"use strict";var t=e.i(22381),a=e.i(23910);let s=[{id:"cyber",label:"Cyber",emoji:"🌃",desc:"默认深色"},{id:"light",label:"Light",emoji:"☀️",desc:"浅色简洁"},{id:"mint",label:"Mint",emoji:"🌿",desc:"薄荷绿"},{id:"sunset",label:"Sunset",emoji:"🌅",desc:"暖色橙紫"}],r="anet-theme";function n(e){"u">typeof document&&document.documentElement.setAttribute("data-theme",e)}e.s(["ThemeProvider",0,function({children:e}){return(0,a.useEffect)(()=>{n(localStorage.getItem(r)||"cyber")},[]),(0,t.jsx)(t.Fragment,{children:e})},"ThemeSwitcher",0,function({compact:e=!1}){let[l,o]=(0,a.useState)("cyber"),[i,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=localStorage.getItem(r)||"cyber";o(e),n(e)},[]);let d=s.find(e=>e.id===l)||s[0];return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{"aria-label":"切换主题",onClick:()=>c(!i),className:"px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity",style:{background:"var(--bg-elevated)",color:"var(--fg)",border:"1px solid var(--border)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:d.emoji}),!e&&(0,t.jsx)("span",{children:d.label})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),(0,t.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:s.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;o(t=e.id),localStorage.setItem(r,t),n(t),c(!1)},className:"w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80",style:{background:e.id===l?"var(--bg-elevated)":"transparent",color:"var(--fg)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:e.emoji}),(0,t.jsx)("span",{className:"flex-1",children:e.label}),(0,t.jsx)("span",{style:{color:"var(--fg-dim)"},className:"text-[10px]",children:e.desc}),e.id===l&&(0,t.jsx)("span",{style:{color:"var(--accent)"},children:"•"})]},e.id))})]})]})}])},22485,e=>{"use strict";var t=e.i(22381),a=e.i(56058),s=e.i(56839),r=e.i(23910),n=e.i(12629),l=e.i(11449),o=e.i(24156);let i=e=>fetch(e).then(e=>e.ok?e.json():{networks:[]}),c=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Audit Log",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/server-logs",label:"Server Logs",icon:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],d={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function m(){let e=(0,a.usePathname)(),[m,u]=(0,r.useState)(!1),[p,g]=(0,r.useState)(!1),{networkId:f,setNetworkId:b}=(0,l.useNetworkId)(),{data:v}=(0,n.default)("/api/hub/networks",i,{refreshInterval:15e3,dedupingInterval:1e4}),{data:y}=(0,n.default)("/api/hub/status",h,{refreshInterval:15e3,dedupingInterval:1e4}),k=v?.networks||[],j=(()=>{let e=new Map;for(let t of y?.sessions||[])t.network_id&&e.set(t.network_id,(e.get(t.network_id)||0)+1);let t=new Set(k.map(e=>e.network_id));return[...k,...[...e.keys()].filter(e=>!t.has(e)).map(e=>({network_id:e,network_name:e}))].map(t=>({...t,agentCount:e.get(t.network_id)||0}))})(),w=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:c.map(a=>{var r;return(0,t.jsxs)(s.default,{href:a.href,prefetch:!1,onClick:()=>g(!1),title:m?a.label:void 0,className:`relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(r=a.href)?"/"===e:"/settings"===r?"/settings"===e:e.startsWith(r))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20 anet-nav-active":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${m?"justify-center px-0":""}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a.icon})}),!m&&(0,t.jsx)("span",{children:a.label})]},a.href)})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>g(!p),className:"fixed top-4 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-2.5 text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:p?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),p&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden anet-fade-in",onClick:()=>g(!1)}),(0,t.jsxs)("aside",{"data-anet-sidebar":"true",className:`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24156,e=>{"use strict";var t=e.i(22381),a=e.i(23910);let s=[{id:"cyber",label:"Cyber",emoji:"🌃",desc:"默认深色"},{id:"light",label:"Light",emoji:"☀️",desc:"浅色简洁"},{id:"mint",label:"Mint",emoji:"🌿",desc:"薄荷绿"},{id:"sunset",label:"Sunset",emoji:"🌅",desc:"暖色橙紫"}],r="anet-theme";function n(e){"u">typeof document&&document.documentElement.setAttribute("data-theme",e)}e.s(["ThemeProvider",0,function({children:e}){return(0,a.useEffect)(()=>{n(localStorage.getItem(r)||"cyber")},[]),(0,t.jsx)(t.Fragment,{children:e})},"ThemeSwitcher",0,function({compact:e=!1}){let[l,o]=(0,a.useState)("cyber"),[i,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=localStorage.getItem(r)||"cyber";o(e),n(e)},[]);let d=s.find(e=>e.id===l)||s[0];return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{"aria-label":"切换主题",onClick:()=>c(!i),className:"px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity",style:{background:"var(--bg-elevated)",color:"var(--fg)",border:"1px solid var(--border)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:d.emoji}),!e&&(0,t.jsx)("span",{children:d.label})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),(0,t.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:s.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;o(t=e.id),localStorage.setItem(r,t),n(t),c(!1)},className:"w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80",style:{background:e.id===l?"var(--bg-elevated)":"transparent",color:"var(--fg)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:e.emoji}),(0,t.jsx)("span",{className:"flex-1",children:e.label}),(0,t.jsx)("span",{style:{color:"var(--fg-dim)"},className:"text-[10px]",children:e.desc}),e.id===l&&(0,t.jsx)("span",{style:{color:"var(--accent)"},children:"•"})]},e.id))})]})]})}])},22485,e=>{"use strict";var t=e.i(22381),a=e.i(56058),s=e.i(56839),r=e.i(23910),n=e.i(12629),l=e.i(11449),o=e.i(24156);let i=e=>fetch(e).then(e=>e.ok?e.json():{networks:[]}),c=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Audit Log",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/server-logs",label:"Server Logs",icon:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],d={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function h(){let e=(0,a.usePathname)(),[h,u]=(0,r.useState)(!1),[p,g]=(0,r.useState)(!1),{networkId:f,setNetworkId:b}=(0,l.useNetworkId)(),{data:v}=(0,n.default)("/api/hub/networks",i,{refreshInterval:15e3,dedupingInterval:1e4}),{data:y}=(0,n.default)("/api/hub/status",m,{refreshInterval:15e3,dedupingInterval:1e4}),k=v?.networks||[],j=(()=>{let e=new Map;for(let t of y?.sessions||[])t.network_id&&e.set(t.network_id,(e.get(t.network_id)||0)+1);let t=new Set(k.map(e=>e.network_id));return[...k,...[...e.keys()].filter(e=>!t.has(e)).map(e=>({network_id:e,network_name:e}))].map(t=>({...t,agentCount:e.get(t.network_id)||0}))})(),w=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:c.map(a=>{var r;return(0,t.jsxs)(s.default,{href:a.href,prefetch:!1,onClick:()=>g(!1),title:h?a.label:void 0,className:`relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(r=a.href)?"/"===e:"/settings"===r?"/settings"===e:e.startsWith(r))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20 anet-nav-active":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${h?"justify-center px-0":""}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a.icon})}),!h&&(0,t.jsx)("span",{children:a.label})]},a.href)})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>g(!p),className:"fixed top-4 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-2.5 text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:p?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),p&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden anet-fade-in",onClick:()=>g(!1)}),(0,t.jsxs)("aside",{"data-anet-sidebar":"true",className:`
2
2
  fixed top-0 left-0 h-full z-40 bg-[#0d0d1a] border-r border-[#2a2a4a]
3
3
  transition-transform duration-200 ease-out
4
- ${m?"w-16":"w-52"}
4
+ ${h?"w-16":"w-52"}
5
5
  ${p?"translate-x-0 shadow-2xl shadow-black/40 lg:shadow-none":"-translate-x-full"}
6
6
  lg:translate-x-0 lg:static lg:shrink-0 lg:shadow-none
7
- `,children:[(0,t.jsx)(x,{collapsed:m}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!m&&j.length>0&&(0,t.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,t.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,t.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("button",{onClick:()=>{b(e.network_id),g(!1)},title:e.network_id,className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${f===e.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,t.jsx)("span",{children:d[e.role||"member"]||"👤"}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.network_name}),e.agentCount?(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:e.agentCount}):null]},e.network_id))})]}),(0,t.jsx)("div",{className:"pb-20",children:w}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,t.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:m?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${m?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-2"}`,"aria-label":"Open command palette",children:[(0,t.jsxs)("span",{className:`flex items-center ${m?"":"gap-2"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!m&&"Quick search"]}),!m&&(0,t.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,t.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:m?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${m?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!m&&"Sign out"]}),(0,t.jsxs)("div",{className:`flex items-center gap-2 ${m?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,t.jsx)(o.ThemeSwitcher,{compact:m}),(0,t.jsx)("button",{onClick:()=>u(!m),title:m?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":m?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${m?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let h=e=>fetch(e).then(e=>e.ok?e.json():{sessions:[]});function x({collapsed:e}){let{data:a}=(0,n.default)("/api/hub/status",h,{refreshInterval:1e4,dedupingInterval:4e3}),r=a?.sessions||[],l=r.filter(e=>e.status&&"offline"!==e.status).length,o=r.length;return e?(0,t.jsx)(s.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,t.jsx)(u,{size:32})}):(0,t.jsxs)(s.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,t.jsx)(u,{size:32}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${l>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===o?(0,t.jsx)("span",{children:"waiting for agents"}):(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:l}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",o]})," online"]})]})]})]})}function u({size:e}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let p=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function g(){let e,a,{data:l,error:o}=(0,n.default)("/api/hub/stats",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:c}=(0,n.default)("/api/hub/health",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,m]=(0,r.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let h=o&&c||i&&!1===i.ok,x=l?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,u=l?.nodes?.total===0,g=null;if(h?(e="red",a="CommHub unreachable — agents may be offline",g={label:"Open Settings",href:"/settings"}):x>0?(e="amber",a=`${x} task${x>1?"s":""} failed recently`,g={label:"Review failures",href:"/tasks?status=failed"}):(u?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),g=null),"green"===e&&!l)return null;let f={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[e],b={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[e];return(0,t.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${f} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${b}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[g&&(0,t.jsxs)(s.default,{href:g.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[g.label," →"]}),g&&(0,t.jsx)(s.default,{href:g.href,"aria-label":g.label,className:"sm:hidden text-[11px] font-medium opacity-90 hover:opacity-100",children:"→"}),(0,t.jsx)("button",{onClick:()=>{m(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-50 hover:opacity-100 leading-none px-1",children:"×"})]})]})}let f="anet-cmdk-recents";function b(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function v(e){try{let t=b().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function y(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),r=0,n=0,l=0,o=0,i=[];for(;r<a.length&&n<s.length;)a[r]===s[n]?(l+=2+o,o++,i.push(r),(0===r||/[\s·:_/-]/.test(a[r-1]))&&(l+=4),n++):o=0,r++;return n<s.length?{score:-1,indices:[]}:{score:l-.05*Math.max(0,a.length-s.length),indices:i}}function k({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),r=Array.from(e);return(0,t.jsx)(t.Fragment,{children:r.map((e,a)=>s.has(a)?(0,t.jsx)("mark",{className:"anet-cmdk-mark",children:e},a):(0,t.jsx)("span",{children:e},a))})}function j({d:e}){return(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}let w=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(j,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:e=>e.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:e=>e.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:e=>e.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,t.jsx)(j,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:e=>e.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:e=>e.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,t.jsx)(j,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:e=>e.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:e=>e.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:e=>e.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:e=>e.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,t.jsx)(j,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:e=>e.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,t.jsx)(j,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber",t="light"===e||"mint"===e?"cyber":"light";document.documentElement.setAttribute("data-theme",t);try{localStorage.setItem("anet-theme",t)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,t.jsx)(j,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,t.jsx)(j,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,t.jsx)(j,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}}];function N(){let e=(0,a.useRouter)(),[s,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)(""),[i,c]=(0,r.useState)(0),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),n(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,r.useEffect)(()=>{s&&(o(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[m,h]=(0,r.useState)([]);(0,r.useEffect)(()=>{s&&h(b())},[s]);let[x,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s)return;let e=!1;return(async()=>{try{let[a,s]=await Promise.all([fetch("/api/hub/status").then(e=>e.ok?e.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(e=>e.ok?e.json():{tasks:[]})]);if(e)return;let r=(a.sessions||[]).filter(e=>e.alias).slice(0,20).map(e=>({id:`agent-${e.alias}`,title:`Go to agent ${e.alias}`,hint:`${e.agent||"agent"} \xb7 ${e.status||"unknown"}`,group:"Agents",icon:(0,t.jsx)(j,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:t=>t.push(`/node?alias=${encodeURIComponent(e.alias)}`)})),n=(s.tasks||[]).filter(e=>e.task_id).slice(0,15).map(e=>({id:`task-${e.task_id}`,title:`Open task: ${(e.content||e.task_id||"").slice(0,50)}`,hint:`${e.from_name||"?"} → ${e.to_name||"?"} \xb7 ${e.status||""}`,group:"Tasks",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:t=>t.push(`/tasks/${encodeURIComponent(e.task_id)}`)}));u([...r,...n])}catch{}})(),()=>{e=!0}},[s]);let p=(0,r.useMemo)(()=>{let e=[...w,...x];if(!l.trim()){let t=m.map(t=>e.find(e=>e.id===t)).filter(e=>!!e).map(e=>({...e,group:"Recents"})),a=new Set(m);return[...t,...w.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=y(e.title,l),a=e.hint?y(e.hint,l):{score:-1,indices:[]},s=y(e.id,l);return{c:e,score:Math.max(t.score>=0?+t.score:-1/0,a.score>=0?.6*a.score:-1/0,s.score>=0?.3*s.score:-1/0),_titleHi:t.score>=0?t.indices:[],_hintHi:a.score>=0?a.indices:[]}}).filter(e=>e.score>-1/0);return t.sort((e,t)=>t.score-e.score),t.map(e=>({...e.c,_titleHi:e._titleHi,_hintHi:e._hintHi}))},[l,m,x]);if((0,r.useEffect)(()=>{i>=p.length&&c(0)},[p.length,i]),!s)return null;let g={};for(let e of p)(g[e.group]||=[]).push(e);let f=0;return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>n(!1),onKeyDown:t=>{if("Escape"===t.key)return void n(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,p.length-1));return}if("ArrowUp"===t.key){t.preventDefault(),c(e=>Math.max(e-1,0));return}if("Enter"===t.key){t.preventDefault();let a=p[i];a&&(v(a.id),a.perform(e),n(!1))}},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("input",{ref:d,value:l,onChange:e=>{o(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,t.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,t.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===p.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',l,'"']}):Object.entries(g).map(([a,s])=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:a}),s.map(a=>{let s=f++,r=s===i;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{v(a.id),a.perform(e),n(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${r?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:r?"text-cyan-400":"text-gray-500",children:a.icon}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block truncate",children:(0,t.jsx)(k,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(k,{text:a.hint,indices:a._hintHi||[]})})]}),r&&(0,t.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},a.id)})]},a))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let M=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function _(){let[e,s]=(0,r.useState)(!1),n=(0,a.useRouter)(),l=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,r="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!r){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!r&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){l.current=Date.now();return}if(Date.now()-l.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),l.current=0,n.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),e)?(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>s(!1),children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,t.jsx)("button",{onClick:()=>s(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,t.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:M.map(e=>(0,t.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:e.group}),(0,t.jsx)("ul",{className:"space-y-1.5",children:e.items.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"flex items-center gap-1",children:e.keys.map((e,a)=>(0,t.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:e},a))}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:e.label})]},a))})]},e.group))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Press ",(0,t.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,t.jsxs)("span",{children:["or ",(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}let S=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");if(!t.ok)throw Error(`hub ${t.status}`);return t.json()};function E({pct:e,label:a}){let s=e>=85?{fill:"#ef4444",track:"rgb(239 68 68 / 0.16)"}:e>=60?{fill:"#f59e0b",track:"rgb(245 158 11 / 0.16)"}:{fill:"#10b981",track:"rgb(16 185 129 / 0.16)"},r=Math.max(0,Math.min(100,e));return(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between text-[10px] text-[var(--fg-muted)] font-mono",children:[(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"tabular-nums",children:[Math.round(r),"%"]})]}),(0,t.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:s.track},children:(0,t.jsx)("div",{className:"h-full transition-[width] duration-300 ease-out",style:{width:`${r}%`,background:s.fill}})})]})}function L(){let[e,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{"1"===localStorage.getItem("anet-servers-drawer")&&a(!0)}catch{}},[]);let{data:s,error:l}=(0,n.default)(e?"/api/hub/servers":null,S,{refreshInterval:5e3,dedupingInterval:3e3}),o=s?.servers??[],i=s?.unavailable===!0,c=o.filter(e=>"online"===e.status).length,d=e&&!s&&!l;return(0,t.jsxs)("aside",{className:"fixed right-0 top-20 z-40 hidden lg:flex flex-col rounded-l-xl border border-r-0 shadow-xl shadow-black/30 anet-fade-in",style:{background:"var(--bg-secondary)",borderColor:"var(--border)",width:e?296:40,maxHeight:"calc(100vh - 6rem)",transition:"width 200ms ease-out"},"aria-label":"Servers panel",children:[(0,t.jsxs)("button",{onClick:()=>a(e=>{let t=!e;try{localStorage.setItem("anet-servers-drawer",t?"1":"0")}catch{}return t}),"aria-expanded":e,"aria-label":e?"Collapse servers panel":"Expand servers panel",className:"flex items-center gap-2 px-2.5 py-2 border-b text-[11px] font-semibold tracking-wide select-none",style:{color:"var(--fg)",borderColor:"var(--border)"},children:[(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"7",r:"0.7",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"17",r:"0.7",fill:"currentColor"})]}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:"Servers"}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono",children:[c,"/",o.length]})]})]}),e&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-2 py-2 space-y-2","data-servers-body":!0,children:[d&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"loading servers…"}),l&&!s&&(0,t.jsx)("div",{className:"rounded-md border px-2.5 py-2 text-[10px] font-mono",style:{background:"rgb(239 68 68 / 0.06)",borderColor:"rgb(239 68 68 / 0.25)",color:"#ef4444"},children:"hub unreachable · retrying every 5s"}),i&&(0,t.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-3 leading-relaxed",children:["host telemetry not available",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[var(--fg-dim)]",children:"upgrade commhub-server ≥ 0.8.1-preview.2"})]}),!d&&!l&&!i&&0===o.length&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"no servers reporting yet"}),o.map(e=>{let a="offline"===e.status,s=null!=e.cpu_load_1min&&e.cpu_cores>0?e.cpu_load_1min/e.cpu_cores*100:null,r=null!=e.mem_used_gb&&null!=e.mem_total_gb&&e.mem_total_gb>0?e.mem_used_gb/e.mem_total_gb*100:null;return(0,t.jsxs)("div",{className:"rounded-lg border px-2.5 py-2 space-y-1.5",style:{background:"var(--bg)",borderColor:"var(--border)",opacity:a?.55:1},title:e.ip?`${e.hostname} \xb7 ${e.ip}`:e.hostname,children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono text-[12px] font-semibold truncate",style:{color:"var(--fg)"},children:e.hostname}),e.note&&(0,t.jsxs)("span",{className:"text-[9px] text-[var(--fg-dim)]",children:["(",e.note,")"]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono tabular-nums shrink-0",children:[e.agent_count," agent",1===e.agent_count?"":"s"]})]}),!a&&null!=s&&(0,t.jsx)(E,{pct:s,label:`CPU ${e.cpu_load_1min.toFixed(2)}/${e.cpu_cores}`}),!a&&null!=r&&(0,t.jsx)(E,{pct:r,label:`RAM ${e.mem_used_gb.toFixed(1)}/${e.mem_total_gb.toFixed(1)}G`}),a&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-dim)] font-mono italic",children:"CPU n/a · RAM n/a · offline"})]},e.hostname)}),o.length>0&&(0,t.jsx)("div",{className:"pt-1 text-[9px] text-[var(--fg-dim)] font-mono text-center",children:"live · refreshing every 5s"})]})]})}let A=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return A.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-screen",children:[(0,t.jsx)(m,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 flex flex-col",children:[(0,t.jsx)(g,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]}),(0,t.jsx)(N,{}),(0,t.jsx)(_,{}),(0,t.jsx)(L,{})]})}],22485)}]);
7
+ `,children:[(0,t.jsx)(x,{collapsed:h}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!h&&j.length>0&&(0,t.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,t.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,t.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("button",{onClick:()=>{b(e.network_id),g(!1)},title:e.network_id,className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${f===e.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,t.jsx)("span",{children:d[e.role||"member"]||"👤"}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.network_name}),e.agentCount?(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:e.agentCount}):null]},e.network_id))})]}),(0,t.jsx)("div",{className:"pb-20",children:w}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,t.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:h?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${h?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-2"}`,"aria-label":"Open command palette",children:[(0,t.jsxs)("span",{className:`flex items-center ${h?"":"gap-2"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!h&&"Quick search"]}),!h&&(0,t.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,t.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:h?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${h?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!h&&"Sign out"]}),(0,t.jsxs)("div",{className:`flex items-center gap-2 ${h?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,t.jsx)(o.ThemeSwitcher,{compact:h}),(0,t.jsx)("button",{onClick:()=>u(!h),title:h?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":h?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${h?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let m=e=>fetch(e).then(e=>e.ok?e.json():{sessions:[]});function x({collapsed:e}){let{data:a}=(0,n.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),r=a?.sessions||[],l=r.filter(e=>e.status&&"offline"!==e.status).length,o=r.length;return e?(0,t.jsx)(s.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,t.jsx)(u,{size:32})}):(0,t.jsxs)(s.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,t.jsx)(u,{size:32}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${l>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===o?(0,t.jsx)("span",{children:"waiting for agents"}):(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:l}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",o]})," online"]})]})]})]})}function u({size:e}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let p=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function g(){let e,a,{data:l,error:o}=(0,n.default)("/api/hub/stats",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:c}=(0,n.default)("/api/hub/health",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,h]=(0,r.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let m=o&&c||i&&!1===i.ok,x=l?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,u=l?.nodes?.total===0,g=null;if(m?(e="red",a="CommHub unreachable — agents may be offline",g={label:"Open Settings",href:"/settings"}):x>0?(e="amber",a=`${x} task${x>1?"s":""} failed recently`,g={label:"Review failures",href:"/tasks?status=failed"}):(u?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),g=null),"green"===e&&!l)return null;let f={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[e],b={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[e];return(0,t.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${f} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${b}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[g&&(0,t.jsxs)(s.default,{href:g.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[g.label," →"]}),g&&(0,t.jsx)(s.default,{href:g.href,"aria-label":g.label,className:"sm:hidden text-[11px] font-medium opacity-90 hover:opacity-100",children:"→"}),(0,t.jsx)("button",{onClick:()=>{h(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-50 hover:opacity-100 leading-none px-1",children:"×"})]})]})}let f="anet-cmdk-recents";function b(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function v(e){try{let t=b().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function y(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),r=0,n=0,l=0,o=0,i=[];for(;r<a.length&&n<s.length;)a[r]===s[n]?(l+=2+o,o++,i.push(r),(0===r||/[\s·:_/-]/.test(a[r-1]))&&(l+=4),n++):o=0,r++;return n<s.length?{score:-1,indices:[]}:{score:l-.05*Math.max(0,a.length-s.length),indices:i}}function k({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),r=Array.from(e);return(0,t.jsx)(t.Fragment,{children:r.map((e,a)=>s.has(a)?(0,t.jsx)("mark",{className:"anet-cmdk-mark",children:e},a):(0,t.jsx)("span",{children:e},a))})}function j({d:e}){return(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}let w=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(j,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:e=>e.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:e=>e.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:e=>e.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,t.jsx)(j,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:e=>e.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:e=>e.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,t.jsx)(j,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:e=>e.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:e=>e.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:e=>e.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:e=>e.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,t.jsx)(j,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:e=>e.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,t.jsx)(j,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber",t="light"===e||"mint"===e?"cyber":"light";document.documentElement.setAttribute("data-theme",t);try{localStorage.setItem("anet-theme",t)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,t.jsx)(j,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,t.jsx)(j,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,t.jsx)(j,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}}];function N(){let e=(0,a.useRouter)(),[s,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)(""),[i,c]=(0,r.useState)(0),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),n(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,r.useEffect)(()=>{s&&(o(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[h,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{s&&m(b())},[s]);let[x,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s)return;let e=!1;return(async()=>{try{let[a,s]=await Promise.all([fetch("/api/hub/status").then(e=>e.ok?e.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(e=>e.ok?e.json():{tasks:[]})]);if(e)return;let r=(a.sessions||[]).filter(e=>e.alias).slice(0,20).map(e=>({id:`agent-${e.alias}`,title:`Go to agent ${e.alias}`,hint:`${e.agent||"agent"} \xb7 ${e.status||"unknown"}`,group:"Agents",icon:(0,t.jsx)(j,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:t=>t.push(`/node?alias=${encodeURIComponent(e.alias)}`)})),n=(s.tasks||[]).filter(e=>e.task_id).slice(0,15).map(e=>({id:`task-${e.task_id}`,title:`Open task: ${(e.content||e.task_id||"").slice(0,50)}`,hint:`${e.from_name||"?"} → ${e.to_name||"?"} \xb7 ${e.status||""}`,group:"Tasks",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:t=>t.push(`/tasks/${encodeURIComponent(e.task_id)}`)}));u([...r,...n])}catch{}})(),()=>{e=!0}},[s]);let p=(0,r.useMemo)(()=>{let e=[...w,...x];if(!l.trim()){let t=h.map(t=>e.find(e=>e.id===t)).filter(e=>!!e).map(e=>({...e,group:"Recents"})),a=new Set(h);return[...t,...w.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=y(e.title,l),a=e.hint?y(e.hint,l):{score:-1,indices:[]},s=y(e.id,l);return{c:e,score:Math.max(t.score>=0?+t.score:-1/0,a.score>=0?.6*a.score:-1/0,s.score>=0?.3*s.score:-1/0),_titleHi:t.score>=0?t.indices:[],_hintHi:a.score>=0?a.indices:[]}}).filter(e=>e.score>-1/0);return t.sort((e,t)=>t.score-e.score),t.map(e=>({...e.c,_titleHi:e._titleHi,_hintHi:e._hintHi}))},[l,h,x]);if((0,r.useEffect)(()=>{i>=p.length&&c(0)},[p.length,i]),!s)return null;let g={};for(let e of p)(g[e.group]||=[]).push(e);let f=0;return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>n(!1),onKeyDown:t=>{if("Escape"===t.key)return void n(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,p.length-1));return}if("ArrowUp"===t.key){t.preventDefault(),c(e=>Math.max(e-1,0));return}if("Enter"===t.key){t.preventDefault();let a=p[i];a&&(v(a.id),a.perform(e),n(!1))}},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("input",{ref:d,value:l,onChange:e=>{o(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,t.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,t.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===p.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',l,'"']}):Object.entries(g).map(([a,s])=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:a}),s.map(a=>{let s=f++,r=s===i;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{v(a.id),a.perform(e),n(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${r?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:r?"text-cyan-400":"text-gray-500",children:a.icon}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block truncate",children:(0,t.jsx)(k,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(k,{text:a.hint,indices:a._hintHi||[]})})]}),r&&(0,t.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},a.id)})]},a))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let M=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan (empty canvas only)"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"},{keys:["click hub"],label:"Fit topology to canvas (R52)"},{keys:["hover legend"],label:"Highlight nodes of a status (R55)"},{keys:["hover signal"],label:"Highlight one flow edge (R56)"}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function _(){let[e,s]=(0,r.useState)(!1),n=(0,a.useRouter)(),l=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,r="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!r){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!r&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){l.current=Date.now();return}if(Date.now()-l.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),l.current=0,n.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),e)?(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>s(!1),children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,t.jsx)("button",{onClick:()=>s(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,t.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:M.map(e=>(0,t.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:e.group}),(0,t.jsx)("ul",{className:"space-y-1.5",children:e.items.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"flex items-center gap-1",children:e.keys.map((e,a)=>(0,t.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:e},a))}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:e.label})]},a))})]},e.group))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Press ",(0,t.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,t.jsxs)("span",{children:["or ",(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}let S=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");if(!t.ok)throw Error(`hub ${t.status}`);return t.json()};function E({pct:e,label:a}){let s=e>=85?{fill:"#ef4444",track:"rgb(239 68 68 / 0.16)"}:e>=60?{fill:"#f59e0b",track:"rgb(245 158 11 / 0.16)"}:{fill:"#10b981",track:"rgb(16 185 129 / 0.16)"},r=Math.max(0,Math.min(100,e));return(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between text-[10px] text-[var(--fg-muted)] font-mono",children:[(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"tabular-nums",children:[Math.round(r),"%"]})]}),(0,t.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:s.track},children:(0,t.jsx)("div",{className:"h-full transition-[width] duration-300 ease-out",style:{width:`${r}%`,background:s.fill}})})]})}function L(){let[e,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{"1"===localStorage.getItem("anet-servers-drawer")&&a(!0)}catch{}},[]);let{data:s,error:l}=(0,n.default)(e?"/api/hub/servers":null,S,{refreshInterval:5e3,dedupingInterval:3e3}),o=s?.servers??[],i=s?.unavailable===!0,c=o.filter(e=>"online"===e.status).length,d=e&&!s&&!l;return(0,t.jsxs)("aside",{className:"fixed right-0 top-20 z-40 hidden lg:flex flex-col rounded-l-xl border border-r-0 shadow-xl shadow-black/30 anet-fade-in",style:{background:"var(--bg-secondary)",borderColor:"var(--border)",width:e?296:40,maxHeight:"calc(100vh - 6rem)",transition:"width 200ms ease-out"},"aria-label":"Servers panel",children:[(0,t.jsxs)("button",{onClick:()=>a(e=>{let t=!e;try{localStorage.setItem("anet-servers-drawer",t?"1":"0")}catch{}return t}),"aria-expanded":e,"aria-label":e?"Collapse servers panel":"Expand servers panel",className:"flex items-center gap-2 px-2.5 py-2 border-b text-[11px] font-semibold tracking-wide select-none",style:{color:"var(--fg)",borderColor:"var(--border)"},children:[(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"7",r:"0.7",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"17",r:"0.7",fill:"currentColor"})]}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:"Servers"}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono",children:[c,"/",o.length]})]})]}),e&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-2 py-2 space-y-2","data-servers-body":!0,children:[d&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"loading servers…"}),l&&!s&&(0,t.jsx)("div",{className:"rounded-md border px-2.5 py-2 text-[10px] font-mono",style:{background:"rgb(239 68 68 / 0.06)",borderColor:"rgb(239 68 68 / 0.25)",color:"#ef4444"},children:"hub unreachable · retrying every 5s"}),i&&(0,t.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-3 leading-relaxed",children:["host telemetry not available",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[var(--fg-dim)]",children:"upgrade commhub-server ≥ 0.8.1-preview.2"})]}),!d&&!l&&!i&&0===o.length&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"no servers reporting yet"}),o.map(e=>{let a="offline"===e.status,s=null!=e.cpu_load_1min&&e.cpu_cores>0?e.cpu_load_1min/e.cpu_cores*100:null,r=null!=e.mem_used_gb&&null!=e.mem_total_gb&&e.mem_total_gb>0?e.mem_used_gb/e.mem_total_gb*100:null;return(0,t.jsxs)("div",{className:"rounded-lg border px-2.5 py-2 space-y-1.5",style:{background:"var(--bg)",borderColor:"var(--border)",opacity:a?.55:1},title:e.ip?`${e.hostname} \xb7 ${e.ip}`:e.hostname,children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono text-[12px] font-semibold truncate",style:{color:"var(--fg)"},children:e.hostname}),e.note&&(0,t.jsxs)("span",{className:"text-[9px] text-[var(--fg-dim)]",children:["(",e.note,")"]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono tabular-nums shrink-0",children:[e.agent_count," agent",1===e.agent_count?"":"s"]})]}),!a&&null!=s&&(0,t.jsx)(E,{pct:s,label:`CPU ${e.cpu_load_1min.toFixed(2)}/${e.cpu_cores}`}),!a&&null!=r&&(0,t.jsx)(E,{pct:r,label:`RAM ${e.mem_used_gb.toFixed(1)}/${e.mem_total_gb.toFixed(1)}G`}),a&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-dim)] font-mono italic",children:"CPU n/a · RAM n/a · offline"})]},e.hostname)}),o.length>0&&(0,t.jsx)("div",{className:"pt-1 text-[9px] text-[var(--fg-dim)] font-mono text-center",children:"live · refreshing every 5s"})]})]})}let A=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return A.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-screen",children:[(0,t.jsx)(h,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 flex flex-col",children:[(0,t.jsx)(g,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]}),(0,t.jsx)(N,{}),(0,t.jsx)(_,{}),(0,t.jsx)(L,{})]})}],22485)}]);
package/.next/trace CHANGED
@@ -1,2 +1,2 @@
1
- [{"name":"generate-buildid","duration":309,"timestamp":27420479105,"id":4,"parentId":1,"tags":{},"startTime":1778835392725,"traceId":"0bb6f9b44302ff8f"},{"name":"load-custom-routes","duration":664,"timestamp":27420479601,"id":5,"parentId":1,"tags":{},"startTime":1778835392726,"traceId":"0bb6f9b44302ff8f"},{"name":"create-dist-dir","duration":844,"timestamp":27420480333,"id":6,"parentId":1,"tags":{},"startTime":1778835392727,"traceId":"0bb6f9b44302ff8f"},{"name":"clean","duration":504,"timestamp":27420481855,"id":7,"parentId":1,"tags":{},"startTime":1778835392728,"traceId":"0bb6f9b44302ff8f"},{"name":"discover-routes","duration":10617,"timestamp":27420578154,"id":8,"parentId":1,"tags":{},"startTime":1778835392824,"traceId":"0bb6f9b44302ff8f"},{"name":"create-root-mapping","duration":200,"timestamp":27420588854,"id":9,"parentId":1,"tags":{},"startTime":1778835392835,"traceId":"0bb6f9b44302ff8f"},{"name":"generate-route-types","duration":34902,"timestamp":27420591904,"id":10,"parentId":1,"tags":{},"startTime":1778835392838,"traceId":"0bb6f9b44302ff8f"},{"name":"public-dir-conflict-check","duration":124,"timestamp":27420626963,"id":11,"parentId":1,"tags":{},"startTime":1778835392873,"traceId":"0bb6f9b44302ff8f"},{"name":"generate-routes-manifest","duration":4888,"timestamp":27420627241,"id":12,"parentId":1,"tags":{},"startTime":1778835392874,"traceId":"0bb6f9b44302ff8f"},{"name":"run-turbopack","duration":7131184,"timestamp":27420638535,"id":14,"parentId":1,"tags":{},"startTime":1778835392885,"traceId":"0bb6f9b44302ff8f"},{"name":"turbopack-build-events","duration":101,"timestamp":27420959584,"id":15,"parentId":1,"tags":{},"startTime":1778835393206,"traceId":"0bb6f9b44302ff8f"},{"name":"run-typescript","duration":9552366,"timestamp":27427779648,"id":16,"parentId":1,"tags":{},"startTime":1778835400026,"traceId":"0bb6f9b44302ff8f"},{"name":"generate-required-server-files","duration":2838,"timestamp":27437333370,"id":18,"parentId":1,"tags":{},"startTime":1778835409580,"traceId":"0bb6f9b44302ff8f"},{"name":"check-static-error-page","duration":13537,"timestamp":27437532601,"id":20,"parentId":19,"tags":{},"startTime":1778835409779,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":649865,"timestamp":27437550484,"id":67,"parentId":28,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":661763,"timestamp":27437538727,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":681511,"timestamp":27437550750,"id":69,"parentId":30,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":693417,"timestamp":27437538934,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":742448,"timestamp":27437550998,"id":70,"parentId":32,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":754204,"timestamp":27437539322,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778835409786,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":752757,"timestamp":27437548448,"id":63,"parentId":22,"tags":{},"startTime":1778835409795,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":765540,"timestamp":27437535767,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778835409782,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":773829,"timestamp":27437551092,"id":71,"parentId":33,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":785577,"timestamp":27437539466,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778835409786,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":808815,"timestamp":27437548592,"id":64,"parentId":25,"tags":{},"startTime":1778835409795,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":819228,"timestamp":27437538264,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":807492,"timestamp":27437550275,"id":66,"parentId":27,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":819186,"timestamp":27437538630,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":808722,"timestamp":27437550158,"id":65,"parentId":26,"tags":{},"startTime":1778835409796,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":820490,"timestamp":27437538434,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":820974,"timestamp":27437551185,"id":73,"parentId":35,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":832504,"timestamp":27437539735,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778835409786,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":821117,"timestamp":27437551323,"id":76,"parentId":38,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":831913,"timestamp":27437540567,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":822897,"timestamp":27437551332,"id":77,"parentId":39,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":833584,"timestamp":27437540685,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":830620,"timestamp":27437551308,"id":75,"parentId":37,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":841569,"timestamp":27437540411,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":834453,"timestamp":27437551355,"id":79,"parentId":41,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":844919,"timestamp":27437540944,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":836563,"timestamp":27437551367,"id":80,"parentId":42,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":846892,"timestamp":27437541090,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":839081,"timestamp":27437551374,"id":81,"parentId":43,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":849315,"timestamp":27437541191,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":841494,"timestamp":27437551386,"id":82,"parentId":44,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":851643,"timestamp":27437541281,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778835409788,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":845232,"timestamp":27437548091,"id":62,"parentId":21,"tags":{},"startTime":1778835409794,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":859157,"timestamp":27437534215,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778835409780,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":843918,"timestamp":27437551396,"id":83,"parentId":45,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":853991,"timestamp":27437541363,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778835409788,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":847007,"timestamp":27437551408,"id":84,"parentId":46,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":857019,"timestamp":27437541435,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778835409788,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":849033,"timestamp":27437551430,"id":86,"parentId":48,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":857121,"timestamp":27437543385,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778835409790,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":851436,"timestamp":27437551442,"id":87,"parentId":49,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":859402,"timestamp":27437543517,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778835409790,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":858871,"timestamp":27437551343,"id":78,"parentId":40,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":869418,"timestamp":27437540840,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778835409787,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":859956,"timestamp":27437550607,"id":68,"parentId":29,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":871769,"timestamp":27437538830,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":852353,"timestamp":27437558384,"id":89,"parentId":31,"tags":{},"startTime":1778835409805,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":871735,"timestamp":27437539043,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778835409785,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":853675,"timestamp":27437557228,"id":88,"parentId":24,"tags":{},"startTime":1778835409804,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":874711,"timestamp":27437536219,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778835409782,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":893076,"timestamp":27437551278,"id":74,"parentId":36,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":904230,"timestamp":27437540205,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778835409786,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":916520,"timestamp":27437561217,"id":92,"parentId":51,"tags":{},"startTime":1778835409807,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":933728,"timestamp":27437544097,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778835409790,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":935014,"timestamp":27437561258,"id":95,"parentId":54,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":951817,"timestamp":27437544529,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778835409791,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":947907,"timestamp":27437551159,"id":72,"parentId":34,"tags":{},"startTime":1778835409797,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":959549,"timestamp":27437539593,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778835409786,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":943086,"timestamp":27437561267,"id":96,"parentId":56,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":959267,"timestamp":27437545147,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778835409791,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":950335,"timestamp":27437561296,"id":98,"parentId":59,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":965981,"timestamp":27437545712,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778835409792,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":954205,"timestamp":27437561170,"id":90,"parentId":23,"tags":{},"startTime":1778835409807,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":979448,"timestamp":27437535991,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778835409782,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":957981,"timestamp":27437561244,"id":94,"parentId":53,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":974915,"timestamp":27437544387,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778835409791,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":961574,"timestamp":27437561327,"id":100,"parentId":61,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":977031,"timestamp":27437545922,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778835409792,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":959236,"timestamp":27437567437,"id":101,"parentId":58,"tags":{},"startTime":1778835409814,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":981301,"timestamp":27437545431,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778835409792,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":947184,"timestamp":27437583934,"id":102,"parentId":55,"tags":{},"startTime":1778835409830,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":986477,"timestamp":27437544694,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778835409791,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":974588,"timestamp":27437561309,"id":99,"parentId":60,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":990154,"timestamp":27437545827,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778835409792,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":989851,"timestamp":27437551418,"id":85,"parentId":47,"tags":{},"startTime":1778835409798,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":999798,"timestamp":27437541527,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778835409788,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":980360,"timestamp":27437561231,"id":93,"parentId":52,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":997386,"timestamp":27437544241,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778835409791,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":988991,"timestamp":27437561205,"id":91,"parentId":50,"tags":{},"startTime":1778835409807,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":1006334,"timestamp":27437543918,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778835409790,"traceId":"0bb6f9b44302ff8f"},{"name":"is-page-static","duration":998061,"timestamp":27437561281,"id":97,"parentId":57,"tags":{},"startTime":1778835409808,"traceId":"0bb6f9b44302ff8f"},{"name":"check-page","duration":1014106,"timestamp":27437545306,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778835409792,"traceId":"0bb6f9b44302ff8f"},{"name":"static-check","duration":1028000,"timestamp":27437531461,"id":19,"parentId":1,"tags":{},"startTime":1778835409778,"traceId":"0bb6f9b44302ff8f"},{"name":"write-routes-manifest","duration":487,"timestamp":27438568849,"id":104,"parentId":1,"tags":{},"startTime":1778835410815,"traceId":"0bb6f9b44302ff8f"},{"name":"load-dotenv","duration":70,"timestamp":27438583868,"id":107,"parentId":106,"tags":{},"startTime":1778835410830,"traceId":"0bb6f9b44302ff8f"},{"name":"run-export-path-map","duration":891,"timestamp":27438589652,"id":108,"parentId":106,"tags":{},"startTime":1778835410836,"traceId":"0bb6f9b44302ff8f"},{"name":"next-export","duration":709986,"timestamp":27438581356,"id":106,"parentId":1,"tags":{},"startTime":1778835410828,"traceId":"0bb6f9b44302ff8f"}]
2
- [{"name":"move-exported-app-not-found-","duration":4063,"timestamp":27439295677,"id":109,"parentId":105,"tags":{},"startTime":1778835411542,"traceId":"0bb6f9b44302ff8f"},{"name":"move-exported-app-global-error-","duration":709,"timestamp":27439299870,"id":110,"parentId":105,"tags":{},"startTime":1778835411546,"traceId":"0bb6f9b44302ff8f"},{"name":"static-generation","duration":728882,"timestamp":27438573925,"id":105,"parentId":1,"tags":{},"startTime":1778835410820,"traceId":"0bb6f9b44302ff8f"},{"name":"write-routes-manifest","duration":390,"timestamp":27439302958,"id":111,"parentId":1,"tags":{},"startTime":1778835411549,"traceId":"0bb6f9b44302ff8f"},{"name":"print-tree-view","duration":4774,"timestamp":27439311272,"id":112,"parentId":1,"tags":{},"startTime":1778835411558,"traceId":"0bb6f9b44302ff8f"},{"name":"write-route-bundle-stats","duration":21616,"timestamp":27439316079,"id":113,"parentId":1,"tags":{},"startTime":1778835411562,"traceId":"0bb6f9b44302ff8f"},{"name":"telemetry-flush","duration":27120,"timestamp":27439337748,"id":114,"parentId":1,"tags":{},"startTime":1778835411584,"traceId":"0bb6f9b44302ff8f"},{"name":"next-build","duration":18947190,"timestamp":27420417716,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778835392664,"traceId":"0bb6f9b44302ff8f"}]
1
+ [{"name":"generate-buildid","duration":363,"timestamp":28054378455,"id":4,"parentId":1,"tags":{},"startTime":1778836026625,"traceId":"175da57b39a1510b"},{"name":"load-custom-routes","duration":488,"timestamp":28054378980,"id":5,"parentId":1,"tags":{},"startTime":1778836026625,"traceId":"175da57b39a1510b"},{"name":"create-dist-dir","duration":638,"timestamp":28054379509,"id":6,"parentId":1,"tags":{},"startTime":1778836026626,"traceId":"175da57b39a1510b"},{"name":"clean","duration":475,"timestamp":28054380743,"id":7,"parentId":1,"tags":{},"startTime":1778836026627,"traceId":"175da57b39a1510b"},{"name":"discover-routes","duration":9963,"timestamp":28054463869,"id":8,"parentId":1,"tags":{},"startTime":1778836026710,"traceId":"175da57b39a1510b"},{"name":"create-root-mapping","duration":136,"timestamp":28054473896,"id":9,"parentId":1,"tags":{},"startTime":1778836026720,"traceId":"175da57b39a1510b"},{"name":"generate-route-types","duration":31049,"timestamp":28054476240,"id":10,"parentId":1,"tags":{},"startTime":1778836026723,"traceId":"175da57b39a1510b"},{"name":"public-dir-conflict-check","duration":149,"timestamp":28054507445,"id":11,"parentId":1,"tags":{},"startTime":1778836026754,"traceId":"175da57b39a1510b"},{"name":"generate-routes-manifest","duration":4048,"timestamp":28054507736,"id":12,"parentId":1,"tags":{},"startTime":1778836026754,"traceId":"175da57b39a1510b"},{"name":"run-turbopack","duration":5901291,"timestamp":28054517036,"id":14,"parentId":1,"tags":{},"startTime":1778836026763,"traceId":"175da57b39a1510b"},{"name":"turbopack-build-events","duration":97,"timestamp":28054820635,"id":15,"parentId":1,"tags":{},"startTime":1778836027067,"traceId":"175da57b39a1510b"},{"name":"run-typescript","duration":8918660,"timestamp":28060432251,"id":16,"parentId":1,"tags":{},"startTime":1778836032679,"traceId":"175da57b39a1510b"},{"name":"generate-required-server-files","duration":2019,"timestamp":28069351862,"id":18,"parentId":1,"tags":{},"startTime":1778836041598,"traceId":"175da57b39a1510b"},{"name":"check-static-error-page","duration":15089,"timestamp":28069532453,"id":20,"parentId":19,"tags":{},"startTime":1778836041779,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":442070,"timestamp":28069550377,"id":63,"parentId":22,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":457042,"timestamp":28069535584,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778836041782,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":552680,"timestamp":28069551026,"id":67,"parentId":28,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":564466,"timestamp":28069539340,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778836041786,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":564194,"timestamp":28069550511,"id":64,"parentId":25,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":575997,"timestamp":28069538794,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778836041785,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":568887,"timestamp":28069551500,"id":70,"parentId":32,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":580396,"timestamp":28069540115,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778836041786,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":586651,"timestamp":28069551330,"id":69,"parentId":30,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":598416,"timestamp":28069539662,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778836041786,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":588720,"timestamp":28069551556,"id":71,"parentId":33,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":600059,"timestamp":28069540272,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778836041787,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":593011,"timestamp":28069550645,"id":65,"parentId":26,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":604658,"timestamp":28069539050,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778836041785,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":592666,"timestamp":28069551677,"id":73,"parentId":35,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":603831,"timestamp":28069540555,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778836041787,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":595325,"timestamp":28069551647,"id":72,"parentId":34,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":606627,"timestamp":28069540412,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778836041787,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":598051,"timestamp":28069550091,"id":62,"parentId":21,"tags":{},"startTime":1778836041796,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":614133,"timestamp":28069534046,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778836041780,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":598236,"timestamp":28069551814,"id":75,"parentId":37,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":608796,"timestamp":28069541294,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":604936,"timestamp":28069551830,"id":76,"parentId":38,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":615353,"timestamp":28069541450,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":605832,"timestamp":28069551788,"id":74,"parentId":36,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":616568,"timestamp":28069541103,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778836041787,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":606384,"timestamp":28069551843,"id":77,"parentId":39,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":616707,"timestamp":28069541568,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":614765,"timestamp":28069551878,"id":80,"parentId":42,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":624749,"timestamp":28069541947,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":615705,"timestamp":28069551191,"id":68,"parentId":29,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":627444,"timestamp":28069539481,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778836041786,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":616280,"timestamp":28069551899,"id":82,"parentId":44,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":626016,"timestamp":28069542211,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":617612,"timestamp":28069550765,"id":66,"parentId":27,"tags":{},"startTime":1778836041797,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":629204,"timestamp":28069539199,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778836041785,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":616628,"timestamp":28069551890,"id":81,"parentId":43,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":626448,"timestamp":28069542089,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":616795,"timestamp":28069551865,"id":79,"parentId":41,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":626861,"timestamp":28069541821,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":619580,"timestamp":28069551911,"id":83,"parentId":45,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":629202,"timestamp":28069542332,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778836041789,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":623929,"timestamp":28069551959,"id":87,"parentId":49,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":633069,"timestamp":28069542867,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778836041789,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":619486,"timestamp":28069557268,"id":89,"parentId":31,"tags":{},"startTime":1778836041804,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":636996,"timestamp":28069539803,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778836041786,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":627701,"timestamp":28069551932,"id":85,"parentId":47,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":637074,"timestamp":28069542613,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778836041789,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":623742,"timestamp":28069556127,"id":88,"parentId":24,"tags":{},"startTime":1778836041802,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":643724,"timestamp":28069536188,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778836041782,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":628140,"timestamp":28069551945,"id":86,"parentId":48,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":637379,"timestamp":28069542744,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778836041789,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":675818,"timestamp":28069551923,"id":84,"parentId":46,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":685362,"timestamp":28069542455,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778836041789,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":710920,"timestamp":28069560022,"id":92,"parentId":51,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":727465,"timestamp":28069543571,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778836041790,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":719399,"timestamp":28069551852,"id":78,"parentId":40,"tags":{},"startTime":1778836041798,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":729583,"timestamp":28069541705,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778836041788,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":711494,"timestamp":28069559962,"id":90,"parentId":23,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":735602,"timestamp":28069535897,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778836041782,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":711675,"timestamp":28069560030,"id":93,"parentId":52,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":727943,"timestamp":28069543805,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778836041790,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":711922,"timestamp":28069559992,"id":91,"parentId":50,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":728594,"timestamp":28069543354,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778836041790,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":712064,"timestamp":28069560041,"id":94,"parentId":53,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":728070,"timestamp":28069544094,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778836041790,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":718979,"timestamp":28069560109,"id":100,"parentId":61,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":731915,"timestamp":28069547218,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778836041793,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":719165,"timestamp":28069560063,"id":96,"parentId":56,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":733700,"timestamp":28069545563,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778836041792,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":719399,"timestamp":28069560071,"id":97,"parentId":57,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":733647,"timestamp":28069545855,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778836041792,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":710572,"timestamp":28069569105,"id":101,"parentId":55,"tags":{},"startTime":1778836041815,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":734984,"timestamp":28069544716,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778836041791,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":719738,"timestamp":28069560083,"id":98,"parentId":59,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":733024,"timestamp":28069546820,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778836041793,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":710273,"timestamp":28069573901,"id":102,"parentId":58,"tags":{},"startTime":1778836041820,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":738058,"timestamp":28069546147,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778836041792,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":725146,"timestamp":28069560098,"id":99,"parentId":60,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":738252,"timestamp":28069547023,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778836041793,"traceId":"175da57b39a1510b"},{"name":"is-page-static","duration":732518,"timestamp":28069560052,"id":95,"parentId":54,"tags":{},"startTime":1778836041806,"traceId":"175da57b39a1510b"},{"name":"check-page","duration":748233,"timestamp":28069544382,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778836041791,"traceId":"175da57b39a1510b"},{"name":"static-check","duration":761210,"timestamp":28069531447,"id":19,"parentId":1,"tags":{},"startTime":1778836041778,"traceId":"175da57b39a1510b"},{"name":"write-routes-manifest","duration":449,"timestamp":28070299039,"id":104,"parentId":1,"tags":{},"startTime":1778836042545,"traceId":"175da57b39a1510b"},{"name":"load-dotenv","duration":45,"timestamp":28070310448,"id":107,"parentId":106,"tags":{},"startTime":1778836042557,"traceId":"175da57b39a1510b"},{"name":"run-export-path-map","duration":662,"timestamp":28070314288,"id":108,"parentId":106,"tags":{},"startTime":1778836042561,"traceId":"175da57b39a1510b"},{"name":"next-export","duration":605570,"timestamp":28070309258,"id":106,"parentId":1,"tags":{},"startTime":1778836042556,"traceId":"175da57b39a1510b"}]
2
+ [{"name":"move-exported-app-not-found-","duration":2689,"timestamp":28070918491,"id":109,"parentId":105,"tags":{},"startTime":1778836043165,"traceId":"175da57b39a1510b"},{"name":"move-exported-app-global-error-","duration":873,"timestamp":28070921263,"id":110,"parentId":105,"tags":{},"startTime":1778836043168,"traceId":"175da57b39a1510b"},{"name":"static-generation","duration":620040,"timestamp":28070303741,"id":105,"parentId":1,"tags":{},"startTime":1778836042550,"traceId":"175da57b39a1510b"},{"name":"write-routes-manifest","duration":362,"timestamp":28070923926,"id":111,"parentId":1,"tags":{},"startTime":1778836043170,"traceId":"175da57b39a1510b"},{"name":"print-tree-view","duration":3706,"timestamp":28070942158,"id":112,"parentId":1,"tags":{},"startTime":1778836043188,"traceId":"175da57b39a1510b"},{"name":"write-route-bundle-stats","duration":14514,"timestamp":28070945898,"id":113,"parentId":1,"tags":{},"startTime":1778836043192,"traceId":"175da57b39a1510b"},{"name":"telemetry-flush","duration":45525,"timestamp":28070960452,"id":114,"parentId":1,"tags":{},"startTime":1778836043207,"traceId":"175da57b39a1510b"},{"name":"next-build","duration":16677195,"timestamp":28054328853,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778836026575,"traceId":"175da57b39a1510b"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":7131184,"timestamp":27420638535,"id":14,"parentId":1,"tags":{},"startTime":1778835392885,"traceId":"0bb6f9b44302ff8f"},{"name":"turbopack-build-events","duration":101,"timestamp":27420959584,"id":15,"parentId":1,"tags":{},"startTime":1778835393206,"traceId":"0bb6f9b44302ff8f"},{"name":"run-typescript","duration":9552366,"timestamp":27427779648,"id":16,"parentId":1,"tags":{},"startTime":1778835400026,"traceId":"0bb6f9b44302ff8f"},{"name":"static-check","duration":1028000,"timestamp":27437531461,"id":19,"parentId":1,"tags":{},"startTime":1778835409778,"traceId":"0bb6f9b44302ff8f"},{"name":"static-generation","duration":728882,"timestamp":27438573925,"id":105,"parentId":1,"tags":{},"startTime":1778835410820,"traceId":"0bb6f9b44302ff8f"},{"name":"telemetry-flush","duration":27120,"timestamp":27439337748,"id":114,"parentId":1,"tags":{},"startTime":1778835411584,"traceId":"0bb6f9b44302ff8f"},{"name":"next-build","duration":18947190,"timestamp":27420417716,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778835392664,"traceId":"0bb6f9b44302ff8f"}]
1
+ [{"name":"run-turbopack","duration":5901291,"timestamp":28054517036,"id":14,"parentId":1,"tags":{},"startTime":1778836026763,"traceId":"175da57b39a1510b"},{"name":"turbopack-build-events","duration":97,"timestamp":28054820635,"id":15,"parentId":1,"tags":{},"startTime":1778836027067,"traceId":"175da57b39a1510b"},{"name":"run-typescript","duration":8918660,"timestamp":28060432251,"id":16,"parentId":1,"tags":{},"startTime":1778836032679,"traceId":"175da57b39a1510b"},{"name":"static-check","duration":761210,"timestamp":28069531447,"id":19,"parentId":1,"tags":{},"startTime":1778836041778,"traceId":"175da57b39a1510b"},{"name":"static-generation","duration":620040,"timestamp":28070303741,"id":105,"parentId":1,"tags":{},"startTime":1778836042550,"traceId":"175da57b39a1510b"},{"name":"telemetry-flush","duration":45525,"timestamp":28070960452,"id":114,"parentId":1,"tags":{},"startTime":1778836043207,"traceId":"175da57b39a1510b"},{"name":"next-build","duration":16677195,"timestamp":28054328853,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778836026575,"traceId":"175da57b39a1510b"}]
@@ -58,8 +58,15 @@ const SHORTCUTS: { group: string; items: Shortcut[] }[] = [
58
58
  { keys: ['l'], label: 'Toggle layout (ring ↔ grid)' },
59
59
  { keys: ['⌘', 'wheel'], label: 'Zoom toward cursor (Ctrl on Windows/Linux)' },
60
60
  { keys: ['drag'], label: 'Pan the canvas (cursor → grabbing)' },
61
- { keys: ['dbl-click'], label: 'Reset zoom + pan' },
61
+ { keys: ['dbl-click'], label: 'Reset zoom + pan (empty canvas only)' },
62
62
  { keys: ['click'], label: 'Open chat popover on a node (Esc to close)' },
63
+ // Round 59 / Loop: discoverability for the interactions added in
64
+ // R52 (hub click), R55 (legend status hover), R56 (recent-signal
65
+ // row hover). All three live inside the topology canvas, so this
66
+ // is the right group for the new entries.
67
+ { keys: ['click hub'], label: 'Fit topology to canvas (R52)' },
68
+ { keys: ['hover legend'], label: 'Highlight nodes of a status (R55)' },
69
+ { keys: ['hover signal'], label: 'Highlight one flow edge (R56)' },
63
70
  ],
64
71
  },
65
72
  ];
@@ -785,6 +785,15 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
785
785
  // Now it answers "show me all of these" the same way R8 group-focus
786
786
  // answers "show me this team". Three values match the legend rows.
787
787
  const [hoveredStatus, setHoveredStatus] = useState<'working' | 'idle' | 'offline' | null>(null);
788
+ // Round 60 / Loop: sticky variant of `hoveredStatus`. R55 only filters
789
+ // while the user is actively hovering the legend; for sweeping a fleet
790
+ // you want to LOCK the filter. Each segment of the R31 pressure bar
791
+ // toggles a pin — click again on the same segment to release. The node
792
+ // opacity formula reads `activeStatus = hoveredStatus ?? pinnedStatus`
793
+ // so hover transiently overrides a pin (handy for spot-comparison)
794
+ // without nuking it.
795
+ const [pinnedStatus, setPinnedStatus] = useState<'working' | 'idle' | 'offline' | null>(null);
796
+ const activeStatus = hoveredStatus ?? pinnedStatus;
788
797
  const hoveredEdgeEndpoints = useMemo<Set<string> | null>(() => {
789
798
  if (!hoveredEdgeKey) return null;
790
799
  const link = flowLinks.find(l => l.key === hoveredEdgeKey);
@@ -1084,9 +1093,45 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
1084
1093
  const o = offlineNodes.length;
1085
1094
  const total = w + i + o;
1086
1095
  if (total === 0) return null;
1087
- const seg = (n: number, color: string, key: string) => {
1096
+ // Round 60 / Loop: each segment toggles a sticky filter via
1097
+ // `pinnedStatus`. Click the working segment → all non-working
1098
+ // nodes dim; click again → release. Segments share width with
1099
+ // their proportion of `total`, so a 1-node working share is
1100
+ // ~3 px wide on a 64-px bar. We pad the click target with a
1101
+ // negative-margin overlay wrapper to give thin slices a
1102
+ // 14-px minimum hit area without disturbing the rendered
1103
+ // chip width. cursor:pointer + a one-line title hint at the
1104
+ // affordance.
1105
+ const seg = (n: number, color: string, key: 'working' | 'idle' | 'offline', label: string) => {
1088
1106
  if (n === 0) return null;
1089
- return <span key={key} style={{ width: `${(n / total) * 100}%`, background: color, height: '100%' }} />;
1107
+ const isPinned = pinnedStatus === key;
1108
+ return (
1109
+ <span
1110
+ key={key}
1111
+ data-pressure-seg={key}
1112
+ role="button"
1113
+ tabIndex={0}
1114
+ aria-pressed={isPinned}
1115
+ title={`${n} ${label} — click to ${isPinned ? 'release filter' : 'highlight'}`}
1116
+ style={{
1117
+ width: `${(n / total) * 100}%`,
1118
+ background: color,
1119
+ height: '100%',
1120
+ cursor: 'pointer',
1121
+ boxShadow: isPinned ? `inset 0 0 0 1px ${color}, inset 0 0 0 2px rgba(255,255,255,0.6)` : undefined,
1122
+ }}
1123
+ onClick={(e) => {
1124
+ e.stopPropagation();
1125
+ setPinnedStatus(prev => prev === key ? null : key);
1126
+ }}
1127
+ onKeyDown={(e) => {
1128
+ if (e.key === 'Enter' || e.key === ' ') {
1129
+ e.preventDefault();
1130
+ setPinnedStatus(prev => prev === key ? null : key);
1131
+ }
1132
+ }}
1133
+ />
1134
+ );
1090
1135
  };
1091
1136
  // Round 47 / Loop: hidden on mobile — at <640px the chip row
1092
1137
  // wraps to multiple lines and crowds the topology header;
@@ -1100,9 +1145,9 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
1100
1145
  >
1101
1146
  <span className="text-[10px] tracking-wide">pressure</span>
1102
1147
  <span className="inline-flex h-1.5 w-16 rounded-full overflow-hidden" style={{ background: 'rgb(75 85 99 / 0.25)' }}>
1103
- {seg(w, isLight ? '#059669' : '#22c55e', 'w')}
1104
- {seg(i, isLight ? '#0d9488' : '#2dd4bf', 'i')}
1105
- {seg(o, isLight ? '#94a3b8' : '#6b7280', 'o')}
1148
+ {seg(w, isLight ? '#059669' : '#22c55e', 'working', 'working')}
1149
+ {seg(i, isLight ? '#0d9488' : '#2dd4bf', 'idle', 'idle')}
1150
+ {seg(o, isLight ? '#94a3b8' : '#6b7280', 'offline', 'offline')}
1106
1151
  </span>
1107
1152
  </span>
1108
1153
  );
@@ -1715,14 +1760,17 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
1715
1760
  // Round 55 / Loop: legend-status hover composes on the
1716
1761
  // SAME level as edge-hover-endpoint. Non-matching nodes
1717
1762
  // dim to 0.28; matching nodes stay at their base.
1718
- // hoveredStatus matches: working = status==='working',
1763
+ // activeStatus matches: working = status==='working',
1719
1764
  // idle = online but not working, offline = !isOnline.
1765
+ // Round 60 / Loop: activeStatus = hoveredStatus ?? pinnedStatus
1766
+ // so the pressure-bar segment pins (R60) and the legend
1767
+ // row hover (R55) feed the same branch.
1720
1768
  opacity: hoveredEdgeEndpoints && !hoveredEdgeEndpoints.has(session.alias) && chatAlias !== session.alias
1721
1769
  ? 0.28
1722
- : hoveredStatus && chatAlias !== session.alias && !(
1723
- hoveredStatus === 'working' ? session.status === 'working'
1724
- : hoveredStatus === 'idle' ? (isOnline && session.status !== 'working')
1725
- : /* offline */ !isOnline
1770
+ : activeStatus && chatAlias !== session.alias && !(
1771
+ activeStatus === 'working' ? session.status === 'working'
1772
+ : activeStatus === 'idle' ? (isOnline && session.status !== 'working')
1773
+ : /* offline */ !isOnline
1726
1774
  )
1727
1775
  ? 0.28
1728
1776
  : !inFocus
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network-dashboard",
3
- "version": "0.4.6-preview.65",
3
+ "version": "0.4.6-preview.67",
4
4
  "description": "Agent Network Dashboard — Web UI for managing AI Agent networks",
5
5
  "scripts": {
6
6
  "dev": "next dev",