@sleep2agi/agent-network-dashboard 0.5.7-preview.13 → 0.5.7-preview.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +33 -33
  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 +3 -3
  15. package/.next/server/app/_not-found.rsc +13 -13
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  17. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  18. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  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 +2 -2
  22. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/admin.html +3 -3
  24. package/.next/server/app/admin.rsc +15 -15
  25. package/.next/server/app/admin.segments/_full.segment.rsc +15 -15
  26. package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
  27. package/.next/server/app/admin.segments/_index.segment.rsc +8 -8
  28. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  32. package/.next/server/app/index.rsc +15 -15
  33. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  34. package/.next/server/app/index.segments/_full.segment.rsc +15 -15
  35. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  36. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  37. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  38. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/login.html +2 -2
  40. package/.next/server/app/login.rsc +15 -15
  41. package/.next/server/app/login.segments/_full.segment.rsc +15 -15
  42. package/.next/server/app/login.segments/_head.segment.rsc +4 -4
  43. package/.next/server/app/login.segments/_index.segment.rsc +8 -8
  44. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  49. package/.next/server/app/logs.rsc +15 -15
  50. package/.next/server/app/logs.segments/_full.segment.rsc +15 -15
  51. package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
  52. package/.next/server/app/logs.segments/_index.segment.rsc +8 -8
  53. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  58. package/.next/server/app/messages.rsc +15 -15
  59. package/.next/server/app/messages.segments/_full.segment.rsc +15 -15
  60. package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
  61. package/.next/server/app/messages.segments/_index.segment.rsc +8 -8
  62. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  67. package/.next/server/app/node.rsc +15 -15
  68. package/.next/server/app/node.segments/_full.segment.rsc +15 -15
  69. package/.next/server/app/node.segments/_head.segment.rsc +4 -4
  70. package/.next/server/app/node.segments/_index.segment.rsc +8 -8
  71. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  76. package/.next/server/app/nodes.rsc +15 -15
  77. package/.next/server/app/nodes.segments/_full.segment.rsc +15 -15
  78. package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
  79. package/.next/server/app/nodes.segments/_index.segment.rsc +8 -8
  80. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  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 +3 -3
  86. package/.next/server/app/server-logs.rsc +15 -15
  87. package/.next/server/app/server-logs.segments/_full.segment.rsc +15 -15
  88. package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
  89. package/.next/server/app/server-logs.segments/_index.segment.rsc +8 -8
  90. package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
  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/servers/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/servers.html +3 -3
  95. package/.next/server/app/servers.rsc +15 -15
  96. package/.next/server/app/servers.segments/_full.segment.rsc +15 -15
  97. package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
  98. package/.next/server/app/servers.segments/_index.segment.rsc +8 -8
  99. package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
  100. package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +4 -4
  101. package/.next/server/app/servers.segments/servers.segment.rsc +3 -3
  102. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/settings/networks.html +3 -3
  104. package/.next/server/app/settings/networks.rsc +15 -15
  105. package/.next/server/app/settings/networks.segments/_full.segment.rsc +15 -15
  106. package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
  107. package/.next/server/app/settings/networks.segments/_index.segment.rsc +8 -8
  108. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  109. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
  110. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
  111. package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
  112. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  113. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/settings/tokens.html +3 -3
  115. package/.next/server/app/settings/tokens.rsc +15 -15
  116. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +15 -15
  117. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
  118. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +8 -8
  119. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
  121. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
  122. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
  123. package/.next/server/app/settings.html +3 -3
  124. package/.next/server/app/settings.rsc +15 -15
  125. package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  126. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  127. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  128. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  129. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  130. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  131. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  132. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  133. package/.next/server/app/tasks.html +3 -3
  134. package/.next/server/app/tasks.rsc +15 -15
  135. package/.next/server/app/tasks.segments/_full.segment.rsc +15 -15
  136. package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  137. package/.next/server/app/tasks.segments/_index.segment.rsc +8 -8
  138. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  139. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  140. package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  141. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
  142. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
  143. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  144. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  145. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  146. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  147. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js +2 -2
  148. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js.map +1 -1
  149. package/.next/server/middleware-build-manifest.js +3 -3
  150. package/.next/server/pages/404.html +3 -3
  151. package/.next/server/pages/500.html +1 -1
  152. package/.next/server/server-reference-manifest.js +1 -1
  153. package/.next/server/server-reference-manifest.json +1 -1
  154. package/.next/static/chunks/03u6vhkkvm_xv.css +1 -0
  155. package/.next/static/chunks/06iwj-z8xtcq3.js +7 -0
  156. package/.next/static/chunks/{0iwcnbsbx1-v9.js → 0beyuyippzgr8.js} +1 -1
  157. package/.next/static/chunks/{0tfmi~tv.s~1v.js → 0kvxd.2mvzidn.js} +1 -1
  158. package/.next/static/chunks/{05~pc4d7ucq2m.js → 0smj-exu.2hxz.js} +1 -1
  159. package/.next/trace +2 -2
  160. package/.next/trace-build +1 -1
  161. package/app/components/MobileNav.tsx +2 -2
  162. package/app/components/Sidebar.tsx +6 -4
  163. package/package.json +1 -1
  164. package/.next/static/chunks/07xy.c.pwy1q_.js +0 -7
  165. package/.next/static/chunks/0_d.vbw._9_xf.css +0 -1
  166. /package/.next/static/{6uvBPCkdDwXnefcWYkQL2 → hggj2LK3B658VGH9oZqgI}/_buildManifest.js +0 -0
  167. /package/.next/static/{6uvBPCkdDwXnefcWYkQL2 → hggj2LK3B658VGH9oZqgI}/_clientMiddlewareManifest.js +0 -0
  168. /package/.next/static/{6uvBPCkdDwXnefcWYkQL2 → hggj2LK3B658VGH9oZqgI}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.13"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.15"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
@@ -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.5.7-preview.13"],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,b]=(0,a.useState)(""),N="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-2 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:"inline-flex min-h-[44px] items-center rounded-md border border-[#2a2a4a] bg-[#0a0a15]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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-base sm: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-base sm: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 b("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(b(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(()=>b(""),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.5.7-preview.15"],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,b]=(0,a.useState)(""),N="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-2 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:"inline-flex min-h-[44px] items-center rounded-md border border-[#2a2a4a] bg-[#0a0a15]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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:N,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-base sm: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-base sm: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 b("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(b(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(()=>b(""),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 →"})]})]})]})]})]})}])}]);
package/.next/trace CHANGED
@@ -1,2 +1,2 @@
1
- [{"name":"generate-buildid","duration":383,"timestamp":1996593341224,"id":4,"parentId":1,"tags":{},"startTime":1780804565588,"traceId":"c9ba472f9c3b5662"},{"name":"load-custom-routes","duration":753,"timestamp":1996593341822,"id":5,"parentId":1,"tags":{},"startTime":1780804565588,"traceId":"c9ba472f9c3b5662"},{"name":"create-dist-dir","duration":30976,"timestamp":1996593342775,"id":6,"parentId":1,"tags":{},"startTime":1780804565589,"traceId":"c9ba472f9c3b5662"},{"name":"clean","duration":165302,"timestamp":1996593375717,"id":7,"parentId":1,"tags":{},"startTime":1780804565622,"traceId":"c9ba472f9c3b5662"},{"name":"discover-routes","duration":37013,"timestamp":1996593966291,"id":8,"parentId":1,"tags":{},"startTime":1780804566213,"traceId":"c9ba472f9c3b5662"},{"name":"create-root-mapping","duration":188,"timestamp":1996594003398,"id":9,"parentId":1,"tags":{},"startTime":1780804566250,"traceId":"c9ba472f9c3b5662"},{"name":"generate-route-types","duration":153278,"timestamp":1996594011618,"id":10,"parentId":1,"tags":{},"startTime":1780804566258,"traceId":"c9ba472f9c3b5662"},{"name":"public-dir-conflict-check","duration":160,"timestamp":1996594166672,"id":11,"parentId":1,"tags":{},"startTime":1780804566413,"traceId":"c9ba472f9c3b5662"},{"name":"generate-routes-manifest","duration":37487,"timestamp":1996594167060,"id":12,"parentId":1,"tags":{},"startTime":1780804566413,"traceId":"c9ba472f9c3b5662"},{"name":"run-turbopack","duration":64677557,"timestamp":1996594238684,"id":14,"parentId":1,"tags":{},"startTime":1780804566485,"traceId":"c9ba472f9c3b5662"},{"name":"turbopack-build-events","duration":143,"timestamp":1996595143545,"id":15,"parentId":1,"tags":{},"startTime":1780804567390,"traceId":"c9ba472f9c3b5662"},{"name":"run-typescript","duration":43717683,"timestamp":1996658964073,"id":16,"parentId":1,"tags":{},"startTime":1780804631210,"traceId":"c9ba472f9c3b5662"},{"name":"generate-required-server-files","duration":13294,"timestamp":1996702693256,"id":18,"parentId":1,"tags":{},"startTime":1780804674940,"traceId":"c9ba472f9c3b5662"},{"name":"check-static-error-page","duration":120841,"timestamp":1996703853554,"id":20,"parentId":19,"tags":{},"startTime":1780804676100,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":2337938,"timestamp":1996704000832,"id":68,"parentId":22,"tags":{},"startTime":1780804676247,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":2474004,"timestamp":1996703864926,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1780804676111,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":2933377,"timestamp":1996704007833,"id":74,"parentId":30,"tags":{},"startTime":1780804676254,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3028297,"timestamp":1996703913035,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3005835,"timestamp":1996704007927,"id":75,"parentId":32,"tags":{},"startTime":1780804676254,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3098850,"timestamp":1996703922883,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1780804676169,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3117634,"timestamp":1996704008179,"id":76,"parentId":33,"tags":{},"startTime":1780804676254,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3201128,"timestamp":1996703924783,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1780804676171,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3150125,"timestamp":1996704008298,"id":77,"parentId":34,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3231121,"timestamp":1996703927397,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1780804676174,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3174148,"timestamp":1996704008329,"id":78,"parentId":35,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3254965,"timestamp":1996703927598,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1780804676174,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3191081,"timestamp":1996704008361,"id":79,"parentId":36,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3258239,"timestamp":1996703941284,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3230807,"timestamp":1996704008397,"id":80,"parentId":37,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3297786,"timestamp":1996703941505,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3238735,"timestamp":1996704001013,"id":69,"parentId":25,"tags":{},"startTime":1780804676247,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3327698,"timestamp":1996703912108,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1780804676158,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3256115,"timestamp":1996704008418,"id":81,"parentId":38,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3322942,"timestamp":1996703941662,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3282868,"timestamp":1996704008449,"id":83,"parentId":40,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3349469,"timestamp":1996703941928,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3367073,"timestamp":1996704008468,"id":84,"parentId":42,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3433211,"timestamp":1996703942435,"id":42,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/health"},"startTime":1780804676189,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3391024,"timestamp":1996704008482,"id":85,"parentId":44,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3456690,"timestamp":1996703942897,"id":44,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1780804676189,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3403901,"timestamp":1996704008432,"id":82,"parentId":39,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3470599,"timestamp":1996703941804,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3415581,"timestamp":1996703998948,"id":67,"parentId":21,"tags":{},"startTime":1780804676245,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3551251,"timestamp":1996703863385,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1780804676110,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3434398,"timestamp":1996704008499,"id":86,"parentId":45,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3482912,"timestamp":1996703960362,"id":45,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3442179,"timestamp":1996704008516,"id":87,"parentId":46,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3490250,"timestamp":1996703960515,"id":46,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3470845,"timestamp":1996704008546,"id":89,"parentId":48,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3518701,"timestamp":1996703960760,"id":48,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3483725,"timestamp":1996704008563,"id":90,"parentId":49,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3531456,"timestamp":1996703960890,"id":49,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3500660,"timestamp":1996704008579,"id":91,"parentId":50,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3548309,"timestamp":1996703960994,"id":50,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3525264,"timestamp":1996704008595,"id":92,"parentId":51,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3572808,"timestamp":1996703961122,"id":51,"parentId":19,"tags":{"page":"/api/hub/upload"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3581781,"timestamp":1996704008628,"id":94,"parentId":55,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3628492,"timestamp":1996703961992,"id":55,"parentId":19,"tags":{"page":"/manifest.webmanifest"},"startTime":1780804676208,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3604141,"timestamp":1996704036210,"id":95,"parentId":24,"tags":{},"startTime":1780804676282,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3774887,"timestamp":1996703865553,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1780804676112,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3632097,"timestamp":1996704008611,"id":93,"parentId":52,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3679506,"timestamp":1996703961254,"id":52,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1780804676208,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3604806,"timestamp":1996704065553,"id":96,"parentId":31,"tags":{},"startTime":1780804676312,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3757225,"timestamp":1996703913205,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3607234,"timestamp":1996704074066,"id":97,"parentId":41,"tags":{},"startTime":1780804676320,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3739301,"timestamp":1996703942071,"id":41,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/agents"},"startTime":1780804676188,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3628023,"timestamp":1996704075281,"id":98,"parentId":43,"tags":{},"startTime":1780804676322,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3760782,"timestamp":1996703942592,"id":43,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1780804676189,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3763105,"timestamp":1996704001468,"id":71,"parentId":27,"tags":{},"startTime":1780804676248,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3852119,"timestamp":1996703912545,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3948445,"timestamp":1996704008533,"id":88,"parentId":47,"tags":{},"startTime":1780804676255,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":3996435,"timestamp":1996703960648,"id":47,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1780804676207,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3970763,"timestamp":1996704001149,"id":70,"parentId":26,"tags":{},"startTime":1780804676247,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4059603,"timestamp":1996703912386,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3875804,"timestamp":1996704171857,"id":102,"parentId":56,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4085609,"timestamp":1996703962128,"id":56,"parentId":19,"tags":{"page":"/messages"},"startTime":1780804676208,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":3926681,"timestamp":1996704171978,"id":104,"parentId":58,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4136149,"timestamp":1996703962591,"id":58,"parentId":19,"tags":{"page":"/nodes"},"startTime":1780804676209,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4153743,"timestamp":1996704001774,"id":72,"parentId":28,"tags":{},"startTime":1780804676248,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4242931,"timestamp":1996703912695,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4010977,"timestamp":1996704172016,"id":105,"parentId":60,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4210439,"timestamp":1996703972659,"id":60,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1780804676219,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4071580,"timestamp":1996704171783,"id":99,"parentId":23,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4378173,"timestamp":1996703865284,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1780804676112,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4071578,"timestamp":1996704172044,"id":107,"parentId":62,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4270587,"timestamp":1996703973069,"id":62,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1780804676219,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4142285,"timestamp":1996704172057,"id":108,"parentId":64,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4340695,"timestamp":1996703973770,"id":64,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1780804676220,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4177280,"timestamp":1996704171831,"id":100,"parentId":53,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4387558,"timestamp":1996703961654,"id":53,"parentId":19,"tags":{"page":"/login"},"startTime":1780804676208,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4189213,"timestamp":1996704172085,"id":110,"parentId":66,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4387266,"timestamp":1996703974102,"id":66,"parentId":19,"tags":{"page":"/tasks"},"startTime":1780804676220,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4189411,"timestamp":1996704172071,"id":109,"parentId":65,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4387584,"timestamp":1996703973928,"id":65,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1780804676220,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4217112,"timestamp":1996704172096,"id":111,"parentId":63,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4415995,"timestamp":1996703973281,"id":63,"parentId":19,"tags":{"page":"/settings"},"startTime":1780804676220,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4137225,"timestamp":1996704269226,"id":112,"parentId":59,"tags":{},"startTime":1780804676516,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4443715,"timestamp":1996703962803,"id":59,"parentId":19,"tags":{"page":"/"},"startTime":1780804676209,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4427298,"timestamp":1996704001957,"id":73,"parentId":29,"tags":{},"startTime":1780804676248,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4516500,"timestamp":1996703912840,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1780804676159,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4264808,"timestamp":1996704171845,"id":101,"parentId":54,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"}]
2
- [{"name":"check-page","duration":4475142,"timestamp":1996703961826,"id":54,"parentId":19,"tags":{"page":"/logs"},"startTime":1780804676208,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4319469,"timestamp":1996704172035,"id":106,"parentId":61,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4518811,"timestamp":1996703972918,"id":61,"parentId":19,"tags":{"page":"/servers"},"startTime":1780804676219,"traceId":"c9ba472f9c3b5662"},{"name":"is-page-static","duration":4371924,"timestamp":1996704171869,"id":103,"parentId":57,"tags":{},"startTime":1780804676418,"traceId":"c9ba472f9c3b5662"},{"name":"check-page","duration":4581533,"timestamp":1996703962359,"id":57,"parentId":19,"tags":{"page":"/node"},"startTime":1780804676209,"traceId":"c9ba472f9c3b5662"},{"name":"static-check","duration":4692149,"timestamp":1996703851802,"id":19,"parentId":1,"tags":{},"startTime":1780804676098,"traceId":"c9ba472f9c3b5662"},{"name":"write-routes-manifest","duration":2908,"timestamp":1996708588335,"id":114,"parentId":1,"tags":{},"startTime":1780804680835,"traceId":"c9ba472f9c3b5662"},{"name":"load-dotenv","duration":90,"timestamp":1996708638411,"id":117,"parentId":116,"tags":{},"startTime":1780804680885,"traceId":"c9ba472f9c3b5662"},{"name":"run-export-path-map","duration":949,"timestamp":1996708644996,"id":118,"parentId":116,"tags":{},"startTime":1780804680891,"traceId":"c9ba472f9c3b5662"},{"name":"next-export","duration":2316057,"timestamp":1996708632320,"id":116,"parentId":1,"tags":{},"startTime":1780804680879,"traceId":"c9ba472f9c3b5662"},{"name":"move-exported-app-not-found-","duration":16624,"timestamp":1996710974710,"id":119,"parentId":115,"tags":{},"startTime":1780804683221,"traceId":"c9ba472f9c3b5662"},{"name":"move-exported-app-global-error-","duration":3068,"timestamp":1996710991516,"id":120,"parentId":115,"tags":{},"startTime":1780804683238,"traceId":"c9ba472f9c3b5662"},{"name":"static-generation","duration":2387277,"timestamp":1996708617923,"id":115,"parentId":1,"tags":{},"startTime":1780804680864,"traceId":"c9ba472f9c3b5662"},{"name":"write-routes-manifest","duration":643,"timestamp":1996711005559,"id":121,"parentId":1,"tags":{},"startTime":1780804683252,"traceId":"c9ba472f9c3b5662"},{"name":"print-tree-view","duration":13521,"timestamp":1996711086362,"id":122,"parentId":1,"tags":{},"startTime":1780804683333,"traceId":"c9ba472f9c3b5662"},{"name":"write-route-bundle-stats","duration":37282,"timestamp":1996711099936,"id":123,"parentId":1,"tags":{},"startTime":1780804683346,"traceId":"c9ba472f9c3b5662"},{"name":"telemetry-flush","duration":114,"timestamp":1996711137267,"id":124,"parentId":1,"tags":{},"startTime":1780804683384,"traceId":"c9ba472f9c3b5662"},{"name":"next-build","duration":117902061,"timestamp":1996593235346,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780804565482,"traceId":"c9ba472f9c3b5662"}]
1
+ [{"name":"generate-buildid","duration":372,"timestamp":1997434865092,"id":4,"parentId":1,"tags":{},"startTime":1780805407111,"traceId":"c2a284090fd37df0"},{"name":"load-custom-routes","duration":696,"timestamp":1997434865660,"id":5,"parentId":1,"tags":{},"startTime":1780805407112,"traceId":"c2a284090fd37df0"},{"name":"create-dist-dir","duration":7245,"timestamp":1997434866422,"id":6,"parentId":1,"tags":{},"startTime":1780805407113,"traceId":"c2a284090fd37df0"},{"name":"clean","duration":118244,"timestamp":1997434874608,"id":7,"parentId":1,"tags":{},"startTime":1780805407121,"traceId":"c2a284090fd37df0"},{"name":"discover-routes","duration":61047,"timestamp":1997435218668,"id":8,"parentId":1,"tags":{},"startTime":1780805407465,"traceId":"c2a284090fd37df0"},{"name":"create-root-mapping","duration":165,"timestamp":1997435279803,"id":9,"parentId":1,"tags":{},"startTime":1780805407526,"traceId":"c2a284090fd37df0"},{"name":"generate-route-types","duration":96671,"timestamp":1997435284094,"id":10,"parentId":1,"tags":{},"startTime":1780805407530,"traceId":"c2a284090fd37df0"},{"name":"public-dir-conflict-check","duration":171,"timestamp":1997435380894,"id":11,"parentId":1,"tags":{},"startTime":1780805407627,"traceId":"c2a284090fd37df0"},{"name":"generate-routes-manifest","duration":9201,"timestamp":1997435381249,"id":12,"parentId":1,"tags":{},"startTime":1780805407628,"traceId":"c2a284090fd37df0"},{"name":"run-turbopack","duration":63713656,"timestamp":1997435405152,"id":14,"parentId":1,"tags":{},"startTime":1780805407651,"traceId":"c2a284090fd37df0"},{"name":"turbopack-build-events","duration":108,"timestamp":1997436303644,"id":15,"parentId":1,"tags":{},"startTime":1780805408550,"traceId":"c2a284090fd37df0"},{"name":"run-typescript","duration":43844010,"timestamp":1997499287568,"id":16,"parentId":1,"tags":{},"startTime":1780805471534,"traceId":"c2a284090fd37df0"},{"name":"generate-required-server-files","duration":14347,"timestamp":1997543136319,"id":18,"parentId":1,"tags":{},"startTime":1780805515383,"traceId":"c2a284090fd37df0"},{"name":"check-static-error-page","duration":54307,"timestamp":1997544350628,"id":20,"parentId":19,"tags":{},"startTime":1780805516597,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":2781570,"timestamp":1997544422110,"id":68,"parentId":22,"tags":{},"startTime":1780805516668,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":2841327,"timestamp":1997544362518,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1780805516609,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3107765,"timestamp":1997544422505,"id":71,"parentId":27,"tags":{},"startTime":1780805516669,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3157113,"timestamp":1997544373252,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1780805516620,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3201034,"timestamp":1997544423279,"id":74,"parentId":30,"tags":{},"startTime":1780805516670,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3250760,"timestamp":1997544373639,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1780805516620,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3262032,"timestamp":1997544423347,"id":75,"parentId":32,"tags":{},"startTime":1780805516670,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3307564,"timestamp":1997544377897,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1780805516624,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3281301,"timestamp":1997544436055,"id":76,"parentId":33,"tags":{},"startTime":1780805516682,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3339355,"timestamp":1997544378091,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1780805516624,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3318970,"timestamp":1997544422389,"id":70,"parentId":26,"tags":{},"startTime":1780805516669,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3368359,"timestamp":1997544373079,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1780805516619,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3352533,"timestamp":1997544436172,"id":77,"parentId":34,"tags":{},"startTime":1780805516682,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3410539,"timestamp":1997544378246,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1780805516625,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3352728,"timestamp":1997544436244,"id":79,"parentId":36,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3415183,"timestamp":1997544378871,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1780805516625,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3358302,"timestamp":1997544436225,"id":78,"parentId":35,"tags":{},"startTime":1780805516682,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3416202,"timestamp":1997544378372,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1780805516625,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3390044,"timestamp":1997544436302,"id":82,"parentId":39,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3446956,"timestamp":1997544379467,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1780805516626,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3406997,"timestamp":1997544436315,"id":83,"parentId":40,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3463814,"timestamp":1997544379566,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1780805516626,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3420811,"timestamp":1997544436276,"id":80,"parentId":37,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3477928,"timestamp":1997544379225,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1780805516626,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3434088,"timestamp":1997544436341,"id":85,"parentId":44,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3484730,"timestamp":1997544385757,"id":44,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1780805516632,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3434452,"timestamp":1997544436292,"id":81,"parentId":38,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3491414,"timestamp":1997544379371,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1780805516626,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3466038,"timestamp":1997544436351,"id":86,"parentId":45,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3516546,"timestamp":1997544385913,"id":45,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1780805516632,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3497990,"timestamp":1997544436327,"id":84,"parentId":42,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3553790,"timestamp":1997544380603,"id":42,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/health"},"startTime":1780805516627,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3503926,"timestamp":1997544436366,"id":87,"parentId":46,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3554330,"timestamp":1997544386041,"id":46,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1780805516632,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3511535,"timestamp":1997544436381,"id":88,"parentId":47,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3561802,"timestamp":1997544386180,"id":47,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1780805516632,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3538714,"timestamp":1997544436425,"id":91,"parentId":50,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3588670,"timestamp":1997544386559,"id":50,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1780805516633,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3539058,"timestamp":1997544436391,"id":89,"parentId":48,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3589174,"timestamp":1997544386313,"id":48,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1780805516633,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3564833,"timestamp":1997544436406,"id":90,"parentId":49,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3614860,"timestamp":1997544386447,"id":49,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1780805516633,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3574317,"timestamp":1997544436439,"id":92,"parentId":51,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3624152,"timestamp":1997544386664,"id":51,"parentId":19,"tags":{"page":"/api/hub/upload"},"startTime":1780805516633,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3589029,"timestamp":1997544436469,"id":94,"parentId":55,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3635678,"timestamp":1997544389880,"id":55,"parentId":19,"tags":{"page":"/manifest.webmanifest"},"startTime":1780805516636,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3539520,"timestamp":1997544505636,"id":95,"parentId":24,"tags":{},"startTime":1780805516752,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3682285,"timestamp":1997544362950,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1780805516609,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3541029,"timestamp":1997544536063,"id":96,"parentId":31,"tags":{},"startTime":1780805516782,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3703421,"timestamp":1997544373749,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1780805516620,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3545005,"timestamp":1997544538219,"id":98,"parentId":43,"tags":{},"startTime":1780805516784,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3702511,"timestamp":1997544380771,"id":43,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1780805516627,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3548242,"timestamp":1997544537106,"id":97,"parentId":41,"tags":{},"startTime":1780805516783,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3705663,"timestamp":1997544379731,"id":41,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/agents"},"startTime":1780805516626,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3652509,"timestamp":1997544436453,"id":93,"parentId":52,"tags":{},"startTime":1780805516683,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3702244,"timestamp":1997544386785,"id":52,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1780805516633,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3857523,"timestamp":1997544422270,"id":69,"parentId":25,"tags":{},"startTime":1780805516669,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":3906999,"timestamp":1997544372873,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1780805516619,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3659247,"timestamp":1997544746438,"id":101,"parentId":54,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4016088,"timestamp":1997544389667,"id":54,"parentId":19,"tags":{"page":"/logs"},"startTime":1780805516636,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3720644,"timestamp":1997544746460,"id":103,"parentId":57,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4076882,"timestamp":1997544390296,"id":57,"parentId":19,"tags":{"page":"/node"},"startTime":1780805516637,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3759119,"timestamp":1997544746472,"id":104,"parentId":58,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4115116,"timestamp":1997544390547,"id":58,"parentId":19,"tags":{"page":"/nodes"},"startTime":1780805516637,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4090418,"timestamp":1997544422901,"id":72,"parentId":28,"tags":{},"startTime":1780805516669,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4140020,"timestamp":1997544373388,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1780805516620,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3780702,"timestamp":1997544746424,"id":100,"parentId":53,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4139937,"timestamp":1997544387253,"id":53,"parentId":19,"tags":{"page":"/login"},"startTime":1780805516634,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3794925,"timestamp":1997544746368,"id":99,"parentId":23,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4178602,"timestamp":1997544362771,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1780805516609,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4119886,"timestamp":1997544421664,"id":67,"parentId":21,"tags":{},"startTime":1780805516668,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4182633,"timestamp":1997544358950,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1780805516605,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4130526,"timestamp":1997544423106,"id":73,"parentId":29,"tags":{},"startTime":1780805516669,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4180189,"timestamp":1997544373497,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1780805516620,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3818760,"timestamp":1997544746487,"id":105,"parentId":60,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4162235,"timestamp":1997544403061,"id":60,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1780805516649,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3834596,"timestamp":1997544746508,"id":107,"parentId":62,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4177646,"timestamp":1997544403512,"id":62,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1780805516650,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3850636,"timestamp":1997544746519,"id":108,"parentId":64,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4192973,"timestamp":1997544404248,"id":64,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1780805516651,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3874429,"timestamp":1997544746565,"id":112,"parentId":59,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4230258,"timestamp":1997544390804,"id":59,"parentId":19,"tags":{"page":"/"},"startTime":1780805516637,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":3897631,"timestamp":1997544746551,"id":111,"parentId":63,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4240526,"timestamp":1997544403729,"id":63,"parentId":19,"tags":{"page":"/settings"},"startTime":1780805516650,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4080602,"timestamp":1997544746450,"id":102,"parentId":56,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4437110,"timestamp":1997544390018,"id":56,"parentId":19,"tags":{"page":"/messages"},"startTime":1780805516636,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4100746,"timestamp":1997544746529,"id":109,"parentId":65,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"}]
2
+ [{"name":"check-page","duration":4443231,"timestamp":1997544404436,"id":65,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1780805516651,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4249717,"timestamp":1997544746498,"id":106,"parentId":61,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4592947,"timestamp":1997544403357,"id":61,"parentId":19,"tags":{"page":"/servers"},"startTime":1780805516650,"traceId":"c2a284090fd37df0"},{"name":"is-page-static","duration":4263405,"timestamp":1997544746540,"id":110,"parentId":66,"tags":{},"startTime":1780805516993,"traceId":"c2a284090fd37df0"},{"name":"check-page","duration":4605412,"timestamp":1997544404621,"id":66,"parentId":19,"tags":{"page":"/tasks"},"startTime":1780805516651,"traceId":"c2a284090fd37df0"},{"name":"static-check","duration":4660647,"timestamp":1997544349439,"id":19,"parentId":1,"tags":{},"startTime":1780805516596,"traceId":"c2a284090fd37df0"},{"name":"write-routes-manifest","duration":712,"timestamp":1997549039456,"id":114,"parentId":1,"tags":{},"startTime":1780805521286,"traceId":"c2a284090fd37df0"},{"name":"load-dotenv","duration":71,"timestamp":1997549078309,"id":117,"parentId":116,"tags":{},"startTime":1780805521325,"traceId":"c2a284090fd37df0"},{"name":"run-export-path-map","duration":948,"timestamp":1997549084954,"id":118,"parentId":116,"tags":{},"startTime":1780805521331,"traceId":"c2a284090fd37df0"},{"name":"next-export","duration":2609484,"timestamp":1997549076386,"id":116,"parentId":1,"tags":{},"startTime":1780805521323,"traceId":"c2a284090fd37df0"},{"name":"move-exported-app-not-found-","duration":5571,"timestamp":1997551716048,"id":119,"parentId":115,"tags":{},"startTime":1780805523962,"traceId":"c2a284090fd37df0"},{"name":"move-exported-app-global-error-","duration":961,"timestamp":1997551721760,"id":120,"parentId":115,"tags":{},"startTime":1780805523968,"traceId":"c2a284090fd37df0"},{"name":"static-generation","duration":2669832,"timestamp":1997549061936,"id":115,"parentId":1,"tags":{},"startTime":1780805521308,"traceId":"c2a284090fd37df0"},{"name":"write-routes-manifest","duration":3255,"timestamp":1997551732145,"id":121,"parentId":1,"tags":{},"startTime":1780805523978,"traceId":"c2a284090fd37df0"},{"name":"print-tree-view","duration":29167,"timestamp":1997551844408,"id":122,"parentId":1,"tags":{},"startTime":1780805524091,"traceId":"c2a284090fd37df0"},{"name":"write-route-bundle-stats","duration":64317,"timestamp":1997551873625,"id":123,"parentId":1,"tags":{},"startTime":1780805524120,"traceId":"c2a284090fd37df0"},{"name":"telemetry-flush","duration":185,"timestamp":1997551937990,"id":124,"parentId":1,"tags":{},"startTime":1780805524184,"traceId":"c2a284090fd37df0"},{"name":"next-build","duration":117257893,"timestamp":1997434680340,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780805406927,"traceId":"c2a284090fd37df0"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":64677557,"timestamp":1996594238684,"id":14,"parentId":1,"tags":{},"startTime":1780804566485,"traceId":"c9ba472f9c3b5662"},{"name":"turbopack-build-events","duration":143,"timestamp":1996595143545,"id":15,"parentId":1,"tags":{},"startTime":1780804567390,"traceId":"c9ba472f9c3b5662"},{"name":"run-typescript","duration":43717683,"timestamp":1996658964073,"id":16,"parentId":1,"tags":{},"startTime":1780804631210,"traceId":"c9ba472f9c3b5662"},{"name":"static-check","duration":4692149,"timestamp":1996703851802,"id":19,"parentId":1,"tags":{},"startTime":1780804676098,"traceId":"c9ba472f9c3b5662"},{"name":"static-generation","duration":2387277,"timestamp":1996708617923,"id":115,"parentId":1,"tags":{},"startTime":1780804680864,"traceId":"c9ba472f9c3b5662"},{"name":"telemetry-flush","duration":114,"timestamp":1996711137267,"id":124,"parentId":1,"tags":{},"startTime":1780804683384,"traceId":"c9ba472f9c3b5662"},{"name":"next-build","duration":117902061,"timestamp":1996593235346,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780804565482,"traceId":"c9ba472f9c3b5662"}]
1
+ [{"name":"run-turbopack","duration":63713656,"timestamp":1997435405152,"id":14,"parentId":1,"tags":{},"startTime":1780805407651,"traceId":"c2a284090fd37df0"},{"name":"turbopack-build-events","duration":108,"timestamp":1997436303644,"id":15,"parentId":1,"tags":{},"startTime":1780805408550,"traceId":"c2a284090fd37df0"},{"name":"run-typescript","duration":43844010,"timestamp":1997499287568,"id":16,"parentId":1,"tags":{},"startTime":1780805471534,"traceId":"c2a284090fd37df0"},{"name":"static-check","duration":4660647,"timestamp":1997544349439,"id":19,"parentId":1,"tags":{},"startTime":1780805516596,"traceId":"c2a284090fd37df0"},{"name":"static-generation","duration":2669832,"timestamp":1997549061936,"id":115,"parentId":1,"tags":{},"startTime":1780805521308,"traceId":"c2a284090fd37df0"},{"name":"telemetry-flush","duration":185,"timestamp":1997551937990,"id":124,"parentId":1,"tags":{},"startTime":1780805524184,"traceId":"c2a284090fd37df0"},{"name":"next-build","duration":117257893,"timestamp":1997434680340,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780805406927,"traceId":"c2a284090fd37df0"}]
@@ -28,9 +28,9 @@ export function MobileNav() {
28
28
  href={item.href}
29
29
  prefetch={false}
30
30
  aria-current={active ? 'page' : undefined}
31
- className={`flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
31
+ className={`relative flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
32
32
  active
33
- ? 'bg-cyan-500/12 text-cyan-300'
33
+ ? 'bg-cyan-500/12 text-cyan-300 before:absolute before:top-0 before:left-3 before:right-3 before:h-0.5 before:rounded-full before:bg-cyan-400'
34
34
  : 'text-gray-500 active:bg-[#1a1a3a] active:text-gray-200'
35
35
  }`}
36
36
  >
@@ -91,10 +91,12 @@ export function Sidebar() {
91
91
 
92
92
  return (
93
93
  <>
94
- {/* Mobile hamburger */}
94
+ {/* Mobile hamburger — R13 of #190: was p-2.5 = ~40px tap target,
95
+ just below the iOS 44px guideline. Bump padding and add an
96
+ explicit min-w/min-h so it can never be miss-tapped. */}
95
97
  <button
96
98
  onClick={() => setMobileOpen(!mobileOpen)}
97
- 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]"
99
+ className="fixed top-3 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-3 min-h-[44px] min-w-[44px] inline-flex items-center justify-center text-gray-400 hover:text-white active:bg-[#1a1a3a]"
98
100
  aria-label="Toggle menu"
99
101
  >
100
102
  <svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
@@ -143,7 +145,7 @@ export function Sidebar() {
143
145
  key={n.network_id}
144
146
  onClick={() => { setNetworkId(n.network_id); setMobileOpen(false); }}
145
147
  title={n.network_id}
146
- className={`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${
148
+ className={`w-full flex items-center gap-2 px-3 py-2.5 lg:py-1.5 rounded-md text-xs transition-colors text-left ${
147
149
  networkId === n.network_id
148
150
  ? 'bg-cyan-500/10 text-cyan-300'
149
151
  : 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]'
@@ -178,7 +180,7 @@ export function Sidebar() {
178
180
  }}
179
181
  title={collapsed ? 'Quick search (⌘K)' : undefined}
180
182
  className={`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${
181
- collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-2'
183
+ collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-3 lg:py-2'
182
184
  }`}
183
185
  aria-label="Open command palette"
184
186
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network-dashboard",
3
- "version": "0.5.7-preview.13",
3
+ "version": "0.5.7-preview.15",
4
4
  "description": "Agent Network Dashboard — Web UI for managing AI Agent networks",
5
5
  "main": "apps/desktop/electron/main.cjs",
6
6
  "scripts": {
@@ -1,7 +0,0 @@
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:"暖色橙紫"}],n="anet-theme";function r(e){"u">typeof document&&document.documentElement.setAttribute("data-theme",e)}e.s(["ThemeProvider",0,function({children:e}){return(0,a.useEffect)(()=>{r(localStorage.getItem(n)||"cyber")},[]),(0,t.jsx)(t.Fragment,{children:e})},"ThemeSwitcher",0,function({compact:e=!1}){let[o,i]=(0,a.useState)("cyber"),[l,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=localStorage.getItem(n)||"cyber";i(e),r(e)},[]);let d=s.find(e=>e.id===o)||s[0];return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{"aria-label":"切换主题",onClick:()=>c(!l),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})]}),l&&(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;i(t=e.id),localStorage.setItem(n,t),r(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===o?"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===o&&(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),n=e.i(23910),r=e.i(12629),o=e.i(11449),i=e.i(24156);let l=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:"/servers",label:"Servers",icon:"M4 6.5A2.5 2.5 0 016.5 4h11A2.5 2.5 0 0120 6.5v1A2.5 2.5 0 0117.5 10h-11A2.5 2.5 0 014 7.5v-1zM4 16.5A2.5 2.5 0 016.5 14h11a2.5 2.5 0 012.5 2.5v1a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5v-1zM7 7h.01M7 17h.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,g]=(0,n.useState)(!1),[u,x]=(0,n.useState)(!1),{networkId:f,setNetworkId:v}=(0,o.useNetworkId)(),{data:b}=(0,r.default)("/api/hub/networks",l,{refreshInterval:15e3,dedupingInterval:1e4}),{data:k}=(0,r.default)("/api/hub/status",m,{refreshInterval:15e3,dedupingInterval:1e4}),y=b?.networks||[],w=(()=>{let e=new Map;for(let t of k?.sessions||[])t.network_id&&e.set(t.network_id,(e.get(t.network_id)||0)+1);let t=new Set(y.map(e=>e.network_id));return[...y,...[...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}))})(),j=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:c.map(a=>{var n;return(0,t.jsxs)(s.default,{href:a.href,prefetch:!1,onClick:()=>x(!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] ${("/"===(n=a.href)?"/"===e:"/settings"===n?"/settings"===e:e.startsWith(n))?"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:()=>x(!u),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:u?(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"})})}),u&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden anet-fade-in",onClick:()=>x(!1)}),(0,t.jsxs)("aside",{"data-anet-sidebar":"true",className:`
2
- fixed top-0 left-0 h-full z-40 bg-[#0d0d1a] border-r border-[#2a2a4a]
3
- transition-transform duration-200 ease-out
4
- ${h?"w-16":"w-52"}
5
- ${u?"translate-x-0 shadow-2xl shadow-black/40 lg:shadow-none":"-translate-x-full"}
6
- lg:translate-x-0 lg:static lg:shrink-0 lg:shadow-none
7
- `,children:[(0,t.jsx)(p,{collapsed:h}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!h&&w.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:w.map(e=>(0,t.jsxs)("button",{onClick:()=>{v(e.network_id),x(!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:j}),(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)(i.ThemeSwitcher,{compact:h}),(0,t.jsx)("button",{onClick:()=>g(!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 p({collapsed:e}){let{data:a}=(0,r.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),n=a?.sessions||[],o=n.filter(e=>e.status&&"offline"!==e.status).length,i=n.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)(g,{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)(g,{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 ${o>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===i?(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:o}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",i]})," online"]})]})]})]})}function g({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 u=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function x(){let e,a,{data:o,error:i}=(0,r.default)("/api/hub/stats",u,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:l,error:c}=(0,r.default)("/api/hub/health",u,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,h]=(0,n.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let m=i&&c||l&&!1===l.ok,p=o?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,g=o?.nodes?.total===0,x=null;if(m?(e="red",a="CommHub unreachable — agents may be offline",x={label:"Open Settings",href:"/settings"}):p>0?(e="amber",a=`${p} task${p>1?"s":""} failed recently`,x={label:"Review failures",href:"/tasks?status=failed"}):(g?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),x=null),"green"===e&&!o)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],v={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 ${v}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[x&&(0,t.jsxs)(s.default,{href:x.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[x.label," →"]}),x&&(0,t.jsx)(s.default,{href:x.href,"aria-label":x.label,className:"sm:hidden text-[13px] font-medium opacity-90 hover:opacity-100 relative leading-none px-1.5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']",children:"→"}),(0,t.jsx)("button",{onClick:()=>{h(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-60 hover:opacity-100 leading-none px-1.5 text-base relative rounded-md hover:bg-white/5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']",children:"×"})]})]})}let f="anet-cmdk-recents";function v(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function b(e){try{let t=v().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function k(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),n=0,r=0,o=0,i=0,l=[];for(;n<a.length&&r<s.length;)a[n]===s[r]?(o+=2+i,i++,l.push(n),(0===n||/[\s·:_/-]/.test(a[n-1]))&&(o+=4),r++):i=0,n++;return r<s.length?{score:-1,indices:[]}:{score:o-.05*Math.max(0,a.length-s.length),indices:l}}function y({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),n=Array.from(e);return(0,t.jsx)(t.Fragment,{children:n.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 w({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 j=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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)(w,{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:"?"}))}},{id:"act-pin-working",title:"Pin topology filter: working",hint:"highlight working nodes only",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","working")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"working"}}))}},{id:"act-pin-idle",title:"Pin topology filter: idle",hint:"highlight idle (online) nodes only",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","idle")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"idle"}}))}},{id:"act-pin-offline",title:"Pin topology filter: offline",hint:"highlight offline / no-SSE nodes",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","offline")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"offline"}}))}},{id:"act-pin-vendor-A",title:"Pin topology filter: Anthropic",hint:"highlight A vendor only",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","A")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"A"}}))}},{id:"act-pin-vendor-O",title:"Pin topology filter: OpenAI",hint:"highlight O vendor only",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","O")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"O"}}))}},{id:"act-pin-vendor-S",title:"Pin topology filter: 书生",hint:"highlight 书 vendor only",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","书")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"书"}}))}},{id:"act-clear-topo-pins",title:"Clear topology filters",hint:"release pinned status + group + vendor + edge",group:"Actions",icon:(0,t.jsx)(w,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-status"),sessionStorage.removeItem("anet-topo-pinned-group"),sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear"}}))}},{id:"act-clear-topo-edge",title:"Clear topology edge pin",hint:"release pinned recent-signal row only",group:"Actions",icon:(0,t.jsx)(w,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear-edge"}}))}},{id:"act-clear-topo-vendor",title:"Clear topology vendor filter",hint:"release pinned vendor only",group:"Actions",icon:(0,t.jsx)(w,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear-vendor"}}))}},{id:"act-topo-toggle-layout",title:"Toggle topology layout",hint:"ring ↔ grid (or press `l`)",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-layout",{detail:{kind:"toggle"}}))}},{id:"act-topo-fit",title:"Fit topology to canvas",hint:"auto-zoom to content (or press `f`)",group:"Actions",icon:(0,t.jsx)(w,{d:"M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-view",{detail:{kind:"fit"}}))}}];function N(){let e=(0,a.useRouter)(),[s,r]=(0,n.useState)(!1),[o,i]=(0,n.useState)(""),[l,c]=(0,n.useState)(0),d=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),r(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),r(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,n.useEffect)(()=>{s&&(i(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[h,m]=(0,n.useState)([]);(0,n.useEffect)(()=>{s&&m(v())},[s]);let[p,g]=(0,n.useState)([]);(0,n.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 n=(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)(w,{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)}`)})),r=(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)(w,{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)}`)}));g([...n,...r])}catch{}})(),()=>{e=!0}},[s]);let u=(0,n.useMemo)(()=>{let e=[...j,...p];if(!o.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,...j.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=k(e.title,o),a=e.hint?k(e.hint,o):{score:-1,indices:[]},s=k(e.id,o);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}))},[o,h,p]);if((0,n.useEffect)(()=>{l>=u.length&&c(0)},[u.length,l]),!s)return null;let x={};for(let e of u)(x[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:()=>r(!1),onKeyDown:t=>{if("Escape"===t.key)return void r(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,u.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=u[l];a&&(b(a.id),a.perform(e),r(!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:o,onChange:e=>{i(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-base sm: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===u.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',o,'"']}):Object.entries(x).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++,n=s===l;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{b(a.id),a.perform(e),r(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${n?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:n?"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)(y,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(y,{text:a.hint,indices:a._hintHi||[]})})]}),n&&(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)"},{keys:["click chip"],label:"Pin a status filter (R60/R61)"},{keys:["Esc"],label:"Clear pinned filter (R62) — or close chat"},{keys:["click group"],label:"Pin a team focus (R63)"},{keys:["click ×"],label:"Clear one filter (R64) — Esc clears all"},{keys:["⌘","K"],label:'Pin / clear filters via palette → "Pin topology filter…" (R69)'},{keys:["⌘","K"],label:"Toggle layout / Fit canvas via palette (R74)"},{keys:["click pill"],label:"Clear filter — click anywhere on the pill body (R73)"},{keys:["hover chip"],label:'Brighten all active flows — hover "N active links" (R77)'},{keys:["hover N working"],label:"Highlight working nodes — chip-row sibling of legend (R79)"},{keys:["hover vendor"],label:"Highlight one vendor — hover A/O/书/? in the chip row (R80)"},{keys:["hover seg"],label:"Preview a status filter — hover a pressure-bar segment (R83)"},{keys:["hover group"],label:"Preview a team focus — hover a group label (R86)"},{keys:["click vendor"],label:"Pin a vendor filter — click A/O/书/? in the chip row (R88)"},{keys:["⌘","K"],label:'Clear vendor pin only via palette → "Clear topology vendor filter" (R90)'},{keys:["⌘","K"],label:'Pin vendor: Anthropic/OpenAI/书生 via palette → "Pin topology filter…" (R108)'},{keys:["click row"],label:"Pin a flow filter — click a recent-signal row to lock the edge (R116)"},{keys:["⌘","K"],label:'Clear edge pin only via palette → "Clear topology edge pin" (R117)'},{keys:["click badge"],label:"Pin a flow filter from the canvas — click an edge midpoint count badge (R121)"},{keys:["click footer"],label:'See all flows — click "+ N more flows" in the recent-signal panel (R133)'},{keys:["click chip"],label:'See all flows — click the "N active links" chip in the chip row (R136)'},{keys:["click chip"],label:'Pin "working" status — click "N working" in the chip row (R139)'},{keys:["click chip"],label:'Open the agent list — click "N online" in the chip row (R140)'},{keys:["Tab","Enter"],label:"Open chat on a focused node (also Space) — keyboard parallel of click-to-chat (R151)"}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function E(){let[e,s]=(0,n.useState)(!1),r=(0,a.useRouter)(),o=(0,n.useRef)(0);return((0,n.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,n="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!n){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!n&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){o.current=Date.now();return}if(Date.now()-o.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),o.current=0,r.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,r]),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}var A=e.i(4221);let S=[{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:"Agents",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:"Chats",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"}];function L(){let e=(0,a.usePathname)();return(0,t.jsx)("nav",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-[#2a2a4a] bg-[#0d0d1a]/95 px-1 pb-[calc(env(safe-area-inset-bottom)+0.35rem)] pt-1.5 backdrop-blur lg:hidden",children:(0,t.jsxs)("div",{className:"mx-auto grid max-w-md grid-cols-5 gap-1",children:[S.map(a=>{let n,r="/"===(n=a.href)?"/"===e:e.startsWith(n);return(0,t.jsxs)(s.default,{href:a.href,prefetch:!1,"aria-current":r?"page":void 0,className:`flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${r?"bg-cyan-500/12 text-cyan-300":"text-gray-500 active:bg-[#1a1a3a] active:text-gray-200"}`,children:[(0,t.jsx)("svg",{className:"h-5 w-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a.icon})}),(0,t.jsx)("span",{className:"max-w-full truncate",children:a.label})]},a.href)}),(0,t.jsxs)("button",{type:"button",onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},className:"flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] text-gray-500 transition-colors active:bg-[#1a1a3a] active:text-gray-200","aria-label":"Open command palette",children:[(0,t.jsx)("svg",{className:"h-5 w-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v3m0 12v3m9-9h-3M6 12H3m15.364-6.364l-2.121 2.121M7.757 16.243l-2.121 2.121m12.728 0l-2.121-2.121M7.757 7.757L5.636 5.636M12 8.5A3.5 3.5 0 1112 15.5 3.5 3.5 0 0112 8.5z"})}),(0,t.jsx)("span",{className:"max-w-full truncate",children:"Command"})]})]})})}let R=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return R.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-[100dvh] max-w-full overflow-x-hidden",children:[(0,t.jsx)(h,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 max-w-full overflow-x-hidden flex flex-col",children:[(0,t.jsx)(x,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0 max-w-full overflow-x-hidden pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-0",children:e})]}),(0,t.jsx)(L,{}),(0,t.jsx)(N,{}),(0,t.jsx)(E,{}),(0,t.jsx)(A.ServersDrawer,{})]})}],22485)},28516,e=>{"use strict";var t=e.i(23910);e.s(["PwaInstaller",0,function(){return(0,t.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(()=>{})},[]),null}])}]);