@sleep2agi/agent-network-dashboard 0.4.5-preview.21 → 0.4.5-preview.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +8 -8
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +2 -2
- package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +1 -1
- package/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs.html +1 -1
- package/.next/server/app/logs.rsc +1 -1
- package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages.html +1 -1
- package/.next/server/app/messages.rsc +1 -1
- package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node.html +1 -1
- package/.next/server/app/node.rsc +1 -1
- package/.next/server/app/node.segments/_full.segment.rsc +1 -1
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +1 -1
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes.html +1 -1
- package/.next/server/app/nodes.rsc +1 -1
- package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +1 -1
- package/.next/server/app/server-logs.rsc +1 -1
- package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks.html +1 -1
- package/.next/server/app/settings/networks.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.html +1 -1
- package/.next/server/app/settings/tokens.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +1 -1
- package/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks.html +1 -1
- package/.next/server/app/tasks.rsc +1 -1
- package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0tncr1_._.js +3 -0
- package/.next/server/chunks/ssr/app_0tncr1_._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/06x7w8nwggx~~.js +1 -0
- package/.next/static/chunks/139oa00xt_-td.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/admin/page.tsx +77 -25
- package/app/components/TopoGraph.tsx +19 -14
- package/package.json +1 -1
- package/.next/server/chunks/ssr/app_0ap_oiq._.js +0 -3
- package/.next/server/chunks/ssr/app_0ap_oiq._.js.map +0 -1
- package/.next/static/chunks/07oobuohrpigy.js +0 -1
- package/.next/static/chunks/0pf4_9.-8s34p.js +0 -1
- /package/.next/static/{I8oYGCFqEglZXHP7xG8Cd → cmKfFz_TQxAhlloCMBbuN}/_buildManifest.js +0 -0
- /package/.next/static/{I8oYGCFqEglZXHP7xG8Cd → cmKfFz_TQxAhlloCMBbuN}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{I8oYGCFqEglZXHP7xG8Cd → cmKfFz_TQxAhlloCMBbuN}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[43515,a=>{"use strict";a.s(["formatUptime",0,function(a){let b=Math.floor(a/3600),c=Math.floor(a%3600/60);return b>0?`${b}h ${c}m`:`${c}m`},"timeAgo",0,function(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}])},1720,a=>{"use strict";var b=a.i(87924);let c=[180,200,220,270,300,330,30,90];a.s(["AliasAvatar",0,function({alias:a,size:d=28,className:e=""}){let f=function(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;let d=c[b%c.length];return{bg:`hsl(${d} 55% 22%)`,ring:`hsl(${d} 60% 45%)`,text:`hsl(${d} 80% 78%)`}}(a),g=Math.max(9,Math.round(.42*d));return(0,b.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${e}`,style:{width:d,height:d,fontSize:g,backgroundColor:f.bg,borderColor:f.ring,color:f.text},title:a,"aria-hidden":!0,children:a?(a.trim().match(/[\p{L}\p{N}]/u)?.[0]||a.trim()[0]||"·").toUpperCase():"·"})}])},44332,a=>{"use strict";var b=a.i(72596),c=a.i(22397);let d=async a=>{let b=await fetch(a);if(401===b.status)throw window.location.assign("/login"),Error("unauthorized");return b.json()},e={refreshInterval:5e3,dedupingInterval:3e3};function f(a,b){if(!b)return a;let c=a.includes("?")?"&":"?";return`${a}${c}network_id=${encodeURIComponent(b)}`}a.s(["useAnetConfig",0,function(){let{data:a}=(0,b.default)("/api/anet/config",d,{refreshInterval:3e4});return{config:a||null}},"useHealth",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/health",d,e);return{health:a||null,error:c}},"useLicense",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/license",d,{refreshInterval:6e4});return{license:a?.ok?a:null,error:c}},"useMessages",0,function(a=100){let{networkId:g}=(0,c.useNetworkId)(),{data:h,error:i,isLoading:j}=(0,b.default)(f(`/api/hub/messages?limit=${a}`,g),d,e);return{messages:h?.messages||[],error:i,isLoading:j}},"useSessions",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h,isLoading:i}=(0,b.default)(f("/api/hub/status",a),d,e);return{sessions:g?.sessions||[],hint:g?._hint,error:h,isLoading:i}},"useStats",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/stats",a),d,e);return{stats:g?.ok?g:null,error:h}},"useTasks",0,function(a){let{networkId:g}=(0,c.useNetworkId)(),h=new URLSearchParams({limit:"100",...a}).toString(),{data:i,error:j,isLoading:k}=(0,b.default)(f(`/api/hub/tasks?${h}`,g),d,e);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:j,isLoading:k}}])},88367,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(44332),e=a.i(43515),f=a.i(1720);a.s(["default",0,function(){let{sessions:a}=(0,d.useSessions)(),{health:g}=(0,d.useHealth)(),{stats:h}=(0,d.useStats)(),i=g?.sse_sessions||{},j=a=>(a.network_id?i[`${a.network_id}:${a.alias}`]:void 0)??i[a.alias],[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(""),[s,t]=(0,c.useState)(""),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(""),[y,z]=(0,c.useState)(""),A=async()=>{if(k.trim()&&m.trim()){try{let a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:k,password:m})}),b=await a.json();p(b.ok?`Created: ${b.user.username} (${b.user.user_id})`:`Failed: ${b.error}`),b.ok&&(l(""),n(""))}catch{p("Failed")}setTimeout(()=>p(""),8e3)}},B=async()=>{if(q.trim()){try{let a=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:q})}),b=await a.json();t(b.ok?`Sent to ${b.recipients} nodes`:`Failed: ${b.error}`),b.ok&&r("")}catch{t("Failed")}setTimeout(()=>t(""),5e3)}},C=async()=>{if(u&&w.trim()){try{let a=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:u,task:w})}),b=await a.json();z(b.ok?"Task sent":`Failed: ${b.error}`),b.ok&&x("")}catch{z("Failed")}setTimeout(()=>z(""),5e3)}},D=a.filter(a=>j(a)),E=a.filter(a=>!j(a));return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Admin"}),(0,b.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#status",label:"Status"},{href:"#actions",label:"Actions"},{href:"#users",label:"Users"}].map(a=>(0,b.jsx)("a",{href:a.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:a.label},a.href))}),(0,b.jsxs)("div",{className:"max-w-6xl space-y-10",children:[(0,b.jsxs)("div",{id:"status",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Status"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Overview"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:D.length}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:E.length}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:g?.sse_connections??"--"}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"SSE Connections"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:h?.tasks?.total??"--"}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),h?.tasks?.by_status&&h.tasks.by_status.length>0&&(0,b.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:h.tasks.by_status.map(a=>(0,b.jsxs)("span",{className:"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400",children:[a.status,": ",a.count]},a.status))})]}),(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:["Online Sessions ",(0,b.jsxs)("span",{className:"text-gray-600",children:["(",D.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===D.length?(0,b.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):D.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-3 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,b.jsx)(f.AliasAvatar,{alias:a.alias,size:20}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-sm text-white font-medium truncate",children:a.alias}),(0,b.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[a.agent||"--"," · ",a.task||"idle"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===a.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:a.status}),(0,b.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,e.timeAgo)(a.updated_at)})]})]},a.alias))})]})]})]}),(0,b.jsxs)("div",{id:"actions",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Actions"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Broadcast"}),(0,b.jsx)("textarea",{value:q,onChange:a=>r(a.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,b.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,b.jsxs)("span",{className:"text-xs text-gray-600",children:[q.length,"/500"]}),(0,b.jsx)("button",{onClick:B,disabled:!q.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),s&&(0,b.jsx)("div",{className:`mt-2 text-xs ${s.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:s})]}),(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Send Task"}),(0,b.jsxs)("select",{value:u,onChange:a=>v(a.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,b.jsx)("option",{value:"",children:"Select target node..."}),D.map(a=>(0,b.jsxs)("option",{value:a.alias,children:[a.alias," (",a.status,")"]},a.alias)),(0,b.jsx)("optgroup",{label:"Offline",children:E.map(a=>(0,b.jsxs)("option",{value:a.alias,children:[a.alias," (offline)"]},a.alias))})]}),(0,b.jsx)("textarea",{value:w,onChange:a=>x(a.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,b.jsx)("div",{className:"flex justify-end mt-3",children:(0,b.jsx)("button",{onClick:C,disabled:!u||!w.trim(),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:"Send Task"})}),y&&(0,b.jsx)("div",{className:`mt-2 text-xs ${y.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:y})]})]})]}),(0,b.jsxs)("div",{id:"users",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Users"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Register User (V3)"}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("input",{type:"text",value:k,onChange:a=>l(a.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,b.jsx)("input",{type:"password",value:m,onChange:a=>n(a.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,b.jsx)("button",{onClick:A,disabled:!k.trim()||!m.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),o&&(0,b.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})})]})]})]})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=app_0tncr1_._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../app/components/utils.ts","../../../../app/components/AliasAvatar.tsx","../../../../app/lib/hooks.ts","../../../../app/admin/page.tsx"],"sourcesContent":["export function timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n\nexport function formatUptime(seconds: number): string {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n if (h > 0) return `${h}h ${m}m`;\n return `${m}m`;\n}\n","/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n","import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useLicense() {\n const { data, error } = useSWR('/api/hub/license', fetcher, { refreshInterval: 60000 });\n return { license: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n\nexport function useNodeSession(alias: string) {\n const { data, error, isLoading } = useSWR(\n alias ? `/api/hub/session?alias=${encodeURIComponent(alias)}` : null,\n fetcher,\n SWR_OPTIONS,\n );\n return {\n session: data?.session || null,\n inbox: data?.inbox || [],\n sse: data?.sse || 0,\n error,\n isLoading,\n };\n}\n","'use client';\n\nimport { useState } from 'react';\nimport { useSessions, useHealth, useStats } from '../lib/hooks';\nimport { timeAgo } from '../components/utils';\nimport { AliasAvatar } from '../components/AliasAvatar';\n\nexport default function AdminPage() {\n const { sessions } = useSessions();\n const { health } = useHealth();\n const { stats } = useStats();\n const sseMap = health?.sse_sessions || {};\n // SSE keys are `network_id:alias` since server v0.7+; fall back to alias-only.\n const sseFor = (s: { alias: string; network_id?: string }) =>\n (s.network_id ? sseMap[`${s.network_id}:${s.alias}`] : undefined) ?? sseMap[s.alias];\n\n const [regUser, setRegUser] = useState('');\n const [regPass, setRegPass] = useState('');\n const [regResult, setRegResult] = useState('');\n const [broadcastMsg, setBroadcastMsg] = useState('');\n const [broadcastResult, setBroadcastResult] = useState('');\n const [taskTarget, setTaskTarget] = useState('');\n const [taskContent, setTaskContent] = useState('');\n const [taskResult, setTaskResult] = useState('');\n\n const registerUser = async () => {\n if (!regUser.trim() || !regPass.trim()) return;\n try {\n const res = await fetch('/api/hub/auth', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ action: 'register', username: regUser, password: regPass }),\n });\n const data = await res.json();\n setRegResult(data.ok ? `Created: ${data.user.username} (${data.user.user_id})` : `Failed: ${data.error}`);\n if (data.ok) { setRegUser(''); setRegPass(''); }\n } catch { setRegResult('Failed'); }\n setTimeout(() => setRegResult(''), 8000);\n };\n\n const sendBroadcast = async () => {\n if (!broadcastMsg.trim()) return;\n try {\n const res = await fetch('/api/hub/broadcast', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ message: broadcastMsg }),\n });\n const data = await res.json();\n setBroadcastResult(data.ok ? `Sent to ${data.recipients} nodes` : `Failed: ${data.error}`);\n if (data.ok) setBroadcastMsg('');\n } catch { setBroadcastResult('Failed'); }\n setTimeout(() => setBroadcastResult(''), 5000);\n };\n\n const sendTask = async () => {\n if (!taskTarget || !taskContent.trim()) return;\n try {\n const res = await fetch('/api/hub/send', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ alias: taskTarget, task: taskContent }),\n });\n const data = await res.json();\n setTaskResult(data.ok ? 'Task sent' : `Failed: ${data.error}`);\n if (data.ok) setTaskContent('');\n } catch { setTaskResult('Failed'); }\n setTimeout(() => setTaskResult(''), 5000);\n };\n\n const onlineNodes = sessions.filter(s => sseFor(s));\n const offlineNodes = sessions.filter(s => !sseFor(s));\n\n return (\n <div className=\"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono\">\n <h1 className=\"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10\">Admin</h1>\n\n {/* Section anchor nav — same pattern as Settings r28. */}\n <nav className=\"mb-8 flex flex-wrap gap-1 text-xs\">\n {[\n { href: '#status', label: 'Status' },\n { href: '#actions', label: 'Actions' },\n { href: '#users', label: 'Users' },\n ].map(a => (\n <a key={a.href} href={a.href}\n className=\"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors\">\n {a.label}\n </a>\n ))}\n </nav>\n\n <div className=\"max-w-6xl space-y-10\">\n\n {/* ── Group: Status ─────────────────────────────────────── */}\n <div id=\"status\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Status</div>\n <div className=\"flex-1 h-px bg-[#2a2a4a]\" />\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n\n {/* Server Overview */}\n <section className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Server Overview</h2>\n <div className=\"grid grid-cols-2 gap-4 text-sm\">\n <div>\n <div className=\"text-3xl font-bold text-green-400 tabular-nums\">{onlineNodes.length}</div>\n <div className=\"text-xs text-gray-500\">Online</div>\n </div>\n <div>\n <div className=\"text-3xl font-bold text-gray-500 tabular-nums\">{offlineNodes.length}</div>\n <div className=\"text-xs text-gray-500\">Offline</div>\n </div>\n <div>\n <div className=\"text-3xl font-bold text-cyan-400 tabular-nums\">{health?.sse_connections ?? '--'}</div>\n <div className=\"text-xs text-gray-500\">SSE Connections</div>\n </div>\n <div>\n <div className=\"text-3xl font-bold text-white tabular-nums\">{stats?.tasks?.total ?? '--'}</div>\n <div className=\"text-xs text-gray-500\">Total Tasks</div>\n </div>\n </div>\n {stats?.tasks?.by_status && stats.tasks.by_status.length > 0 && (\n <div className=\"mt-4 flex flex-wrap gap-2\">\n {stats.tasks.by_status.map((s: { status: string; count: number }) => (\n <span key={s.status} className=\"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400\">\n {s.status}: {s.count}\n </span>\n ))}\n </div>\n )}\n </section>\n\n {/* Online Sessions — pulled into Status group (was below Send Task) */}\n <section className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">\n Online Sessions <span className=\"text-gray-600\">({onlineNodes.length})</span>\n </h2>\n <div className=\"space-y-2 max-h-80 overflow-y-auto\">\n {onlineNodes.length === 0 ? (\n <div className=\"text-xs text-gray-600 text-center py-4\">No online sessions</div>\n ) : onlineNodes.map(s => (\n <div key={s.alias} className=\"flex items-center gap-3 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]\">\n <AliasAvatar alias={s.alias} size={20} />\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-sm text-white font-medium truncate\">{s.alias}</div>\n <div className=\"text-xs text-gray-500 truncate\">{s.agent || '--'} · {s.task || 'idle'}</div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <span className={`text-xs px-2 py-0.5 rounded border ${\n s.status === 'working' ? 'bg-green-900/30 text-green-300 border-green-800/30' : 'bg-blue-900/30 text-blue-300 border-blue-800/30'\n }`}>{s.status}</span>\n <span className=\"text-[10px] text-gray-600\">{timeAgo(s.updated_at)}</span>\n </div>\n </div>\n ))}\n </div>\n </section>\n\n </div>\n </div>\n\n {/* ── Group: Actions ────────────────────────────────────── */}\n <div id=\"actions\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Actions</div>\n <div className=\"flex-1 h-px bg-[#2a2a4a]\" />\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n\n {/* Broadcast */}\n <section className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Broadcast</h2>\n <textarea\n value={broadcastMsg}\n onChange={e => setBroadcastMsg(e.target.value)}\n placeholder=\"Message to all online nodes...\"\n rows={3}\n className=\"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none\"\n />\n <div className=\"flex justify-between items-center mt-3\">\n <span className=\"text-xs text-gray-600\">{broadcastMsg.length}/500</span>\n <button\n onClick={sendBroadcast}\n disabled={!broadcastMsg.trim()}\n className=\"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors\"\n >\n Broadcast\n </button>\n </div>\n {broadcastResult && <div className={`mt-2 text-xs ${broadcastResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{broadcastResult}</div>}\n </section>\n\n {/* Send Task */}\n <section className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Send Task</h2>\n <select\n value={taskTarget}\n onChange={e => setTaskTarget(e.target.value)}\n className=\"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3\"\n >\n <option value=\"\">Select target node...</option>\n {onlineNodes.map(s => (\n <option key={s.alias} value={s.alias}>{s.alias} ({s.status})</option>\n ))}\n <optgroup label=\"Offline\">\n {offlineNodes.map(s => (\n <option key={s.alias} value={s.alias}>{s.alias} (offline)</option>\n ))}\n </optgroup>\n </select>\n <textarea\n value={taskContent}\n onChange={e => setTaskContent(e.target.value)}\n placeholder=\"Task content...\"\n rows={3}\n className=\"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none\"\n />\n <div className=\"flex justify-end mt-3\">\n <button\n onClick={sendTask}\n disabled={!taskTarget || !taskContent.trim()}\n 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\"\n >\n Send Task\n </button>\n </div>\n {taskResult && <div className={`mt-2 text-xs ${taskResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{taskResult}</div>}\n </section>\n\n </div>\n </div>\n\n {/* ── Group: Users ──────────────────────────────────────── */}\n <div id=\"users\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Users</div>\n <div className=\"flex-1 h-px bg-[#2a2a4a]\" />\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n\n {/* User Management (V3 Auth) */}\n <section className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Register User (V3)</h2>\n <div className=\"space-y-3\">\n <input\n type=\"text\"\n value={regUser}\n onChange={e => setRegUser(e.target.value)}\n placeholder=\"Username\"\n className=\"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\"\n />\n <input\n type=\"password\"\n value={regPass}\n onChange={e => setRegPass(e.target.value)}\n placeholder=\"Password\"\n className=\"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\"\n />\n <button\n onClick={registerUser}\n disabled={!regUser.trim() || !regPass.trim()}\n className=\"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors\"\n >\n Register\n </button>\n </div>\n {regResult && <div className={`mt-2 text-xs ${regResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{regResult}</div>}\n </section>\n\n </div>\n </div>\n\n </div>\n </div>\n );\n}\n"],"names":["timeAgo","dateStr","diff","Date","now","replace","getTime","s","Math","floor","statusColor","status","hasSse","formatUptime","seconds","h","m","AVATAR_HUES","aliasAvatarColors","alias","i","length","charCodeAt","hue","bg","ring","text","aliasInitial","ch","trim","match","toUpperCase","AliasAvatar","size","className","c","fs","max","round","style","width","height","fontSize","backgroundColor","borderColor","color","title","fetcher","url","res","fetch","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","hint","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","tasks","count","source","useStats","stats","ok","useLicense","license","useMessages","messages","useNodeSession","session","inbox","sse","AdminPage","sseMap","sse_sessions","sseFor","network_id","undefined","regUser","setRegUser","regPass","setRegPass","regResult","setRegResult","broadcastMsg","setBroadcastMsg","broadcastResult","setBroadcastResult","taskTarget","setTaskTarget","taskContent","setTaskContent","taskResult","setTaskResult","registerUser","method","headers","body","JSON","stringify","action","username","password","user","user_id","setTimeout","sendBroadcast","message","recipients","sendTask","task","onlineNodes","filter","offlineNodes","href","label","map","a","id","sse_connections","total","by_status","agent","updated_at","value","onChange","e","target","placeholder","rows","onClick","disabled","startsWith","type"],"mappings":"6DAkBO,SAASa,AAAaC,CAAe,EAC1C,IAAMC,EAAIP,KAAKC,KAAK,CAACK,EAAU,MACzBE,EAAIR,KAAKC,KAAK,CAAEK,EAAU,KAAQ,WACxC,AAAIC,EAAI,EAAU,CAAP,AAAO,EAAGA,EAAE,EAAE,EAAEC,EAAE,CAAC,CAAC,CACxB,CAAA,EAAGA,EAAE,CAAC,CAAC,AAChB,cAvBO,SAAiBf,AAARD,CAAuB,EACrC,GAAI,CAACC,EAAS,MAAO,KAErB,IAAMM,EAAIC,KAAKC,KAAK,CAACP,CADRC,KAAKC,GAAG,GAAK,IAAID,KAAKF,EAAQI,OAAO,CAAC,IAAK,KAAO,KAAKC,OAAO,EAAA,EAC/C,YAC5B,AAAIC,EAAI,GAAW,CAAP,AAAO,EAAGA,EAAE,KAAK,CAAC,CAC1BA,EAAI,KAAa,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,IAAI,KAAK,CAAC,CAC7CA,EAAI,MAAc,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,MAAM,KAAK,CAAC,CAC7C,CAAA,EAAGC,KAAKC,KAAK,CAACF,EAAI,OAAO,KAAK,CAAC,AACxC,4CCHA,IAAMU,EAAc,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAI,GAAG,sBAyBnD,SAASe,AAAY,OAAEb,CAAK,MAAEc,EAAO,EAAE,CAAEC,YAAY,EAAE,CAAoB,EAChF,IAAMC,EAxBD,AAwBKjB,SAxBIA,AAAkBC,CAAa,EA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,WACZrH,UAAU,yJAEZ,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CACC0H,KAAK,WACLT,MAAO5C,EACP6C,SAAUC,GAAK7C,EAAW6C,EAAEC,MAAM,CAACH,KAAK,EACxCI,YAAY,WACZrH,UAAU,yJAEZ,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACCuH,QAASpC,EACTqC,SAAU,CAACrD,EAAQxE,IAAI,IAAM,CAAC0E,EAAQ1E,IAAI,GAC1CK,UAAU,wJACX,gBAIFuE,GAAa,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAIvE,UAAW,CAAC,aAAa,EAAEuE,EAAUkD,UAAU,CAAC,UAAY,eAAiB,iBAAA,CAAkB,UAAGlD,iBAS/H"}
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/cmKfFz_TQxAhlloCMBbuN/_buildManifest.js",
|
|
11
|
+
"static/cmKfFz_TQxAhlloCMBbuN/_ssgManifest.js",
|
|
12
|
+
"static/cmKfFz_TQxAhlloCMBbuN/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/0e-.zgw81gela.js",
|
|
@@ -9,4 +9,4 @@ try {
|
|
|
9
9
|
w-52
|
|
10
10
|
-translate-x-full
|
|
11
11
|
lg:translate-x-0 lg:static lg:shrink-0
|
|
12
|
-
"><a class="block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl" aria-label="Agent Network — home" href="/"><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true" class="shrink-0"><circle cx="16" cy="16" r="10" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.2" class="text-cyan-400"></circle><line x1="16" y1="10" x2="10" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><line x1="16" y1="10" x2="22" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><line x1="10" y1="20" x2="22" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><circle cx="16" cy="10" r="2.5" fill="currentColor" class="text-cyan-400"></circle><circle cx="10" cy="20" r="2.5" fill="currentColor" class="text-green-400"></circle><circle cx="22" cy="20" r="2.5" fill="currentColor" class="text-violet-400"></circle></svg><div class="min-w-0"><div class="text-white text-[13px] font-semibold leading-tight">Agent Network</div><div class="text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5"><span class="inline-block w-1.5 h-1.5 rounded-full bg-gray-600" aria-hidden="true"></span><span>waiting for agents</span></div></div></a><div class="border-b border-[#2a2a4a]"></div><div class="pb-20"><nav class="flex flex-col gap-1 px-2 py-4"><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="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"></path></svg><span>Overview</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/tasks"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Tasks</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/nodes"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Nodes</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/messages"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Messages</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/settings/networks"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Networks</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/logs"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Audit Log</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/server-logs"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Server Logs</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/admin"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Admin</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/settings"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Settings</span></a></nav></div><div class="absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]"><button class="w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors justify-between gap-2 px-5 py-2" aria-label="Open command palette"><span class="flex items-center gap-2"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Quick search</span><kbd class="text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono">⌘K</kbd></button><button class="w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors gap-3 px-5 py-3"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="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"></path></svg>Sign out</button><div class="flex items-center gap-2 px-3 py-2 justify-between"><div class="relative"><button aria-label="切换主题" class="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)"><span aria-hidden="true">🌃</span><span>Cyber</span></button></div><button title="Collapse sidebar" class="hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors" aria-label="Collapse sidebar"><svg class="w-4 h-4 transition-transform " fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"></path></svg></button></div></div></aside><main class="flex-1 min-w-0 flex flex-col"><div class="flex-1 min-w-0"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/_next/static/chunks/0e-.zgw81gela.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[84128,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"ThemeProvider\"]\n3:I[58963,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"NetworkProvider\"]\n4:I[25045,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"AppShell\"]\n5:I[39756,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\"]\n6:I[37457,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\"]\n7:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\nb:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"ViewportBoundary\"]\nd:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"MetadataBoundary\"]\nf:I[68027,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0irp6cdaafs7m.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0irp6cdaafs7m.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/14bsg3_-taiw4.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0w1zwt8kq_7nb.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"cyber\",\"className\":\"geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\ntry {\\n var t = localStorage.getItem('anet-theme') || 'cyber';\\n document.documentElement.setAttribute('data-theme', t);\\n} catch (e) {}\\n\"}}]}],[\"$\",\"body\",null,{\"className\":\"min-h-full\",\"style\":{\"background\":\"var(--bg)\",\"color\":\"var(--fg)\"},\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,\"$@a\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0irp6cdaafs7m.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"I8oYGCFqEglZXHP7xG8Cd\"}\n"])</script><script>self.__next_f.push([1,"10:[]\na:\"$W10\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a1a\"}]]\n"])</script><script>self.__next_f.push([1,"11:I[27201,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"IconMark\"]\n9:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes via CommHub\"}],[\"$\",\"meta\",\"2\",{\"property\":\"og:title\",\"content\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"3\",{\"property\":\"og:description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:title\",\"content\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"7\",{\"name\":\"twitter:description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L11\",\"10\",{}]]\n"])</script></body></html>
|
|
12
|
+
"><a class="block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl" aria-label="Agent Network — home" href="/"><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true" class="shrink-0"><circle cx="16" cy="16" r="10" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.2" class="text-cyan-400"></circle><line x1="16" y1="10" x2="10" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><line x1="16" y1="10" x2="22" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><line x1="10" y1="20" x2="22" y2="20" stroke="currentColor" stroke-width="1" opacity="0.45" class="text-cyan-400"></line><circle cx="16" cy="10" r="2.5" fill="currentColor" class="text-cyan-400"></circle><circle cx="10" cy="20" r="2.5" fill="currentColor" class="text-green-400"></circle><circle cx="22" cy="20" r="2.5" fill="currentColor" class="text-violet-400"></circle></svg><div class="min-w-0"><div class="text-white text-[13px] font-semibold leading-tight">Agent Network</div><div class="text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5"><span class="inline-block w-1.5 h-1.5 rounded-full bg-gray-600" aria-hidden="true"></span><span>waiting for agents</span></div></div></a><div class="border-b border-[#2a2a4a]"></div><div class="pb-20"><nav class="flex flex-col gap-1 px-2 py-4"><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="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"></path></svg><span>Overview</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/tasks"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Tasks</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/nodes"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Nodes</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/messages"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Messages</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/settings/networks"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Networks</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/logs"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Audit Log</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/server-logs"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Server Logs</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/admin"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Admin</span></a><a class="relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a] " href="/settings"><svg class="w-5 h-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" 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"></path></svg><span>Settings</span></a></nav></div><div class="absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]"><button class="w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors justify-between gap-2 px-5 py-2" aria-label="Open command palette"><span class="flex items-center gap-2"><svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Quick search</span><kbd class="text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono">⌘K</kbd></button><button class="w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors gap-3 px-5 py-3"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="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"></path></svg>Sign out</button><div class="flex items-center gap-2 px-3 py-2 justify-between"><div class="relative"><button aria-label="切换主题" class="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)"><span aria-hidden="true">🌃</span><span>Cyber</span></button></div><button title="Collapse sidebar" class="hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors" aria-label="Collapse sidebar"><svg class="w-4 h-4 transition-transform " fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"></path></svg></button></div></div></aside><main class="flex-1 min-w-0 flex flex-col"><div class="flex-1 min-w-0"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/_next/static/chunks/0e-.zgw81gela.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[84128,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"ThemeProvider\"]\n3:I[58963,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"NetworkProvider\"]\n4:I[25045,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"AppShell\"]\n5:I[39756,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\"]\n6:I[37457,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\"]\n7:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\nb:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"ViewportBoundary\"]\nd:I[97367,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"MetadataBoundary\"]\nf:I[68027,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0irp6cdaafs7m.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0irp6cdaafs7m.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/14bsg3_-taiw4.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0w1zwt8kq_7nb.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"cyber\",\"className\":\"geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\ntry {\\n var t = localStorage.getItem('anet-theme') || 'cyber';\\n document.documentElement.setAttribute('data-theme', t);\\n} catch (e) {}\\n\"}}]}],[\"$\",\"body\",null,{\"className\":\"min-h-full\",\"style\":{\"background\":\"var(--bg)\",\"color\":\"var(--fg)\"},\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,\"$@a\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0irp6cdaafs7m.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"cmKfFz_TQxAhlloCMBbuN\"}\n"])</script><script>self.__next_f.push([1,"10:[]\na:\"$W10\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a1a\"}]]\n"])</script><script>self.__next_f.push([1,"11:I[27201,[\"/_next/static/chunks/15nn5pyy3l5zo.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\",\"/_next/static/chunks/0w1zwt8kq_7nb.js\"],\"IconMark\"]\n9:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes via CommHub\"}],[\"$\",\"meta\",\"2\",{\"property\":\"og:title\",\"content\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"3\",{\"property\":\"og:description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:title\",\"content\":\"Agent Network Dashboard\"}],[\"$\",\"meta\",\"7\",{\"name\":\"twitter:description\",\"content\":\"Real-time monitoring dashboard for Agent Network nodes\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L11\",\"10\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0e-.zgw81gela.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/0u359llqm1_01.js" async=""></script><script src="/_next/static/chunks/0257pdz1-imal.js" async=""></script><script src="/_next/static/chunks/turbopack-01f1xs~cq_~si.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/14bsg3_-taiw4.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0e-.zgw81gela.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0e-.zgw81gela.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/0u359llqm1_01.js" async=""></script><script src="/_next/static/chunks/0257pdz1-imal.js" async=""></script><script src="/_next/static/chunks/turbopack-01f1xs~cq_~si.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/14bsg3_-taiw4.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0e-.zgw81gela.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"cmKfFz_TQxAhlloCMBbuN\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/14bsg3_-taiw4.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"nTOWtFTDR/Aev1d5mDjyo0ngviXzfcGuM810/IQRpVU=\"\n}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let s=Math.floor(e/3600),t=Math.floor(e%3600/60);return s>0?`${s}h ${t}m`:`${t}m`},"timeAgo",0,function(e){if(!e)return"--";let s=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`}])},69874,e=>{"use strict";var s=e.i(18050);let t=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let l=function(e){let s=0;for(let t=0;t<e.length;t++)s=31*s+e.charCodeAt(t)>>>0;let a=t[s%t.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),i=Math.max(9,Math.round(.42*a));return(0,s.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:i,backgroundColor:l.bg,borderColor:l.ring,color:l.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},65822,e=>{"use strict";var s=e.i(83599),t=e.i(58963);let a=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 l(e,s){if(!s)return e;let t=e.includes("?")?"&":"?";return`${e}${t}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:t}=(0,s.default)("/api/hub/health",a,r);return{health:e||null,error:t}},"useLicense",0,function(){let{data:e,error:t}=(0,s.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:t}},"useMessages",0,function(e=100){let{networkId:i}=(0,t.useNetworkId)(),{data:n,error:o,isLoading:d}=(0,s.default)(l(`/api/hub/messages?limit=${e}`,i),a,r);return{messages:n?.messages||[],error:o,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,t.useNetworkId)(),{data:i,error:n,isLoading:o}=(0,s.default)(l("/api/hub/status",e),a,r);return{sessions:i?.sessions||[],hint:i?._hint,error:n,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,t.useNetworkId)(),{data:i,error:n}=(0,s.default)(l("/api/hub/stats",e),a,r);return{stats:i?.ok?i:null,error:n}},"useTasks",0,function(e){let{networkId:i}=(0,t.useNetworkId)(),n=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:d,isLoading:c}=(0,s.default)(l(`/api/hub/tasks?${n}`,i),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:d,isLoading:c}}])},23261,e=>{"use strict";var s=e.i(18050),t=e.i(71645),a=e.i(65822),r=e.i(18150),l=e.i(69874);e.s(["default",0,function(){let{sessions:e}=(0,a.useSessions)(),{health:i}=(0,a.useHealth)(),{stats:n}=(0,a.useStats)(),o=i?.sse_sessions||{},d=e=>(e.network_id?o[`${e.network_id}:${e.alias}`]:void 0)??o[e.alias],[c,x]=(0,t.useState)(""),[u,h]=(0,t.useState)(""),[m,g]=(0,t.useState)(""),[p,b]=(0,t.useState)(""),[f,j]=(0,t.useState)(""),[y,v]=(0,t.useState)(""),[N,w]=(0,t.useState)(""),[k,S]=(0,t.useState)(""),$=async()=>{if(c.trim()&&u.trim()){try{let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:c,password:u})}),s=await e.json();g(s.ok?`Created: ${s.user.username} (${s.user.user_id})`:`Failed: ${s.error}`),s.ok&&(x(""),h(""))}catch{g("Failed")}setTimeout(()=>g(""),8e3)}},T=async()=>{if(p.trim()){try{let e=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:p})}),s=await e.json();j(s.ok?`Sent to ${s.recipients} nodes`:`Failed: ${s.error}`),s.ok&&b("")}catch{j("Failed")}setTimeout(()=>j(""),5e3)}},C=async()=>{if(y&&N.trim()){try{let e=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:y,task:N})}),s=await e.json();S(s.ok?"Task sent":`Failed: ${s.error}`),s.ok&&w("")}catch{S("Failed")}setTimeout(()=>S(""),5e3)}},A=e.filter(e=>d(e)),O=e.filter(e=>!d(e));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:"Admin"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#status",label:"Status"},{href:"#actions",label:"Actions"},{href:"#users",label:"Users"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-6xl space-y-10",children:[(0,s.jsxs)("div",{id:"status",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:"Status"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(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 Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:A.length}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:O.length}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:i?.sse_connections??"--"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"SSE Connections"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:n?.tasks?.total??"--"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),n?.tasks?.by_status&&n.tasks.by_status.length>0&&(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:n.tasks.by_status.map(e=>(0,s.jsxs)("span",{className:"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400",children:[e.status,": ",e.count]},e.status))})]}),(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",children:["Online Sessions ",(0,s.jsxs)("span",{className:"text-gray-600",children:["(",A.length,")"]})]}),(0,s.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===A.length?(0,s.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):A.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,s.jsx)(l.AliasAvatar,{alias:e.alias,size:20}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm text-white font-medium truncate",children:e.alias}),(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[e.agent||"--"," · ",e.task||"idle"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===e.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:e.status}),(0,s.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.updated_at)})]})]},e.alias))})]})]})]}),(0,s.jsxs)("div",{id:"actions",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:"Actions"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(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:"Broadcast"}),(0,s.jsx)("textarea",{value:p,onChange:e=>b(e.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,s.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,s.jsxs)("span",{className:"text-xs text-gray-600",children:[p.length,"/500"]}),(0,s.jsx)("button",{onClick:T,disabled:!p.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),f&&(0,s.jsx)("div",{className:`mt-2 text-xs ${f.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:f})]}),(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:"Send Task"}),(0,s.jsxs)("select",{value:y,onChange:e=>v(e.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,s.jsx)("option",{value:"",children:"Select target node..."}),A.map(e=>(0,s.jsxs)("option",{value:e.alias,children:[e.alias," (",e.status,")"]},e.alias)),(0,s.jsx)("optgroup",{label:"Offline",children:O.map(e=>(0,s.jsxs)("option",{value:e.alias,children:[e.alias," (offline)"]},e.alias))})]}),(0,s.jsx)("textarea",{value:N,onChange:e=>w(e.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,s.jsx)("div",{className:"flex justify-end mt-3",children:(0,s.jsx)("button",{onClick:C,disabled:!y||!N.trim(),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:"Send Task"})}),k&&(0,s.jsx)("div",{className:`mt-2 text-xs ${k.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:k})]})]})]}),(0,s.jsxs)("div",{id:"users",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:"Users"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(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:"Register User (V3)"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:u,onChange:e=>h(e.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:$,disabled:!c.trim()||!u.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),m&&(0,s.jsx)("div",{className:`mt-2 text-xs ${m.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:m})]})})]})]})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16015,(e,t,s)=>{},98547,(e,t,s)=>{var r=e.i(47167);e.r(16015);var a=e.r(71645),n=a&&"object"==typeof a&&"default"in a?a:{default:a},l=void 0!==r.default&&r.default.env&&!0,i=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,a=t.optimizeForSpeed,n=void 0===a?l:a;d(i(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",d("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(d(i(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var s="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];d(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},s.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&d(i(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return s?a.insertBefore(r,s):a.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},x={};function h(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return x[r]||(x[r]="jsx-"+c(e+"-"+s)),x[r]}function u(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return x[s]||(x[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),x[s]}var f=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,a=t.optimizeForSpeed,n=void 0!==a&&a;this._sheet=r||new o({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),r&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,a=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var n=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=n,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var a=h(r,s);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return u(a,e)}):[u(a,t)]}}return{styleId:h(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=a.createContext(null);function p(){return new f}function g(){return a.useContext(m)}m.displayName="StyleSheetContext";var b=n.default.useInsertionEffect||n.default.useLayoutEffect,y="u">typeof window?p():void 0;function j(e){var t=y||g();return t&&("u"<typeof window?t.add(e):b(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}j.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},s.StyleRegistry=function(e){var t=e.registry,s=e.children,r=a.useContext(m),l=a.useState(function(){return r||t||p()})[0];return n.default.createElement(m.Provider,{value:l},s)},s.createStyleRegistry=p,s.style=j,s.useStyleRegistry=g},21373,(e,t,s)=>{t.exports=e.r(98547).style},31713,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),a=e.i(22016),n=e.i(18150);function l({online:e,working:t,total:r,version:a,uptime:n}){let o=r>0?Math.round(e/r*100):0;return(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:["CommHub ",a," · ",n]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,s.jsx)(i,{value:e,label:"Online",sub:`${o}% of fleet`,color:"text-green-400",accent:"from-green-500/20 to-green-500/0",border:"border-green-500/15"}),(0,s.jsx)(i,{value:t,label:"Working",sub:e>0?`${Math.round(t/e*100)}% utilization`:"--",color:"text-cyan-400",accent:"from-cyan-500/20 to-cyan-500/0",border:"border-cyan-500/15"}),(0,s.jsx)(i,{value:r-e,label:"Offline",sub:r-e==0?"All systems go":`${r-e} disconnected`,color:"text-gray-400",accent:"from-gray-500/10 to-gray-500/0",border:"border-gray-500/15"}),(0,s.jsx)(i,{value:r,label:"Total",sub:"Registered nodes",color:"text-white",accent:"from-blue-500/15 to-blue-500/0",border:"border-blue-500/15"})]})]})}function i({value:e,label:t,sub:r,color:a,accent:n,border:l}){let o=a.replace("text-","").split("-")[0];return(0,s.jsxs)("div",{"data-anet-stat-card":o,className:`anet-stat-card relative overflow-hidden rounded-xl border ${l} bg-[#111128] px-4 py-3 transition-all`,children:[(0,s.jsx)("div",{className:`absolute inset-0 bg-gradient-to-br ${n} pointer-events-none`}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:`text-3xl font-bold ${a} tabular-nums leading-tight`,children:e}),(0,s.jsx)("div",{className:"text-sm text-gray-300 mt-0.5",children:t}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:r})]})]})}function o(){let[e,t]=(0,r.useState)(""),[a,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)(""),o=async()=>{if(e.trim()){n(!0),i("");try{let s=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),r=await s.json();r.ok?(i(`Broadcast sent to ${r.recipients} node(s)`),t("")):i(`Failed: ${r.error||"Send error"}`)}catch(e){i(`Failed: ${e instanceof Error?e.message:"Send error"}`)}n(!1),setTimeout(()=>i(""),5e3)}};return(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:e,onChange:e=>t(e.target.value),onKeyDown:e=>"Enter"===e.key&&o(),placeholder:"Broadcast message to all online agents...",maxLength:500,"aria-label":"Broadcast message",className:"flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/20 focus:outline-none transition-colors"}),(0,s.jsx)("button",{onClick:o,disabled:a||!e.trim(),"aria-label":"Send broadcast",className:"px-5 py-2.5 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-all font-medium cursor-pointer disabled:cursor-not-allowed",children:a?"Sending...":"Broadcast"})]}),e.length>0&&(0,s.jsxs)("div",{className:"text-right text-xs text-gray-600 mt-1",children:[e.length,"/500"]}),l&&(0,s.jsx)("div",{className:`mt-3 text-sm text-center ${l.startsWith("Failed")?"text-red-400":"text-green-400/80"} animate-fade-in`,children:l})]})}function d(e,t,s,r=0){let a=t<=2?Math.PI:1.78*Math.PI,n=-Math.PI/2-a/2,l=t<=1?-Math.PI/2:n+a*e/(t-1)+r;return{x:500+s*Math.cos(l),y:330+s*Math.sin(l)}}function c(e,t,s=0){let r=(e.x+t.x)/2,a=(e.y+t.y)/2,n=t.x-e.x,l=t.y-e.y,i=Math.hypot(n,l)||1,o={x:r+-l/i*s,y:a+n/i*s};return`M${e.x},${e.y} Q${o.x},${o.y} ${t.x},${t.y}`}function x(e,t){return e.length>t?`${e.slice(0,t-1)}...`:e}let h={panelStops:["#0b1220","#080814","#101018"],radarStops:[{color:"#22d3ee",opacity:.18},{color:"#22c55e",opacity:.045},{color:"#020617",opacity:0}],arrowFill:"#67e8f9",ringStroke:"#164e63",spokeStroke:{active:"#22d3ee",idle:"#155e75"},flowEdge:"#67e8f9",flowPath:"#e0f2fe",flowParticle:"#fef08a",nodeFill:{online:"#020617",offline:"#080814"},labelBox:{fill:"#020617",stroke:"#1f2937"},legendBox:{fill:"#020617",stroke:"#1f2937"},legendText:"#94a3b8",legendHeadline:"#e5e7eb",legendAccent:"#67e8f9",containerBg:"#080814",containerBorder:"#2a2a4a",topRailGradient:"from-transparent via-cyan-400/70 to-transparent"},u={panelStops:["#f8fafc","#ffffff","#f1f5f9"],radarStops:[{color:"#10b981",opacity:.06},{color:"#3b82f6",opacity:.03},{color:"#ffffff",opacity:0}],arrowFill:"#10b981",ringStroke:"#cbd5e1",spokeStroke:{active:"#10b981",idle:"#cbd5e1"},flowEdge:"#10b981",flowPath:"#475569",flowParticle:"#f59e0b",nodeFill:{online:"#ffffff",offline:"#f8fafc"},labelBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendText:"#475569",legendHeadline:"#0f172a",legendAccent:"#0d9488",containerBg:"#ffffff",containerBorder:"#e3e6eb",topRailGradient:"from-transparent via-emerald-500/40 to-transparent"};function f({sessions:e,sseSessions:t}){let a="light"===function(){let[e,t]=(0,r.useState)("dark");return(0,r.useEffect)(()=>{let e=()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber";t("light"===e||"mint"===e?"light":"dark")};e();let s=new MutationObserver(e);return s.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>s.disconnect()},[]),e}(),n=a?u:h,[l,i]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=async()=>{try{let e=await fetch("/api/hub/messages?limit=50");if(401===e.status)return void window.location.assign("/login");let t=await e.json();i(t.messages||[])}catch{}};e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let{onlineNodes:o,offlineNodes:m,nodePositions:p,flowLinks:g,activeAliases:b}=(0,r.useMemo)(()=>{let s,r=e=>(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],a=e.filter(e=>"offline"!==e.status||r(e)),n=e.filter(e=>"offline"===e.status&&!r(e)),i={};a.forEach((e,t)=>{i[e.alias]=d(t,Math.max(a.length,1),220)});let o=a.length<=2?Math.PI:1.78*Math.PI,c=a.length>1?o/(a.length-1):0,x=a.length>0?c/2:0,h=315+6*Math.max(0,n.length-4);n.forEach((e,t)=>{i[e.alias]=d(t,Math.max(n.length,1),h,x)});let u=(s=new Map,l.forEach(e=>{if(!i[e.from_alias]||!i[e.to_alias]||e.from_alias===e.to_alias)return;let t=`${e.from_alias}->${e.to_alias}`,r=s.get(t);s.set(t,{key:t,from:e.from_alias,to:e.to_alias,count:(r?.count||0)+1,content:r?.content||e.content})}),[...s.values()].slice(0,18)),f=new Set;return u.forEach(e=>{f.add(e.from),f.add(e.to)}),{onlineNodes:a,offlineNodes:n,nodePositions:i,flowLinks:u,activeAliases:f}},[l,e,t]),y=o.filter(e=>"working"===e.status).length;return(0,s.jsxs)("section",{className:"w-full max-w-6xl mx-auto mb-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between mb-3 px-1",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-600 tracking-wider",children:"Network Topology"}),(0,s.jsx)("h2",{className:"text-lg text-white font-semibold",children:"Command mesh"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-green-500/10 text-green-300 border border-green-500/20",children:[y," working"]}),(0,s.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-300 border border-cyan-500/20",children:[o.length," online"]}),(0,s.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20",children:[g.length," active links"]})]})]}),(0,s.jsxs)("div",{className:`relative overflow-hidden rounded-lg border shadow-2xl ${a?"shadow-zinc-900/5":"shadow-cyan-950/30"}`,style:{background:n.containerBg,borderColor:n.containerBorder},children:[(0,s.jsx)("div",{className:`absolute inset-x-0 top-0 h-px bg-gradient-to-r ${n.topRailGradient}`}),(0,s.jsxs)("svg",{viewBox:"0 0 1000 680",className:"w-full h-auto block",preserveAspectRatio:"xMidYMid meet",children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"topo-panel",x1:"0",x2:"1",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:n.panelStops[0]}),(0,s.jsx)("stop",{offset:"48%",stopColor:n.panelStops[1]}),(0,s.jsx)("stop",{offset:"100%",stopColor:n.panelStops[2]})]}),(0,s.jsxs)("radialGradient",{id:"topo-radar",cx:"50%",cy:"50%",r:"55%",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:n.radarStops[0].color,stopOpacity:n.radarStops[0].opacity}),(0,s.jsx)("stop",{offset:"45%",stopColor:n.radarStops[1].color,stopOpacity:n.radarStops[1].opacity}),(0,s.jsx)("stop",{offset:"100%",stopColor:n.radarStops[2].color,stopOpacity:n.radarStops[2].opacity})]}),!a&&(0,s.jsxs)("filter",{id:"topo-glow",children:[(0,s.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,s.jsxs)("feMerge",{children:[(0,s.jsx)("feMergeNode",{in:"blur"}),(0,s.jsx)("feMergeNode",{in:"SourceGraphic"})]})]}),(0,s.jsx)("marker",{id:"topo-arrow",viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"5",markerHeight:"5",orient:"auto-start-reverse",children:(0,s.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:n.arrowFill})})]}),(0,s.jsx)("rect",{width:"1000",height:"680",fill:"url(#topo-panel)"}),(0,s.jsx)("circle",{cx:500,cy:330,r:"330",fill:"url(#topo-radar)"}),[90,170,250,330].map(e=>(0,s.jsx)("circle",{cx:500,cy:330,r:e,fill:"none",stroke:n.ringStroke,strokeWidth:"1",opacity:a?.6:.35},e)),[0,30,60,90,120,150].map(e=>(0,s.jsx)("line",{x1:500-360*Math.cos(e*Math.PI/180),y1:330-360*Math.sin(e*Math.PI/180),x2:500+360*Math.cos(e*Math.PI/180),y2:330+360*Math.sin(e*Math.PI/180),stroke:n.ringStroke,strokeWidth:"1",opacity:a?.35:.18},e)),o.map(e=>{let t=p[e.alias];if(!t)return null;let r=c({x:500,y:330},t,0);return(0,s.jsx)("path",{d:r,fill:"none",stroke:b.has(e.alias)?n.spokeStroke.active:n.spokeStroke.idle,strokeWidth:b.has(e.alias)?2:1,strokeDasharray:b.has(e.alias)?"none":"8 10",opacity:b.has(e.alias)?.65:.35},`hub-${e.alias}`)}),g.map((e,t)=>{let r=p[e.from],l=p[e.to];if(!r||!l)return null;let i=c(r,l,t%2==0?36:-36),o=Math.min(2+e.count,7);return(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:i,fill:"none",stroke:n.flowEdge,strokeWidth:o,opacity:a?.22:.28,filter:a?void 0:"url(#topo-glow)",markerEnd:"url(#topo-arrow)"}),(0,s.jsx)("path",{id:`flow-path-${t}`,d:i,fill:"none",stroke:n.flowPath,strokeWidth:"1",strokeDasharray:"2 12",opacity:a?.4:.75}),(0,s.jsx)("circle",{r:"4",fill:n.flowParticle,filter:a?void 0:"url(#topo-glow)",children:(0,s.jsx)("animateMotion",{dur:`${2.2+t%5*.32}s`,repeatCount:"indefinite",path:i})})]},e.key)}),(0,s.jsxs)("g",{children:[(0,s.jsx)("circle",{cx:500,cy:330,r:"18",fill:a?"#d1fae5":"#10b981",opacity:a?.35:.1}),(0,s.jsxs)("circle",{cx:500,cy:330,r:"10",fill:"none",stroke:"#10b981",strokeWidth:"1.5",children:[(0,s.jsx)("animate",{attributeName:"r",values:"10;38;10",dur:"2.4s",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"opacity",values:"0.55;0;0.55",dur:"2.4s",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:500,cy:330,r:"10",fill:"none",stroke:"#10b981",strokeWidth:"1.5",opacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",values:"10;38;10",dur:"2.4s",begin:"1.2s",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"opacity",values:"0.45;0;0.45",dur:"2.4s",begin:"1.2s",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:500,cy:330,r:"10",fill:a?"#059669":"#10b981"}),(0,s.jsx)("circle",{cx:500,cy:330,r:"5",fill:"#d1fae5",opacity:"0.9"})]}),[...o,...m].map(e=>{let r=p[e.alias];if(!r)return null;let l=(e.network_id?t[`${e.network_id}:${e.alias}`]:void 0)??t[e.alias],i="offline"!==e.status||!!l,o=i?"working"===e.status?{label:"working",primary:a?"#059669":"#22c55e",halo:a?"#d1fae5":"#14532d",text:a?"#065f46":"#dcfce7"}:"idle"===e.status?{label:"idle",primary:a?"#0d9488":"#2dd4bf",halo:a?"#ccfbf1":"#134e4a",text:a?"#115e59":"#ccfbf1"}:{label:e.status||"online",primary:a?"#0284c7":"#38bdf8",halo:a?"#dbeafe":"#0c4a6e",text:a?"#0c4a6e":"#e0f2fe"}:{label:"offline",primary:a?"#94a3b8":"#6b7280",halo:a?"#e2e8f0":"#111827",text:a?"#475569":"#9ca3af"},d=b.has(e.alias),c=i?26:18;return(0,s.jsxs)("g",{className:"transition-opacity",children:[d&&(0,s.jsxs)("circle",{cx:r.x,cy:r.y,r:c+14,fill:o.primary,opacity:a?.08:.12,children:[(0,s.jsx)("animate",{attributeName:"r",values:`${c+8};${c+22};${c+8}`,dur:"2.4s",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"opacity",values:a?"0.12;0.02;0.12":"0.18;0.04;0.18",dur:"2.4s",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:r.x,cy:r.y,r:c+8,fill:o.halo,opacity:i?a?.85:.55:a?.4:.25}),(0,s.jsx)("circle",{cx:r.x,cy:r.y,r:c,fill:i?n.nodeFill.online:n.nodeFill.offline,stroke:o.primary,strokeWidth:i?3:1.5,strokeDasharray:i?"none":"5 5",filter:i&&!a?"url(#topo-glow)":void 0}),(0,s.jsx)("circle",{cx:r.x,cy:r.y,r:i?8:5,fill:o.primary}),"working"===e.status&&(0,s.jsx)("path",{d:`M${r.x-9},${r.y+11} h18`,stroke:n.flowParticle,strokeWidth:"3",strokeLinecap:"round",children:(0,s.jsx)("animate",{attributeName:"opacity",values:"1;0.25;1",dur:"1.1s",repeatCount:"indefinite"})}),(0,s.jsxs)("g",{transform:`translate(${r.x}, ${r.y+c+22})`,children:[(0,s.jsx)("rect",{x:"-62",y:"-14",width:"124",height:"42",rx:"6",fill:n.labelBox.fill,stroke:n.labelBox.stroke,opacity:a?1:.94}),(0,s.jsx)("text",{x:"0",y:"1",textAnchor:"middle",fill:o.text,fontSize:"12",fontFamily:"monospace",fontWeight:"700",children:x(e.alias,14)}),(0,s.jsxs)("text",{x:"0",y:"17",textAnchor:"middle",fill:o.primary,fontSize:"9",fontFamily:"monospace",children:[o.label,i&&null!=l?` sse:${l}`:""]})]})]},e.alias)}),(0,s.jsxs)("g",{transform:"translate(28, 34)",children:[(0,s.jsx)("rect",{x:"0",y:"0",width:"285",height:60+20*Math.min(g.length,4),rx:"8",fill:n.legendBox.fill,stroke:n.legendBox.stroke,opacity:a?1:.94}),(0,s.jsx)("text",{x:"16",y:"26",fill:n.legendHeadline,fontSize:"13",fontFamily:"monospace",fontWeight:"700",children:"recent signal"}),(0,s.jsxs)("text",{x:"178",y:"26",fill:n.legendAccent,fontSize:"11",fontFamily:"monospace",children:[l.length," messages"]}),g.slice(0,4).map((e,t)=>(0,s.jsxs)("text",{x:"16",y:54+20*t,fill:n.legendText,fontSize:"10",fontFamily:"monospace",children:[x(e.from,8)," ","->"," ",x(e.to,8)," / ",e.count," / ",x(e.content,18)]},e.key))]}),(0,s.jsxs)("g",{transform:"translate(720, 34)",children:[(0,s.jsx)("rect",{x:"0",y:"0",width:"250",height:"112",rx:"8",fill:n.legendBox.fill,stroke:n.legendBox.stroke,opacity:a?1:.94}),(0,s.jsx)("circle",{cx:"18",cy:"26",r:"6",fill:a?"#059669":"#22c55e"}),(0,s.jsx)("text",{x:"34",y:"30",fill:n.legendText,fontSize:"11",fontFamily:"monospace",children:"working node"}),(0,s.jsx)("circle",{cx:"18",cy:"52",r:"6",fill:a?"#0d9488":"#2dd4bf"}),(0,s.jsx)("text",{x:"34",y:"56",fill:n.legendText,fontSize:"11",fontFamily:"monospace",children:"online idle"}),(0,s.jsx)("circle",{cx:"18",cy:"78",r:"6",fill:a?"#94a3b8":"#6b7280"}),(0,s.jsx)("text",{x:"34",y:"82",fill:n.legendText,fontSize:"11",fontFamily:"monospace",children:"offline / no SSE"}),(0,s.jsx)("path",{d:"M150,78 Q176,52 210,78",fill:"none",stroke:n.flowEdge,strokeWidth:"3",markerEnd:"url(#topo-arrow)"})]})]})]})]})}var m=e.i(69874);let p={working:{bg:"bg-green-900/30 border-green-800/30",text:"text-green-300",dot:"bg-green-500",glow:"shadow-green-500/10"},idle:{bg:"bg-cyan-900/30 border-cyan-800/30",text:"text-cyan-300",dot:"bg-cyan-400",glow:"shadow-cyan-500/5"},blocked:{bg:"bg-yellow-900/30 border-yellow-800/30",text:"text-yellow-300",dot:"bg-yellow-500",glow:""},error:{bg:"bg-red-900/30 border-red-800/30",text:"text-red-300",dot:"bg-red-500",glow:""}},g={bg:"bg-gray-800/50 border-gray-700/30",text:"text-gray-500",dot:"bg-gray-500",glow:""};function b({session:e,hasSse:t,sseCount:r,onChat:l}){let i=t&&p[e.status]||g;return(0,s.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,prefetch:!1,className:`block rounded-xl border p-4 transition-all duration-300 cursor-pointer ${t?`bg-[#111128] border-[#2a2a4a] hover:border-cyan-500/30 hover:shadow-lg ${i.glow}`:"bg-[#0d0d1a] border-[#1a1a2a] opacity-40"}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(m.AliasAvatar,{alias:e.alias,size:22}),(0,s.jsx)("span",{className:"font-semibold text-white truncate text-sm",title:e.alias,children:e.alias}),(0,s.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${i.dot} ${t&&"working"===e.status?"animate-pulse":""}`})]}),(0,s.jsx)("span",{className:`text-[11px] px-2 py-0.5 rounded-md border shrink-0 ${i.bg} ${i.text}`,children:t?e.status:"offline"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,s.jsx)("span",{className:"text-xs text-gray-600 bg-[#0a0a15] px-2 py-0.5 rounded border border-[#1a1a2a]",children:e.agent||"unknown"}),t&&(0,s.jsxs)("span",{className:"text-[10px] text-green-500",children:["SSE:",r]})]}),e.task?(0,s.jsx)("div",{className:"text-xs text-gray-400 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] line-clamp-2",title:e.task,children:e.task}):(0,s.jsx)("div",{className:"text-xs text-gray-700 italic",children:"No active task"}),e.progress>0&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"flex justify-between text-[10px] mb-1",children:[(0,s.jsx)("span",{className:"text-gray-600",children:"Progress"}),(0,s.jsxs)("span",{className:i.text,children:[e.progress,"%"]})]}),(0,s.jsx)("div",{className:"w-full bg-gray-800 rounded-full h-1.5 overflow-hidden",children:(0,s.jsx)("div",{className:`h-1.5 rounded-full transition-all duration-700 ${"working"===e.status?"bg-green-500":"bg-cyan-500"}`,style:{width:`${Math.min(e.progress,100)}%`}})})]}),(0,s.jsxs)("div",{className:"mt-3 flex justify-between items-center text-[10px] text-gray-600",children:[(0,s.jsx)("span",{children:e.server||"--"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[l&&t&&(0,s.jsx)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),l(e.alias)},className:"text-cyan-400 hover:text-cyan-300 px-1.5 py-0.5 rounded border border-cyan-500/20 hover:bg-cyan-500/10 transition-colors",children:"Chat"}),(0,s.jsx)("span",{children:(0,n.timeAgo)(e.updated_at)})]})]})]})}function y({messages:e}){return 0===e.length?null:(0,s.jsxs)("div",{className:"mt-8",children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Inbox"}),(0,s.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:e.length})]}),(0,s.jsx)("div",{className:"space-y-2 max-h-96 overflow-y-auto pr-1 scrollbar-thin",children:e.map(e=>(0,s.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm transition-colors hover:border-[#3a3a5a]",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mb-1.5",children:[(0,s.jsx)("span",{className:"text-blue-400 font-medium",children:e.from_session}),(0,s.jsx)("span",{children:e.created_at})]}),(0,s.jsx)("div",{className:"text-gray-300 leading-relaxed",children:e.content})]},e.id))})]})}function j(){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)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8 anet-skeleton-pulse",children:[1,2,3,4].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-4 py-3",children:[(0,s.jsx)(v,{w:"2.5rem",h:"1.75rem"}),(0,s.jsx)(v,{w:"3.5rem",h:"0.75rem",className:"mt-2"}),(0,s.jsx)(v,{w:"5rem",h:"0.625rem",className:"mt-1"})]},e))}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3 anet-skeleton-pulse",children:[(0,s.jsx)(v,{w:"6rem",h:"2.5rem",rounded:"0.75rem"}),(0,s.jsxs)("div",{className:"flex-1 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-2.5 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full anet-skeleton-bar"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(v,{w:"6rem",h:"0.875rem"}),(0,s.jsx)(v,{w:"10rem",h:"0.625rem",className:"mt-1"})]})]})]}),(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 anet-skeleton-pulse",children:(0,s.jsx)(v,{w:"14rem",h:"0.875rem"})}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-3 anet-skeleton-pulse",children:[1,2,3].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-3",children:[(0,s.jsx)(v,{w:"2rem",h:"1.25rem"}),(0,s.jsx)(v,{w:"2.5rem",h:"0.75rem",className:"mt-1"}),(0,s.jsx)(v,{w:"3.5rem",h:"0.625rem",className:"mt-px"})]},e))}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-6 anet-skeleton-pulse",children:[1,2,3].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 flex items-center justify-center gap-2",children:[(0,s.jsx)("div",{className:"w-4 h-4 rounded anet-skeleton-bar"}),(0,s.jsx)(v,{w:"4rem",h:"0.75rem"})]},e))}),(0,s.jsxs)("div",{className:"mb-6 flex gap-2 anet-skeleton-pulse",children:[(0,s.jsx)("div",{className:"flex-1 h-10 rounded-lg border border-[#2a2a4a] bg-[#111128]"}),(0,s.jsx)("div",{className:"w-28 h-10 rounded-lg anet-skeleton-bar"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4 anet-skeleton-pulse",children:[1,2,3,4].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,s.jsx)("div",{className:"w-2 h-2 rounded-full anet-skeleton-bar"}),(0,s.jsx)(v,{w:"6rem",h:"0.875rem"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(v,{w:"100%",h:"0.625rem"}),(0,s.jsx)(v,{w:"75%",h:"0.625rem"}),(0,s.jsx)(v,{w:"55%",h:"0.625rem"})]})]},e))})]})}function v({w:e,h:t,rounded:r,className:a}){return(0,s.jsx)("div",{className:`anet-skeleton-bar ${a||""}`,style:{width:e,height:t,borderRadius:r||"0.375rem"}})}var w=e.i(95356),k=e.i(58963);function N(){let{setNetworkId:e}=(0,k.useNetworkId)(),[t,a]=(0,r.useState)({user:null,networks:[],currentNetwork:"",token:""}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[x,h]=(0,r.useState)(""),[u,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=sessionStorage.getItem("anet_v3_auth");if(e)try{a(JSON.parse(e))}catch{}},[]);let[m,p]=(0,r.useState)(!1),[g,b]=(0,r.useState)(""),[y,j]=(0,r.useState)(""),v=async()=>{try{await fetch(`/api/hub/auth?token=${t.token}&endpoint=/api/auth/me`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:t.token,display_name:g,email:y})});let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:t.token,display_name:g,email:y})}),s=await e.json();if(s.ok&&s.user){let e={...t,user:s.user};a(e),sessionStorage.setItem("anet_v3_auth",JSON.stringify(e)),p(!1)}}catch{}};if(!t.user)return null;let w=(t.user.display_name||t.user.username).slice(0,2).toUpperCase();return(0,s.jsxs)("div",{className:"flex items-center justify-between bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center text-xs font-bold text-white",children:w}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-white font-medium",children:t.user.display_name||t.user.username}),(0,s.jsxs)("div",{className:"text-[10px] text-gray-500",children:[t.user.role," · ",t.user.user_id]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[t.networks.length>0&&(0,s.jsx)("select",{value:t.currentNetwork,onChange:s=>{let r={...t,currentNetwork:s.target.value};a(r),e(s.target.value),sessionStorage.setItem("anet_v3_auth",JSON.stringify(r))},className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white focus:outline-none",children:t.networks.map(e=>(0,s.jsx)("option",{value:e.network_id,children:e.network_name},e.network_id))}),(0,s.jsxs)("button",{onClick:()=>{b(t.user?.display_name||""),j(""),p(!m)},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Edit profile",children:[(0,s.jsx)("span",{className:"hidden sm:inline",children:"Edit"}),(0,s.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.862 4.487z"})})]}),(0,s.jsxs)("button",{onClick:()=>{a({user:null,networks:[],currentNetwork:"",token:""}),sessionStorage.removeItem("anet_v3_auth")},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Sign out",children:[(0,s.jsx)("span",{className:"hidden sm:inline",children:"Sign out"}),(0,s.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})})]})]}),m&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-2 pt-2 border-t border-[#2a2a4a]",children:[(0,s.jsx)("input",{type:"text",value:g,onChange:e=>b(e.target.value),placeholder:"Display name",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-32"}),(0,s.jsx)("input",{type:"email",value:y,onChange:e=>j(e.target.value),placeholder:"Email",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-40"}),(0,s.jsx)("button",{onClick:v,className:"px-2 py-1 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded",children:"Save"})]})]})}var S=e.i(21373),_=e.i(58442);function C({tabs:e,activeTab:t,onOpenTab:r,onCloseTab:a,onSetActive:n,onClose:l}){return 0===e.length?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{onClick:l,className:"jsx-f7cf3d1a6fdfc074 fixed inset-0 bg-black/30 z-40 lg:hidden"}),(0,s.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 animate-slide-in",children:[(0,s.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 flex items-center border-b border-[#2a2a4a] bg-[#0d0d1a] overflow-x-auto",children:[(0,s.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 flex min-w-0",children:e.map(e=>(0,s.jsxs)("button",{onClick:()=>n(e),className:`jsx-f7cf3d1a6fdfc074 flex items-center gap-1.5 px-3 py-2.5 text-xs border-b-2 transition-colors shrink-0 ${t===e?"border-cyan-400 text-cyan-300 bg-cyan-500/5":"border-transparent text-gray-500 hover:text-gray-300"}`,children:[(0,s.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 w-2 h-2 rounded-full ${t===e?"bg-cyan-400":"bg-gray-600"}`}),(0,s.jsx)("span",{className:"jsx-f7cf3d1a6fdfc074 max-w-[80px] truncate",children:e}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),a(e)},className:"jsx-f7cf3d1a6fdfc074 ml-1 text-gray-600 hover:text-gray-300 p-0.5",children:"×"})]},e))}),(0,s.jsx)("button",{onClick:l,className:"jsx-f7cf3d1a6fdfc074 text-gray-500 hover:text-white px-3 py-2.5 shrink-0 border-l border-[#2a2a4a]",children:(0,s.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-f7cf3d1a6fdfc074 w-4 h-4",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-f7cf3d1a6fdfc074"})})})]}),(0,s.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 relative overflow-hidden",children:e.map(e=>(0,s.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 absolute inset-0 ${t===e?"block":"hidden"}`,children:(0,s.jsx)($,{alias:e})},e))})]}),(0,s.jsx)(S.default,{id:"f7cf3d1a6fdfc074",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}function $({alias:e}){return(0,s.jsx)(_.TaskChatPanel,{alias:e,onClose:()=>{},inline:!0})}function z({sessions:e,onClose:t}){let[a,n]=(0,r.useState)(new Set),[l,i]=(0,r.useState)(""),[o,d]=(0,r.useState)("normal"),[c,x]=(0,r.useState)(!1),[h,u]=(0,r.useState)([]),[f,m]=(0,r.useState)(""),p=e.filter(e=>"offline"!==e.status).filter(e=>!f||e.alias.toLowerCase().includes(f.toLowerCase())||(e.agent||"").toLowerCase().includes(f.toLowerCase())),g=async()=>{if(!l.trim()||0===a.size||c)return;x(!0),u([]);let e=[...a].map(async e=>{try{let t=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e,task:l,priority:o})}),s=await t.json();return{alias:e,ok:!!s.ok,error:s.error}}catch(t){return{alias:e,ok:!1,error:"send failed"}}});u(await Promise.all(e)),x(!1)},b=h.filter(e=>e.ok).length;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:t}),(0,s.jsxs)("div",{className:"fixed inset-4 lg:inset-x-[15%] lg:inset-y-[5%] bg-[#0a0a1a] border border-[#2a2a4a] rounded-2xl z-50 flex flex-col shadow-2xl shadow-black/70 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-bold text-white",children:"Dispatch Task"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Send a task to one or more agents"})]}),(0,s.jsx)("button",{onClick:t,className:"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col lg:flex-row overflow-hidden",children:[(0,s.jsxs)("div",{className:"lg:w-[280px] border-b lg:border-b-0 lg:border-r border-[#2a2a4a] flex flex-col",children:[(0,s.jsxs)("div",{className:"px-4 py-3 border-b border-[#2a2a4a]",children:[(0,s.jsx)("input",{type:"text",value:f,onChange:e=>m(e.target.value),placeholder:"Filter agents...",className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,s.jsx)("button",{onClick:()=>{a.size===p.length?n(new Set):n(new Set(p.map(e=>e.alias)))},className:"text-[10px] text-cyan-400 hover:text-cyan-300",children:a.size===p.length?"Deselect all":`Select all (${p.length})`}),(0,s.jsxs)("span",{className:"text-[10px] text-gray-600",children:[a.size," selected"]})]})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 py-2 space-y-0.5 max-h-[200px] lg:max-h-none",children:[p.map(e=>(0,s.jsxs)("button",{onClick:()=>{var t;return t=e.alias,void n(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-left transition-colors ${a.has(e.alias)?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20":"text-gray-400 hover:bg-[#1a1a2a]"}`,children:[(0,s.jsx)("div",{className:`w-2 h-2 rounded-full shrink-0 ${"working"===e.status?"bg-green-400":"idle"===e.status?"bg-cyan-400":"bg-gray-500"}`}),(0,s.jsx)("span",{className:"truncate flex-1",children:e.alias}),(0,s.jsx)("span",{className:"text-[9px] text-gray-600",children:e.agent||"--"})]},e.alias)),0===p.length&&(0,s.jsx)("div",{className:"text-center text-xs text-gray-600 py-4",children:"No online agents"})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,s.jsxs)("div",{className:"flex-1 px-6 py-4 flex flex-col",children:[(0,s.jsx)("label",{className:"text-xs text-gray-500 uppercase mb-2",children:"Task Prompt"}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),placeholder:"Enter the task you want to dispatch...",className:"flex-1 min-h-[120px] bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none"}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-4",children:[(0,s.jsxs)("select",{value:o,onChange:e=>d(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white focus:outline-none",children:[(0,s.jsx)("option",{value:"normal",children:"Normal priority"}),(0,s.jsx)("option",{value:"high",children:"High priority"}),(0,s.jsx)("option",{value:"low",children:"Low priority"})]}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsx)("button",{onClick:g,disabled:c||!l.trim()||0===a.size,className:"px-6 py-2.5 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-xl transition-all shadow-lg shadow-cyan-500/10 disabled:shadow-none active:scale-95",children:c?(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Sending..."]}):`Dispatch to ${a.size} agent${a.size>1?"s":""}`})]})]}),h.length>0&&(0,s.jsxs)("div",{className:"px-6 py-3 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,s.jsxs)("div",{className:"text-xs text-gray-500 mb-2",children:[b,"/",h.length," dispatched successfully"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,s.jsxs)("span",{className:`text-[10px] px-2 py-0.5 rounded-full border ${e.ok?"text-green-300 border-green-500/20 bg-green-500/5":"text-red-300 border-red-500/20 bg-red-500/5"}`,children:[e.alias,": ",e.ok?"✓":e.error||"✗"]},e.alias))})]})]})]})]})]})}var F=e.i(65822),T=e.i(51280),M=e.i(71235);e.s(["default",0,function(){let e,i,d,c,x;(0,r.useEffect)(()=>{sessionStorage.getItem("anet_v3_auth")||(fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login"))},[]);let{sessions:h,hint:u,error:p,isLoading:g}=(0,F.useSessions)(),{health:v}=(0,F.useHealth)(),{config:k}=(0,F.useAnetConfig)(),{tasks:S}=(0,F.useTasks)({limit:"500"}),{stats:_}=(0,F.useStats)(),{license:$}=(0,F.useLicense)(),[R,A]=(0,r.useState)(window.innerWidth>=1024),[E,P]=(0,r.useState)(!1),O=function(){let[e,t]=(0,r.useState)([]),[s,a]=(0,r.useState)("");return{tabs:e,activeTab:s,openTab:e=>{t(t=>t.includes(e)?t:[...t,e]),a(e)},closeTab:e=>{t(t=>{let r=t.filter(t=>t!==e);return s===e&&a(r[r.length-1]||""),r})},closeAll:()=>{t([]),a("")},setActiveTab:a}}(),[B,I]=(0,r.useState)(!1),[L,W]=(0,r.useState)([]),[H,D]=(0,r.useState)("all"),{mutate:G}=(0,M.useSWRConfig)(),J="1"!==t.default.env.NEXT_PUBLIC_DISABLE_SSE,{connected:U,supported:V}=(0,T.useSSE)({url:"/api/hub/events",enabled:J,onEvent:e=>{["new_task","new_message","new_reply","node_status_changed","broadcast"].includes(e.type)&&(G("/api/hub/status"),G(e=>"string"==typeof e&&e.startsWith("/api/hub/tasks"),void 0,{revalidate:!0}))}});if((0,r.useEffect)(()=>{let e=()=>{fetch("/api/hub/inbox").then(e=>e.json()).then(e=>{e.messages?.length&&W(t=>{let s=new Set(t.map(e=>e.id));return[...e.messages.filter(e=>!s.has(e.id)),...t].slice(0,100)})}).catch(()=>{})};e();let t=setInterval(e,1e4);return()=>clearInterval(t)},[]),g)return(0,s.jsx)(j,{});let q=v?.sse_sessions||{},K=e=>(e.network_id?q[`${e.network_id}:${e.alias}`]:void 0)??q[e.alias],Q=e=>"offline"!==e.status||!!K(e),X=h.filter(Q).length,Y=h.length,Z=h.filter(e=>"working"===e.status).length,ee=v?(0,n.formatUptime)(v.uptime):"--",et=v?.version||"--",es=!!(k?.hub&&k.tokenConfigured),er=k?.source==="file"?"Local config":k?.source==="runtime-env"?"Runtime env":"Config missing",ea={};if(_?.tasks?.by_status?.length)for(let e of _.tasks.by_status)ea[e.status]=e.count;else for(let e of S)ea[e.status]=(ea[e.status]||0)+1;let en=[...h].sort((e,t)=>{let s=+!!Q(e),r=+!!Q(t);if(s!==r)return r-s;let a=+("working"===e.status);return("working"===t.status)-a});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)("div",{className:"lg:ml-0 ml-10",children:(0,s.jsx)(l,{online:X,working:Z,total:Y,version:et,uptime:ee})}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("button",{onClick:()=>I(!0),className:"px-4 py-2 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 text-white text-sm font-medium rounded-xl shadow-lg shadow-cyan-500/10 transition-all active:scale-95 shrink-0",children:"⚡ Dispatch"}),(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)(N,{})})]}),(0,s.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,s.jsxs)("button",{onClick:()=>P(!E),className:"w-full flex items-center justify-between text-left",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"uppercase text-gray-600",children:"Config"}),(0,s.jsx)("span",{className:`w-2 h-2 rounded-full ${es?"bg-green-400":"bg-red-400"}`}),(0,s.jsx)("span",{className:"text-gray-500",children:er})]}),(0,s.jsx)("svg",{className:`w-4 h-4 text-gray-600 transition-transform ${E?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),E&&(0,s.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("div",{className:"min-w-0",children:(0,s.jsxs)("div",{className:"text-gray-100 truncate text-sm",title:k?.hub||void 0,children:["Hub: ",(0,s.jsx)("span",{className:k?.hub?"text-cyan-300":"text-red-300",children:k?.hub?.trim()||"not configured"})]})}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 text-xs",children:(0,s.jsxs)("span",{className:`px-2.5 py-1 rounded-md border ${k?.tokenConfigured?"bg-blue-500/5 text-blue-300 border-blue-500/20":"bg-gray-500/5 text-gray-400 border-gray-500/20"}`,children:["Token: ",k?.tokenPreview||"not configured"]})})]}),k?.error&&(0,s.jsx)("div",{className:"mt-2 text-xs text-gray-600",children:k.error})]})]}),Object.keys(ea).length>0&&(0,s.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-600",children:"Task Status"}),(0,s.jsx)(a.default,{href:"/tasks",prefetch:!1,className:"text-xs text-cyan-400 hover:text-cyan-300",children:"View all →"})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:[{key:"running",color:"bg-green-500/10 text-green-300 border-green-500/20"},{key:"delivered",color:"bg-blue-500/10 text-blue-300 border-blue-500/20"},{key:"acked",color:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"},{key:"replied",color:"bg-purple-500/10 text-purple-300 border-purple-500/20"},{key:"failed",color:"bg-red-500/10 text-red-300 border-red-500/20"},{key:"cancelled",color:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20"},{key:"expired",color:"bg-orange-500/10 text-orange-300 border-orange-500/20"},{key:"closed",color:"bg-gray-500/10 text-gray-500 border-gray-500/20"}].filter(({key:e})=>ea[e]).map(({key:e,color:t})=>(0,s.jsxs)(a.default,{href:`/tasks?status=${e}`,prefetch:!1,className:`px-2.5 py-1 rounded-md border text-xs ${t} hover:opacity-80 transition-opacity`,children:[e,": ",ea[e]]},e))})]}),(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-2",children:"Quick navigation"}),(0,s.jsx)("section",{className:"mb-3 grid grid-cols-3 gap-2 sm:gap-3",children:(e=h.filter(e=>Q(e)&&"working"!==e.status).length,i=Y-X,d=S.filter(e=>"failed"===e.status).length,[{href:"/nodes",label:"Nodes",value:`${X}/${Y}`,sub:`${Y>0?Math.round(X/Y*100):0}% online`,color:"text-green-400 border-green-500/20",popover:0===Y?null:[{k:"working",v:Z,dot:"",color:"#4ade80"},{k:"idle",v:e,dot:"",color:"#22d3ee"},{k:"offline",v:i,dot:"",color:"#9ca3af"}]},{href:"/tasks",label:"Tasks",value:String(Object.values(ea).reduce((e,t)=>e+t,0)||0),sub:"all-time",color:"text-cyan-400 border-cyan-500/20",popover:0===Object.keys(ea).length?null:["running","replied","failed","cancelled","expired","closed","created","delivered","acked"].filter(e=>ea[e]).map(e=>({k:e,v:ea[e],dot:"",color:({running:"#4ade80",replied:"#a78bfa",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c",closed:"#9ca3af",created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee"})[e]||"#9ca3af"}))},{href:"/tasks?status=failed",label:"Failed",value:String(ea.failed||0),sub:ea.failed?"needs review":"none",color:ea.failed?"text-red-400 border-red-500/25":"text-gray-500 border-gray-700/30",popover:d?[{k:`${d} in current view`,v:"",dot:"",color:"#f87171"}]:[{k:"no failures yet",v:"",dot:"",color:"#4b5563"}]}].map(e=>(0,s.jsxs)(a.default,{href:e.href,prefetch:!1,className:`anet-stat-link group relative rounded-xl border ${e.color} bg-[#111128] px-3 py-3 transition-all hover:-translate-y-px`,children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,s.jsx)("div",{className:`text-xl font-semibold tabular-nums ${e.color.split(" ")[0]}`,children:e.value}),(0,s.jsx)("div",{className:"hidden sm:block text-[10px] text-gray-600 group-hover:text-gray-400 transition-colors",children:"View →"})]}),(0,s.jsx)("div",{className:"text-[11px] text-gray-400 mt-0.5",children:e.label}),(0,s.jsx)("div",{className:"text-[10px] text-gray-600 mt-px",children:e.sub}),e.popover&&e.popover.length>0&&(0,s.jsxs)("div",{className:"anet-stat-popover hidden md:block pointer-events-none absolute left-2 right-2 top-full mt-1 z-20 rounded-lg border border-[#2a2a4a] bg-[#0d0d1a] shadow-lg shadow-black/30 px-3 py-2 opacity-0 translate-y-[-2px] group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-150 delay-100",children:[(0,s.jsx)("div",{className:"text-[10px] text-gray-600 uppercase tracking-wider mb-1.5",children:"Breakdown"}),(0,s.jsx)("ul",{className:"space-y-1",children:e.popover.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-[11px]",children:[(0,s.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:e.color},"aria-hidden":!0}),(0,s.jsx)("span",{className:"text-gray-400 capitalize",children:e.k}),""!==e.v&&(0,s.jsx)("span",{className:"ml-auto text-gray-300 tabular-nums font-medium",children:e.v})]},e.k))})]})]},e.href)))}),(0,s.jsx)("section",{className:"mb-6 grid grid-cols-3 gap-2 sm:gap-3",children:[{href:"/messages",label:"Messages",icon:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"},{href:"/logs",label:"Audit log",icon:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8"},{href:"/admin",label:"Admin",icon:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"}].map(e=>(0,s.jsxs)(a.default,{href:e.href,prefetch:!1,className:"anet-nav-tile flex items-center justify-center gap-2 rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 text-[12px] text-gray-400 hover:text-gray-200 transition-colors",children:[(0,s.jsx)("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:e.icon})}),(0,s.jsx)("span",{children:e.label})]},e.href))}),(0,s.jsx)(o,{}),S.length>0&&(0,s.jsxs)("section",{className:"mb-6 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Recent Activity"}),(0,s.jsx)(a.default,{href:"/tasks",className:"text-xs text-cyan-400 hover:text-cyan-300",children:"All tasks →"})]}),(0,s.jsx)("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:S.slice(0,5).map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"replied"===e.status?"bg-purple-400":"running"===e.status?"bg-green-400":"failed"===e.status?"bg-red-400":"bg-blue-400"}`}),e.from_name&&(0,s.jsx)(m.AliasAvatar,{alias:e.from_name,size:14}),(0,s.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:e.from_name||"?"}),(0,s.jsx)("span",{className:"text-gray-600",children:"→"}),e.to_name&&(0,s.jsx)(m.AliasAvatar,{alias:e.to_name,size:14}),(0,s.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:e.to_name||"?"}),(0,s.jsx)("span",{className:"text-gray-500 truncate flex-1",children:e.content?.slice(0,40)||"--"}),(0,s.jsx)("span",{className:`shrink-0 px-1.5 py-0.5 rounded text-[10px] border ${"replied"===e.status?"text-purple-300 border-purple-500/20":"failed"===e.status?"text-red-300 border-red-500/20":"text-gray-500 border-gray-700/30"}`,children:e.status})]},e.task_id))})]}),p&&(0,s.jsxs)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-center justify-between",role:"alert",children:[(0,s.jsx)("span",{children:String(p)}),(0,s.jsx)("span",{className:"text-gray-500 text-xs",children:"Check CommHub connection"})]}),h.length>0&&(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("button",{onClick:()=>A(!R),className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-4 py-1.5 rounded-lg transition-colors hover:border-gray-600 cursor-pointer",children:R?"Hide Topology":"Show Topology"})}),!R&&h.length>0&&(0,s.jsx)("div",{className:"lg:hidden text-center text-xs text-gray-600 mb-4",children:"Topology hidden on mobile for better readability"}),R&&h.length>0&&(0,s.jsx)(f,{sessions:h,sseSessions:q}),0!==h.length||p?(c={all:en.length,working:en.filter(e=>Q(e)&&"working"===e.status).length,idle:en.filter(e=>Q(e)&&"working"!==e.status).length,offline:en.filter(e=>!Q(e)).length},x=en.filter(e=>"all"===H||("offline"===H?!Q(e):"working"===H?Q(e)&&"working"===e.status:"idle"!==H||Q(e)&&"working"!==e.status)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-1",children:[{key:"all",label:"All"},{key:"working",label:"Working",dot:"#4ade80"},{key:"idle",label:"Idle",dot:"#22d3ee"},{key:"offline",label:"Offline",dot:"#6b7280"}].map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>D(e.key),disabled:0===c[e.key]&&"all"!==e.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed ${H===e.key?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[e.dot&&(0,s.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:e.dot}}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:`text-[10px] tabular-nums ${H===e.key?"text-cyan-400":"text-gray-600"}`,children:c[e.key]})]},e.key))}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4",children:x.map(e=>(0,s.jsx)(b,{session:e,hasSse:Q(e),sseCount:K(e)||0,onChat:O.openTab},e.alias))}),0===x.length&&(0,s.jsxs)("div",{className:"mt-4 text-center text-xs text-gray-600",children:['No agents match "',H,'" — ',(0,s.jsx)("button",{onClick:()=>D("all"),className:"underline hover:text-gray-400",children:"Show all"})]})]})):(0,s.jsx)(w.NodesEmptyState,{hint:u}),(0,s.jsx)(y,{messages:L}),(0,s.jsxs)("div",{className:"mt-8 text-center text-xs text-gray-600 flex items-center justify-center gap-2 flex-wrap",children:[V&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${U?"bg-green-400":"bg-gray-600"}`}),U?"SSE live":"SWR polling"]}),$?.license&&(0,s.jsxs)(s.Fragment,{children:[V&&(0,s.jsx)(s.Fragment,{children:"·"}),(0,s.jsxs)("span",{className:$.license.days_left<=7?"text-red-400":"pro"===$.license.type?"text-green-400":"text-yellow-400",children:[$.license.type," (",$.license.days_left,"d left)"]})]})]}),B&&(0,s.jsx)(z,{sessions:h,onClose:()=>I(!1)}),O.tabs.length>0&&(0,s.jsx)(C,{tabs:O.tabs,activeTab:O.activeTab,onOpenTab:O.openTab,onCloseTab:O.closeTab,onSetActive:O.setActiveTab,onClose:O.closeAll})]})}],31713)}]);
|