@sleep2agi/agent-network-dashboard 0.4.5-preview.62 → 0.4.5-preview.64
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 +4 -4
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- 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 +1 -1
- 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 +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +2 -2
- package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +2 -2
- package/.next/server/app/messages.segments/_full.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +2 -2
- package/.next/server/app/node.segments/_full.segment.rsc +2 -2
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +2 -2
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +3 -3
- package/.next/server/app/nodes.segments/_full.segment.rsc +3 -3
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +2 -2
- package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- 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 +2 -2
- package/.next/server/app/settings.rsc +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +2 -2
- package/.next/server/app/tasks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- 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/[root-of-the-server]__0o8yj3c._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0o8yj3c._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0aum_g5._.js +1 -1
- package/.next/server/chunks/ssr/app_0aum_g5._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0esuljp._.js +1 -1
- package/.next/server/chunks/ssr/app_0esuljp._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- 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/{105t9csnt2.gn.css → 0cqgktoh.a72n.css} +1 -1
- package/.next/static/chunks/{0zax.-67r-uuj.js → 0e7s._tud0wpb.js} +1 -1
- package/.next/static/chunks/{0sk~p.46h0~ee.js → 0pbbc61q-3g9g.js} +1 -1
- package/.next/static/chunks/{126kh9.kb6_5~.js → 11axyfy-t1mro.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/nodes/page.tsx +15 -3
- package/package.json +1 -1
- package/scripts/fold-only.mjs +41 -0
- /package/.next/static/{eIiIGgDMeRCw8L8q8u0ST → t5Z4Nok0y4KGl913a5FqJ}/_buildManifest.js +0 -0
- /package/.next/static/{eIiIGgDMeRCw8L8q8u0ST → t5Z4Nok0y4KGl913a5FqJ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{eIiIGgDMeRCw8L8q8u0ST → t5Z4Nok0y4KGl913a5FqJ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),l=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function l({variant:e="generic",title:s,sub:i,cta:o,compact:c=!1}){let d=r[e],x=s??d.title,h=i??d.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:x}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function i({cmd:e}){let[a,r]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":a?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:a?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,l,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(0,t.jsx)(l,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}):(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(i,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:l}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,l),a,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,t.default)(n(`/api/hub/tasks?${i}`,l),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])},86688,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),r=e.i(18150),n=e.i(65822),l=e.i(58442),i=e.i(95356),o=e.i(69874);let c={working:"bg-green-500/10 text-green-300 border-green-500/20",idle:"bg-blue-500/10 text-blue-300 border-blue-500/20",blocked:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",error:"bg-red-500/10 text-red-300 border-red-500/20",offline:"bg-gray-500/10 text-gray-500 border-gray-500/20"};e.s(["default",0,function(){let e,d,x,h,{sessions:u,isLoading:g}=(0,n.useSessions)(),{health:p}=(0,n.useHealth)(),m=p?.sse_sessions||{},y=e=>(e.network_id?m[`${e.network_id}:${e.alias}`]:void 0)??m[e.alias],[b,j]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[N,w]=(0,s.useState)("list"),[k,C]=(0,s.useState)({}),[$,S]=(0,s.useState)(null),[A,T]=(0,s.useState)({}),[_,L]=(0,s.useState)(null),I=u.map(e=>({...e,online:!!y(e)})).filter(e=>"online"===b?e.online:"offline"===b?!e.online:!b||b===e.status).filter(e=>!f||e.alias.toLowerCase().includes(f.toLowerCase())||(e.agent||"").toLowerCase().includes(f.toLowerCase())).sort((e,t)=>!!t.online-!!e.online||("working"===t.status)-("working"===e.status)),M=u.filter(e=>y(e)).length,B=e=>{S(t=>t===e?null:e),T(t=>({...t,[e]:{}}))},E=(e,t)=>{C(s=>({...s,[e]:t}))},U=async e=>{let t=k[e]?.trim()||"";if(t){T(t=>({...t,[e]:{sending:!0}}));try{let s=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e,task:t})}),a=await s.json();if(!s.ok||a?.ok===!1)throw Error(a?.error||"Send failed");C(t=>({...t,[e]:""})),T(t=>({...t,[e]:{success:"Task sent"}})),S(null)}catch(t){T(s=>({...s,[e]:{error:t instanceof Error?t.message:"Send failed"}}))}}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Nodes"}),(0,t.jsxs)("span",{className:"text-xs bg-green-900/30 text-green-400 px-2 py-0.5 rounded-full border border-green-800/30",children:[M," online"]}),(0,t.jsxs)("span",{className:"text-xs bg-gray-900/30 text-gray-400 px-2 py-0.5 rounded-full border border-gray-800/30",children:[u.length," total"]})]}),u.length>0&&(e=I.filter(e=>e.online&&"working"===e.status).length,d=I.filter(e=>e.online&&"idle"===e.status).length,x=I.filter(e=>!e.online).length,h=I.length||1,(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:[e>0&&(0,t.jsx)("div",{className:"bg-green-500",style:{width:`${e/h*100}%`}}),d>0&&(0,t.jsx)("div",{className:"bg-cyan-500",style:{width:`${d/h*100}%`}}),x>0&&(0,t.jsx)("div",{className:"bg-gray-600",style:{width:`${x/h*100}%`}})]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-1.5 text-[10px] text-gray-500",children:[e>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 mr-1"}),e," working"]}),d>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-cyan-500 mr-1"}),d," idle"]}),x>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-gray-600 mr-1"}),x," offline"]})]})]})),u.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,t.jsx)("input",{type:"text",value:f,onChange:e=>v(e.target.value),placeholder:"Search nodes...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-48"}),(0,t.jsxs)("select",{value:b,onChange:e=>j(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All"}),(0,t.jsx)("option",{value:"online",children:"Online"}),(0,t.jsx)("option",{value:"offline",children:"Offline"}),(0,t.jsx)("option",{value:"working",children:"Working"}),(0,t.jsx)("option",{value:"idle",children:"Idle"}),(0,t.jsx)("option",{value:"blocked",children:"Blocked"}),(0,t.jsx)("option",{value:"error",children:"Error"})]}),(0,t.jsx)("div",{className:"ml-auto flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 text-sm",children:["list","grid"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>w(e),className:`rounded-md px-3 py-1.5 transition-colors ${N===e?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"list"===e?"List":"Grid"},e))})]}),g?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2,3,4].map(e=>(0,t.jsx)("div",{className:"h-16 bg-gray-800/20 rounded-lg"},e))}):0===I.length?0===u.length?(0,t.jsx)(i.NodesEmptyState,{}):(0,t.jsx)(i.EmptyState,{variant:"nodes",title:"No nodes match your filters",sub:"Try clearing search or status filters, or wait for an agent to register."}):"grid"===N?(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:I.map(e=>{let s=e.online?e.status:"offline",n=A[e.alias]||{},l="number"==typeof e.progress?e.progress:0;return(0,t.jsxs)("div",{className:`relative overflow-hidden rounded-xl border border-[#2a2a4a] bg-[#111128] p-4 transition-colors ${!e.online?"opacity-60":""}`,children:[!e.online&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"rotate-[-20deg] rounded-xl border border-white/10 bg-black/20 px-5 py-2 text-xl font-bold uppercase tracking-[0.35em] text-white/10",children:"Offline"})}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:36}),(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"min-w-0 flex-1 hover:text-cyan-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-base font-semibold text-white",children:e.alias}),(0,t.jsx)("span",{className:`shrink-0 rounded-md border px-2 py-0.5 text-[10px] uppercase tracking-wide ${c[s]||c.offline}`,children:s})]}),(0,t.jsxs)("div",{className:"mt-0.5 truncate text-xs text-gray-500",children:[e.agent||"—",(0,t.jsx)("span",{className:"text-gray-700 mx-1.5",children:"·"}),e.server||"—"]})]}),(0,t.jsxs)("div",{className:"flex gap-1.5 shrink-0",children:[(0,t.jsx)("button",{type:"button",onClick:()=>L(e.alias),className:"rounded-lg border border-green-500/20 bg-green-500/10 px-3 py-1.5 text-xs text-green-300 transition-colors hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>B(e.alias),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-xs text-cyan-300 transition-colors hover:bg-cyan-500/20",children:"Task"})]})]}),(0,t.jsxs)("div",{className:"mt-3 rounded-lg border border-[#1a1a2a] bg-[#0a0a15] px-3 py-2 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"Current task"}),(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.last_seen_at||e.updated_at)})]}),(0,t.jsx)("div",{className:`mt-1 line-clamp-2 ${e.task?"text-gray-300":"text-gray-600 italic"}`,children:e.task||"No current task"})]}),l>0&&l<100&&(0,t.jsx)("div",{className:"mt-3 h-1.5 overflow-hidden rounded-full bg-gray-800",children:(0,t.jsx)("div",{className:"h-1.5 rounded-full bg-cyan-400 transition-all",style:{width:`${l}%`}})}),$===e.alias&&(0,t.jsxs)("div",{className:"mt-4 space-y-2 rounded-lg border border-[#2a2a4a] bg-[#0a0a15] p-3",children:[(0,t.jsx)("input",{type:"text",value:k[e.alias]||"",onChange:t=>E(e.alias,t.target.value),onKeyDown:t=>"Enter"===t.key&&U(e.alias),placeholder:`Send task to ${e.alias}...`,className:"w-full rounded-lg border border-[#2a2a4a] bg-[#050510] px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500 focus:outline-none"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>S(null),className:"rounded-lg border border-gray-700 px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>U(e.alias),disabled:n.sending||!(k[e.alias]||"").trim(),className:"rounded-lg bg-cyan-600 px-3 py-1.5 text-xs text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700",children:n.sending?"Sending...":"Send"})]})]}),n.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:n.error}),n.success&&$!==e.alias&&(0,t.jsx)("div",{className:"mt-2 text-xs text-green-400",children:n.success})]},e.alias)})}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,t.jsx)("div",{className:"col-span-1",children:"Status"}),(0,t.jsx)("div",{className:"col-span-2",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2",children:"Agent"}),(0,t.jsx)("div",{className:"col-span-2",children:"Server"}),(0,t.jsx)("div",{className:"col-span-2",children:"Current Task"}),(0,t.jsx)("div",{className:"col-span-1",children:"Updated"}),(0,t.jsx)("div",{className:"col-span-2 text-right",children:"Actions"})]}),I.map(e=>{let s=e.online?e.status:"offline",n=A[e.alias]||{};return(0,t.jsxs)("div",{className:`rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 transition-colors hover:border-[#3a3a5a] ${!e.online?"opacity-50":""}`,children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${c[s]||c.offline}`,children:s})}),(0,t.jsx)("div",{className:"col-span-2 min-w-0",children:(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"flex items-center gap-2 min-w-0 hover:text-cyan-300",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:20}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.alias})]})}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-400",children:e.agent||"--"}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-400",children:e.server||"--"}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-500",children:e.task||"--"}),(0,t.jsx)("div",{className:"col-span-1 text-xs text-gray-500",children:(0,r.timeAgo)(e.last_seen_at||e.updated_at)}),(0,t.jsxs)("div",{className:"col-span-2 flex justify-end gap-1.5",children:[(0,t.jsx)("button",{type:"button",onClick:()=>L(e.alias),className:"rounded-lg border border-green-500/20 bg-green-500/10 px-2 py-1 text-xs text-green-300 hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>B(e.alias),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-2 py-1 text-xs text-cyan-300 hover:bg-cyan-500/20",children:"Task"})]})]}),(0,t.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:28}),(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"min-w-0 flex-1 hover:text-cyan-300",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-white",children:e.alias}),(0,t.jsxs)("div",{className:"truncate text-[10px] text-gray-500",children:[e.agent||"—"," · ",(0,r.timeAgo)(e.last_seen_at||e.updated_at)]})]}),(0,t.jsx)("span",{className:`shrink-0 text-xs px-2 py-0.5 rounded-md border ${c[s]||c.offline}`,children:s})]}),e.task&&(0,t.jsx)("div",{className:"truncate text-xs text-gray-500",children:e.task}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>L(e.alias),className:"flex-1 rounded-lg border border-green-500/20 bg-green-500/10 px-3 py-2 text-xs text-green-300 hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>B(e.alias),className:"flex-1 rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-300 hover:bg-cyan-500/20",children:"Send Task"})]})]}),$===e.alias&&(0,t.jsxs)("div",{className:"mt-3 space-y-2 border-t border-[#2a2a4a] pt-3",children:[(0,t.jsx)("input",{type:"text",value:k[e.alias]||"",onChange:t=>E(e.alias,t.target.value),onKeyDown:t=>"Enter"===t.key&&U(e.alias),placeholder:`Send task to ${e.alias}...`,className:"w-full rounded-lg border border-[#2a2a4a] bg-[#0a0a15] px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500 focus:outline-none"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>S(null),className:"rounded-lg border border-gray-700 px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>U(e.alias),disabled:n.sending||!(k[e.alias]||"").trim(),className:"rounded-lg bg-cyan-600 px-3 py-1.5 text-xs text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700",children:n.sending?"Sending...":"Send"})]})]}),n.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:n.error}),n.success&&$!==e.alias&&(0,t.jsx)("div",{className:"mt-2 text-xs text-green-400",children:n.success})]},e.alias)})]}),_&&(0,t.jsx)(l.TaskChatPanel,{alias:_,onClose:()=>L(null)})]})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),l=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function l({variant:e="generic",title:s,sub:i,cta:o,compact:c=!1}){let d=r[e],x=s??d.title,h=i??d.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:x}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function i({cmd:e}){let[a,r]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":a?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:a?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,l,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(0,t.jsx)(l,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}):(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(i,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}])},65822,e=>{"use strict";var t=e.i(83599),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:l}=(0,s.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,l),a,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:l,error:i}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,s.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,t.default)(n(`/api/hub/tasks?${i}`,l),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])},86688,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),r=e.i(18150),n=e.i(65822),l=e.i(58442),i=e.i(95356),o=e.i(69874);function c(e){return e?e.length>12?`${e.slice(0,8)}…`:e:"—"}let d={working:"bg-green-500/10 text-green-300 border-green-500/20",idle:"bg-blue-500/10 text-blue-300 border-blue-500/20",blocked:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",error:"bg-red-500/10 text-red-300 border-red-500/20",offline:"bg-gray-500/10 text-gray-500 border-gray-500/20"};e.s(["default",0,function(){let e,x,h,u,{sessions:g,isLoading:p}=(0,n.useSessions)(),{health:m}=(0,n.useHealth)(),y=m?.sse_sessions||{},b=e=>(e.network_id?y[`${e.network_id}:${e.alias}`]:void 0)??y[e.alias],[j,f]=(0,s.useState)(""),[v,N]=(0,s.useState)(""),[w,k]=(0,s.useState)("list"),[C,$]=(0,s.useState)({}),[S,A]=(0,s.useState)(null),[T,_]=(0,s.useState)({}),[L,I]=(0,s.useState)(null),M=g.map(e=>({...e,online:!!b(e)})).filter(e=>"online"===j?e.online:"offline"===j?!e.online:!j||j===e.status).filter(e=>!v||e.alias.toLowerCase().includes(v.toLowerCase())||(e.agent||"").toLowerCase().includes(v.toLowerCase())).sort((e,t)=>!!t.online-!!e.online||("working"===t.status)-("working"===e.status)),B=g.filter(e=>b(e)).length,E=e=>{A(t=>t===e?null:e),_(t=>({...t,[e]:{}}))},U=(e,t)=>{$(s=>({...s,[e]:t}))},D=async e=>{let t=C[e]?.trim()||"";if(t){_(t=>({...t,[e]:{sending:!0}}));try{let s=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:e,task:t})}),a=await s.json();if(!s.ok||a?.ok===!1)throw Error(a?.error||"Send failed");$(t=>({...t,[e]:""})),_(t=>({...t,[e]:{success:"Task sent"}})),A(null)}catch(t){_(s=>({...s,[e]:{error:t instanceof Error?t.message:"Send failed"}}))}}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Nodes"}),(0,t.jsxs)("span",{className:"text-xs bg-green-900/30 text-green-400 px-2 py-0.5 rounded-full border border-green-800/30",children:[B," online"]}),(0,t.jsxs)("span",{className:"text-xs bg-gray-900/30 text-gray-400 px-2 py-0.5 rounded-full border border-gray-800/30",children:[g.length," total"]})]}),g.length>0&&(e=M.filter(e=>e.online&&"working"===e.status).length,x=M.filter(e=>e.online&&"idle"===e.status).length,h=M.filter(e=>!e.online).length,u=M.length||1,(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:[e>0&&(0,t.jsx)("div",{className:"bg-green-500",style:{width:`${e/u*100}%`}}),x>0&&(0,t.jsx)("div",{className:"bg-cyan-500",style:{width:`${x/u*100}%`}}),h>0&&(0,t.jsx)("div",{className:"bg-gray-600",style:{width:`${h/u*100}%`}})]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-1.5 text-[10px] text-gray-500",children:[e>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 mr-1"}),e," working"]}),x>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-cyan-500 mr-1"}),x," idle"]}),h>0&&(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-gray-600 mr-1"}),h," offline"]})]})]})),g.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,t.jsx)("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:"Search nodes...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-48"}),(0,t.jsxs)("select",{value:j,onChange:e=>f(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All"}),(0,t.jsx)("option",{value:"online",children:"Online"}),(0,t.jsx)("option",{value:"offline",children:"Offline"}),(0,t.jsx)("option",{value:"working",children:"Working"}),(0,t.jsx)("option",{value:"idle",children:"Idle"}),(0,t.jsx)("option",{value:"blocked",children:"Blocked"}),(0,t.jsx)("option",{value:"error",children:"Error"})]}),(0,t.jsx)("div",{className:"hidden sm:flex ml-auto rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 text-sm",children:["list","grid"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>k(e),className:`rounded-md px-3 py-1.5 transition-colors ${w===e?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"list"===e?"List":"Grid"},e))})]}),p?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2,3,4].map(e=>(0,t.jsx)("div",{className:"h-16 bg-gray-800/20 rounded-lg"},e))}):0===M.length?0===g.length?(0,t.jsx)(i.NodesEmptyState,{}):(0,t.jsx)(i.EmptyState,{variant:"nodes",title:"No nodes match your filters",sub:"Try clearing search or status filters, or wait for an agent to register."}):"grid"===w?(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:M.map(e=>{let s=e.online?e.status:"offline",n=T[e.alias]||{},l="number"==typeof e.progress?e.progress:0;return(0,t.jsxs)("div",{className:`relative overflow-hidden rounded-xl border border-[#2a2a4a] bg-[#111128] p-4 transition-colors ${!e.online?"opacity-60":""}`,children:[!e.online&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"rotate-[-20deg] rounded-xl border border-white/10 bg-black/20 px-5 py-2 text-xl font-bold uppercase tracking-[0.35em] text-white/10",children:"Offline"})}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:36}),(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"min-w-0 flex-1 hover:text-cyan-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-base font-semibold text-white",children:e.alias}),(0,t.jsx)("span",{className:`shrink-0 rounded-md border px-2 py-0.5 text-[10px] uppercase tracking-wide ${d[s]||d.offline}`,children:s})]}),(0,t.jsxs)("div",{className:"mt-0.5 truncate text-xs text-gray-500",children:[e.agent||"—",(0,t.jsx)("span",{className:"text-gray-700 mx-1.5",children:"·"}),(0,t.jsx)("span",{title:e.server||"",children:c(e.server)})]})]}),(0,t.jsxs)("div",{className:"flex gap-1.5 shrink-0",children:[(0,t.jsx)("button",{type:"button",onClick:()=>I(e.alias),className:"rounded-lg border border-green-500/20 bg-green-500/10 px-3 py-1.5 text-xs text-green-300 transition-colors hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>E(e.alias),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-xs text-cyan-300 transition-colors hover:bg-cyan-500/20",children:"Task"})]})]}),(0,t.jsxs)("div",{className:"mt-3 rounded-lg border border-[#1a1a2a] bg-[#0a0a15] px-3 py-2 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"Current task"}),(0,t.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.last_seen_at||e.updated_at)})]}),(0,t.jsx)("div",{className:`mt-1 line-clamp-2 ${e.task?"text-gray-300":"text-gray-600 italic"}`,children:e.task||"No current task"})]}),l>0&&l<100&&(0,t.jsx)("div",{className:"mt-3 h-1.5 overflow-hidden rounded-full bg-gray-800",children:(0,t.jsx)("div",{className:"h-1.5 rounded-full bg-cyan-400 transition-all",style:{width:`${l}%`}})}),S===e.alias&&(0,t.jsxs)("div",{className:"mt-4 space-y-2 rounded-lg border border-[#2a2a4a] bg-[#0a0a15] p-3",children:[(0,t.jsx)("input",{type:"text",value:C[e.alias]||"",onChange:t=>U(e.alias,t.target.value),onKeyDown:t=>"Enter"===t.key&&D(e.alias),placeholder:`Send task to ${e.alias}...`,className:"w-full rounded-lg border border-[#2a2a4a] bg-[#050510] px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500 focus:outline-none"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>A(null),className:"rounded-lg border border-gray-700 px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>D(e.alias),disabled:n.sending||!(C[e.alias]||"").trim(),className:"rounded-lg bg-cyan-600 px-3 py-1.5 text-xs text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700",children:n.sending?"Sending...":"Send"})]})]}),n.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:n.error}),n.success&&S!==e.alias&&(0,t.jsx)("div",{className:"mt-2 text-xs text-green-400",children:n.success})]},e.alias)})}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,t.jsx)("div",{className:"col-span-1",children:"Status"}),(0,t.jsx)("div",{className:"col-span-2",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2",children:"Agent"}),(0,t.jsx)("div",{className:"col-span-2",children:"Server"}),(0,t.jsx)("div",{className:"col-span-2",children:"Current Task"}),(0,t.jsx)("div",{className:"col-span-1",children:"Updated"}),(0,t.jsx)("div",{className:"col-span-2 text-right",children:"Actions"})]}),M.map(e=>{let s=e.online?e.status:"offline",n=T[e.alias]||{};return(0,t.jsxs)("div",{className:`rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 transition-colors hover:border-[#3a3a5a] ${!e.online?"opacity-50":""}`,children:[(0,t.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${d[s]||d.offline}`,children:s})}),(0,t.jsx)("div",{className:"col-span-2 min-w-0",children:(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"flex items-center gap-2 min-w-0 hover:text-cyan-300",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:20}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.alias})]})}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-400",children:e.agent||"--"}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-400",title:e.server||"",children:c(e.server)}),(0,t.jsx)("div",{className:"col-span-2 truncate text-xs text-gray-500",children:e.task||"--"}),(0,t.jsx)("div",{className:"col-span-1 text-xs text-gray-500",children:(0,r.timeAgo)(e.last_seen_at||e.updated_at)}),(0,t.jsxs)("div",{className:"col-span-2 flex justify-end gap-1.5",children:[(0,t.jsx)("button",{type:"button",onClick:()=>I(e.alias),className:"rounded-lg border border-green-500/20 bg-green-500/10 px-2 py-1 text-xs text-green-300 hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>E(e.alias),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-2 py-1 text-xs text-cyan-300 hover:bg-cyan-500/20",children:"Task"})]})]}),(0,t.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(o.AliasAvatar,{alias:e.alias,size:28}),(0,t.jsxs)(a.default,{href:`/node?alias=${encodeURIComponent(e.alias)}`,className:"min-w-0 flex-1 hover:text-cyan-300",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-white",children:e.alias}),(0,t.jsxs)("div",{className:"truncate text-[10px] text-gray-500",children:[e.agent||"—"," · ",(0,r.timeAgo)(e.last_seen_at||e.updated_at)]})]}),(0,t.jsx)("span",{className:`shrink-0 text-xs px-2 py-0.5 rounded-md border ${d[s]||d.offline}`,children:s})]}),e.task&&(0,t.jsx)("div",{className:"truncate text-xs text-gray-500",children:e.task}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>I(e.alias),className:"flex-1 rounded-lg border border-green-500/20 bg-green-500/10 px-3 py-2 text-xs text-green-300 hover:bg-green-500/20",children:"Chat"}),(0,t.jsx)("button",{type:"button",onClick:()=>E(e.alias),className:"flex-1 rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-300 hover:bg-cyan-500/20",children:"Send Task"})]})]}),S===e.alias&&(0,t.jsxs)("div",{className:"mt-3 space-y-2 border-t border-[#2a2a4a] pt-3",children:[(0,t.jsx)("input",{type:"text",value:C[e.alias]||"",onChange:t=>U(e.alias,t.target.value),onKeyDown:t=>"Enter"===t.key&&D(e.alias),placeholder:`Send task to ${e.alias}...`,className:"w-full rounded-lg border border-[#2a2a4a] bg-[#0a0a15] px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500 focus:outline-none"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>A(null),className:"rounded-lg border border-gray-700 px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>D(e.alias),disabled:n.sending||!(C[e.alias]||"").trim(),className:"rounded-lg bg-cyan-600 px-3 py-1.5 text-xs text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700",children:n.sending?"Sending...":"Send"})]})]}),n.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:n.error}),n.success&&S!==e.alias&&(0,t.jsx)("div",{className:"mt-2 text-xs text-green-400",children:n.success})]},e.alias)})]}),L&&(0,t.jsx)(l.TaskChatPanel,{alias:L,onClose:()=>I(null)})]})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65822,e=>{"use strict";var s=e.i(83599),a=e.i(58963);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.62"],94867)},32545,e=>{"use strict";var s=e.i(18050),a=e.i(71645),t=e.i(22016),r=e.i(65822),n=e.i(94867);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65822,e=>{"use strict";var s=e.i(83599),a=e.i(58963);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.64"],94867)},32545,e=>{"use strict";var s=e.i(18050),a=e.i(71645),t=e.i(22016),r=e.i(65822),n=e.i(94867);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.64"],94867)},89954,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(94867);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":321,"timestamp":221476398534,"id":4,"parentId":1,"tags":{},"startTime":1778592962223,"traceId":"464318da355297d3"},{"name":"load-custom-routes","duration":504,"timestamp":221476399040,"id":5,"parentId":1,"tags":{},"startTime":1778592962224,"traceId":"464318da355297d3"},{"name":"create-dist-dir","duration":406,"timestamp":221476399590,"id":6,"parentId":1,"tags":{},"startTime":1778592962224,"traceId":"464318da355297d3"},{"name":"clean","duration":572,"timestamp":221476400946,"id":7,"parentId":1,"tags":{},"startTime":1778592962226,"traceId":"464318da355297d3"},{"name":"discover-routes","duration":9164,"timestamp":221476506103,"id":8,"parentId":1,"tags":{},"startTime":1778592962331,"traceId":"464318da355297d3"},{"name":"create-root-mapping","duration":118,"timestamp":221476515340,"id":9,"parentId":1,"tags":{},"startTime":1778592962340,"traceId":"464318da355297d3"},{"name":"generate-route-types","duration":34008,"timestamp":221476517849,"id":10,"parentId":1,"tags":{},"startTime":1778592962343,"traceId":"464318da355297d3"},{"name":"public-dir-conflict-check","duration":125,"timestamp":221476552067,"id":11,"parentId":1,"tags":{},"startTime":1778592962377,"traceId":"464318da355297d3"},{"name":"generate-routes-manifest","duration":4718,"timestamp":221476552343,"id":12,"parentId":1,"tags":{},"startTime":1778592962377,"traceId":"464318da355297d3"},{"name":"run-turbopack","duration":10445991,"timestamp":221476563877,"id":14,"parentId":1,"tags":{},"startTime":1778592962389,"traceId":"464318da355297d3"},{"name":"turbopack-build-events","duration":84,"timestamp":221476890838,"id":15,"parentId":1,"tags":{},"startTime":1778592962716,"traceId":"464318da355297d3"},{"name":"run-typescript","duration":9005660,"timestamp":221487024589,"id":16,"parentId":1,"tags":{},"startTime":1778592972849,"traceId":"464318da355297d3"},{"name":"generate-required-server-files","duration":2213,"timestamp":221496030996,"id":18,"parentId":1,"tags":{},"startTime":1778592981856,"traceId":"464318da355297d3"},{"name":"check-static-error-page","duration":18892,"timestamp":221496109786,"id":20,"parentId":19,"tags":{},"startTime":1778592981934,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":453371,"timestamp":221496135942,"id":62,"parentId":22,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":477037,"timestamp":221496112396,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778592981937,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":585628,"timestamp":221496136190,"id":64,"parentId":26,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":606404,"timestamp":221496115492,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778592981940,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":596079,"timestamp":221496136244,"id":65,"parentId":27,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":616718,"timestamp":221496115669,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778592981940,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":601660,"timestamp":221496136280,"id":66,"parentId":28,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":622354,"timestamp":221496115836,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778592981941,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":608844,"timestamp":221496136322,"id":67,"parentId":29,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":629195,"timestamp":221496116048,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778592981941,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":622764,"timestamp":221496136363,"id":68,"parentId":30,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":642857,"timestamp":221496116367,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778592981941,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":627044,"timestamp":221496136395,"id":69,"parentId":32,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":646648,"timestamp":221496116857,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":631142,"timestamp":221496135629,"id":61,"parentId":21,"tags":{},"startTime":1778592981960,"traceId":"464318da355297d3"},{"name":"check-page","duration":655759,"timestamp":221496111068,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778592981936,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":633009,"timestamp":221496136493,"id":70,"parentId":33,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":652603,"timestamp":221496116964,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":636427,"timestamp":221496136559,"id":72,"parentId":35,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":662985,"timestamp":221496117159,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":645739,"timestamp":221496136048,"id":63,"parentId":25,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":666593,"timestamp":221496115263,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778592981940,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":649707,"timestamp":221496136620,"id":73,"parentId":36,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":668875,"timestamp":221496117512,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":655684,"timestamp":221496136650,"id":75,"parentId":38,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":671483,"timestamp":221496120915,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":659249,"timestamp":221496136658,"id":76,"parentId":39,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":674869,"timestamp":221496121091,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":665895,"timestamp":221496136664,"id":77,"parentId":40,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":681463,"timestamp":221496121164,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":666289,"timestamp":221496136639,"id":74,"parentId":37,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":685342,"timestamp":221496117628,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":667773,"timestamp":221496136672,"id":78,"parentId":41,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":683270,"timestamp":221496121238,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":671444,"timestamp":221496136685,"id":80,"parentId":43,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":686833,"timestamp":221496121352,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":677956,"timestamp":221496136680,"id":79,"parentId":42,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":693405,"timestamp":221496121298,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":683601,"timestamp":221496136694,"id":81,"parentId":44,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":698960,"timestamp":221496121411,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":689198,"timestamp":221496136704,"id":82,"parentId":45,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":706376,"timestamp":221496121462,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":691385,"timestamp":221496136709,"id":83,"parentId":46,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":706606,"timestamp":221496121530,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":692296,"timestamp":221496136538,"id":71,"parentId":34,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":711805,"timestamp":221496117071,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778592981942,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":694716,"timestamp":221496136717,"id":84,"parentId":47,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":709889,"timestamp":221496121586,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":694871,"timestamp":221496136725,"id":85,"parentId":48,"tags":{},"startTime":1778592981961,"traceId":"464318da355297d3"},{"name":"check-page","duration":709976,"timestamp":221496121645,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778592981946,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":692227,"timestamp":221496141940,"id":86,"parentId":24,"tags":{},"startTime":1778592981967,"traceId":"464318da355297d3"},{"name":"check-page","duration":721206,"timestamp":221496113027,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778592981938,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":692295,"timestamp":221496142730,"id":87,"parentId":31,"tags":{},"startTime":1778592981967,"traceId":"464318da355297d3"},{"name":"check-page","duration":718523,"timestamp":221496116541,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778592981941,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":685209,"timestamp":221496154219,"id":89,"parentId":49,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":717574,"timestamp":221496121927,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":691844,"timestamp":221496154235,"id":91,"parentId":51,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":723962,"timestamp":221496122170,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":701859,"timestamp":221496154244,"id":92,"parentId":52,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":733832,"timestamp":221496122336,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":704737,"timestamp":221496154249,"id":93,"parentId":53,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":736555,"timestamp":221496122496,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":710098,"timestamp":221496154258,"id":94,"parentId":55,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":738478,"timestamp":221496125928,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778592981951,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":716074,"timestamp":221496154266,"id":95,"parentId":56,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":744229,"timestamp":221496126189,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778592981951,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":722546,"timestamp":221496154271,"id":96,"parentId":58,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":748764,"timestamp":221496128105,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778592981953,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":724923,"timestamp":221496154170,"id":88,"parentId":23,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":766462,"timestamp":221496112680,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778592981937,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":726479,"timestamp":221496154226,"id":90,"parentId":50,"tags":{},"startTime":1778592981979,"traceId":"464318da355297d3"},{"name":"check-page","duration":758714,"timestamp":221496122044,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":725321,"timestamp":221496159515,"id":98,"parentId":60,"tags":{},"startTime":1778592981984,"traceId":"464318da355297d3"},{"name":"check-page","duration":756462,"timestamp":221496128424,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778592981953,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":728215,"timestamp":221496159529,"id":99,"parentId":57,"tags":{},"startTime":1778592981984,"traceId":"464318da355297d3"},{"name":"check-page","duration":761433,"timestamp":221496126355,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778592981951,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":729558,"timestamp":221496159482,"id":97,"parentId":59,"tags":{},"startTime":1778592981984,"traceId":"464318da355297d3"},{"name":"check-page","duration":760795,"timestamp":221496128290,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778592981953,"traceId":"464318da355297d3"},{"name":"is-page-static","duration":712939,"timestamp":221496177120,"id":100,"parentId":54,"tags":{},"startTime":1778592982002,"traceId":"464318da355297d3"},{"name":"check-page","duration":767435,"timestamp":221496122653,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778592981947,"traceId":"464318da355297d3"},{"name":"static-check","duration":781192,"timestamp":221496108931,"id":19,"parentId":1,"tags":{},"startTime":1778592981934,"traceId":"464318da355297d3"},{"name":"write-routes-manifest","duration":451,"timestamp":221496897158,"id":102,"parentId":1,"tags":{},"startTime":1778592982722,"traceId":"464318da355297d3"},{"name":"load-dotenv","duration":52,"timestamp":221496908761,"id":105,"parentId":104,"tags":{},"startTime":1778592982733,"traceId":"464318da355297d3"},{"name":"run-export-path-map","duration":877,"timestamp":221496913693,"id":106,"parentId":104,"tags":{},"startTime":1778592982738,"traceId":"464318da355297d3"},{"name":"next-export","duration":591876,"timestamp":221496907457,"id":104,"parentId":1,"tags":{},"startTime":1778592982732,"traceId":"464318da355297d3"},{"name":"move-exported-app-not-found-","duration":1792,"timestamp":221497502523,"id":107,"parentId":103,"tags":{},"startTime":1778592983327,"traceId":"464318da355297d3"},{"name":"move-exported-app-global-error-","duration":664,"timestamp":221497504457,"id":108,"parentId":103,"tags":{},"startTime":1778592983329,"traceId":"464318da355297d3"}]
|
|
2
|
-
[{"name":"static-generation","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":300,"timestamp":222335417526,"id":4,"parentId":1,"tags":{},"startTime":1778593821242,"traceId":"738d4f83833a3051"},{"name":"load-custom-routes","duration":565,"timestamp":222335417984,"id":5,"parentId":1,"tags":{},"startTime":1778593821243,"traceId":"738d4f83833a3051"},{"name":"create-dist-dir","duration":1286,"timestamp":222335418623,"id":6,"parentId":1,"tags":{},"startTime":1778593821243,"traceId":"738d4f83833a3051"},{"name":"clean","duration":1746,"timestamp":222335420971,"id":7,"parentId":1,"tags":{},"startTime":1778593821246,"traceId":"738d4f83833a3051"},{"name":"discover-routes","duration":22824,"timestamp":222335563264,"id":8,"parentId":1,"tags":{},"startTime":1778593821388,"traceId":"738d4f83833a3051"},{"name":"create-root-mapping","duration":154,"timestamp":222335586155,"id":9,"parentId":1,"tags":{},"startTime":1778593821411,"traceId":"738d4f83833a3051"},{"name":"generate-route-types","duration":36435,"timestamp":222335589250,"id":10,"parentId":1,"tags":{},"startTime":1778593821414,"traceId":"738d4f83833a3051"},{"name":"public-dir-conflict-check","duration":133,"timestamp":222335625907,"id":11,"parentId":1,"tags":{},"startTime":1778593821451,"traceId":"738d4f83833a3051"},{"name":"generate-routes-manifest","duration":4621,"timestamp":222335626172,"id":12,"parentId":1,"tags":{},"startTime":1778593821451,"traceId":"738d4f83833a3051"},{"name":"run-turbopack","duration":15677313,"timestamp":222335637633,"id":14,"parentId":1,"tags":{},"startTime":1778593821462,"traceId":"738d4f83833a3051"},{"name":"turbopack-build-events","duration":79,"timestamp":222336083113,"id":15,"parentId":1,"tags":{},"startTime":1778593821908,"traceId":"738d4f83833a3051"},{"name":"run-typescript","duration":11930312,"timestamp":222351342329,"id":16,"parentId":1,"tags":{},"startTime":1778593837167,"traceId":"738d4f83833a3051"},{"name":"generate-required-server-files","duration":2927,"timestamp":222363273545,"id":18,"parentId":1,"tags":{},"startTime":1778593849098,"traceId":"738d4f83833a3051"},{"name":"check-static-error-page","duration":24759,"timestamp":222363365292,"id":20,"parentId":19,"tags":{},"startTime":1778593849190,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":506502,"timestamp":222363394030,"id":62,"parentId":22,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":529882,"timestamp":222363370779,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778593849195,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":595614,"timestamp":222363393706,"id":61,"parentId":21,"tags":{},"startTime":1778593849218,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":621158,"timestamp":222363368250,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778593849193,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":759924,"timestamp":222363394299,"id":65,"parentId":27,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":775778,"timestamp":222363378508,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778593849203,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":771128,"timestamp":222363394350,"id":66,"parentId":28,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":786943,"timestamp":222363378605,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778593849203,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":782056,"timestamp":222363394387,"id":67,"parentId":29,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":797661,"timestamp":222363378851,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778593849204,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":790040,"timestamp":222363394259,"id":64,"parentId":26,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":805993,"timestamp":222363378385,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778593849203,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":791040,"timestamp":222363394421,"id":68,"parentId":30,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":806337,"timestamp":222363379176,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778593849204,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":798397,"timestamp":222363394453,"id":69,"parentId":32,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":812361,"timestamp":222363380546,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778593849205,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":800838,"timestamp":222363394556,"id":70,"parentId":33,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":814629,"timestamp":222363380825,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778593849206,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":810793,"timestamp":222363394603,"id":71,"parentId":34,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":824407,"timestamp":222363381047,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778593849206,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":814236,"timestamp":222363394676,"id":73,"parentId":36,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":827265,"timestamp":222363381699,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778593849206,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":814479,"timestamp":222363394620,"id":72,"parentId":35,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":827897,"timestamp":222363381225,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778593849206,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":823412,"timestamp":222363394695,"id":74,"parentId":37,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":836266,"timestamp":222363381907,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":825736,"timestamp":222363394703,"id":75,"parentId":38,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":838392,"timestamp":222363382105,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":832564,"timestamp":222363394709,"id":76,"parentId":39,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":845156,"timestamp":222363382200,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":841831,"timestamp":222363394118,"id":63,"parentId":25,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":857991,"timestamp":222363378037,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778593849203,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":841424,"timestamp":222363394721,"id":78,"parentId":41,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":853819,"timestamp":222363382367,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":841798,"timestamp":222363394715,"id":77,"parentId":40,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":854277,"timestamp":222363382277,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":847579,"timestamp":222363394733,"id":80,"parentId":43,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":859874,"timestamp":222363382503,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":851742,"timestamp":222363394727,"id":79,"parentId":42,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":864078,"timestamp":222363382443,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":854164,"timestamp":222363394738,"id":81,"parentId":44,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":866382,"timestamp":222363382570,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":856518,"timestamp":222363394744,"id":82,"parentId":45,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":868666,"timestamp":222363382644,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":859746,"timestamp":222363394754,"id":84,"parentId":47,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":871645,"timestamp":222363382903,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778593849208,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":863844,"timestamp":222363394759,"id":85,"parentId":48,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":875612,"timestamp":222363383048,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778593849208,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":865301,"timestamp":222363399949,"id":86,"parentId":24,"tags":{},"startTime":1778593849225,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":893448,"timestamp":222363371895,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778593849197,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":871192,"timestamp":222363394749,"id":83,"parentId":46,"tags":{},"startTime":1778593849219,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":883235,"timestamp":222363382750,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778593849207,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":868911,"timestamp":222363400683,"id":87,"parentId":31,"tags":{},"startTime":1778593849225,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":890266,"timestamp":222363379381,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778593849204,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":852315,"timestamp":222363430762,"id":88,"parentId":23,"tags":{},"startTime":1778593849255,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":911474,"timestamp":222363371660,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778593849196,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":870079,"timestamp":222363430819,"id":91,"parentId":51,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":917128,"timestamp":222363383851,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778593849209,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":911213,"timestamp":222363430828,"id":92,"parentId":52,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":957999,"timestamp":222363384110,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778593849209,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":940215,"timestamp":222363430813,"id":90,"parentId":50,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":987451,"timestamp":222363383656,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778593849208,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":940500,"timestamp":222363430837,"id":93,"parentId":53,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":986978,"timestamp":222363384392,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778593849209,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":952300,"timestamp":222363430803,"id":89,"parentId":49,"tags":{},"startTime":1778593849255,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1000162,"timestamp":222363383453,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778593849208,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":967216,"timestamp":222363430852,"id":95,"parentId":56,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1010773,"timestamp":222363387356,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778593849212,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":967866,"timestamp":222363430861,"id":96,"parentId":58,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1010040,"timestamp":222363388837,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778593849214,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":968292,"timestamp":222363430843,"id":94,"parentId":55,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1012037,"timestamp":222363387129,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778593849212,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":993292,"timestamp":222363430877,"id":98,"parentId":60,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1034482,"timestamp":222363389751,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778593849214,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":997846,"timestamp":222363430888,"id":99,"parentId":54,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1044112,"timestamp":222363384678,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778593849209,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":999987,"timestamp":222363430866,"id":97,"parentId":59,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1041796,"timestamp":222363389115,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778593849214,"traceId":"738d4f83833a3051"},{"name":"is-page-static","duration":1007542,"timestamp":222363430894,"id":100,"parentId":57,"tags":{},"startTime":1778593849256,"traceId":"738d4f83833a3051"},{"name":"check-page","duration":1050968,"timestamp":222363387528,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778593849212,"traceId":"738d4f83833a3051"},{"name":"static-check","duration":1074142,"timestamp":222363364394,"id":19,"parentId":1,"tags":{},"startTime":1778593849189,"traceId":"738d4f83833a3051"},{"name":"write-routes-manifest","duration":2549,"timestamp":222364450842,"id":102,"parentId":1,"tags":{},"startTime":1778593850276,"traceId":"738d4f83833a3051"},{"name":"load-dotenv","duration":56,"timestamp":222364469526,"id":105,"parentId":104,"tags":{},"startTime":1778593850294,"traceId":"738d4f83833a3051"},{"name":"run-export-path-map","duration":739,"timestamp":222364472301,"id":106,"parentId":104,"tags":{},"startTime":1778593850297,"traceId":"738d4f83833a3051"},{"name":"next-export","duration":973809,"timestamp":222364467978,"id":104,"parentId":1,"tags":{},"startTime":1778593850293,"traceId":"738d4f83833a3051"},{"name":"move-exported-app-not-found-","duration":1998,"timestamp":222365445778,"id":107,"parentId":103,"tags":{},"startTime":1778593851270,"traceId":"738d4f83833a3051"},{"name":"move-exported-app-global-error-","duration":545,"timestamp":222365447894,"id":108,"parentId":103,"tags":{},"startTime":1778593851273,"traceId":"738d4f83833a3051"}]
|
|
2
|
+
[{"name":"static-generation","duration":997137,"timestamp":222364459960,"id":103,"parentId":1,"tags":{},"startTime":1778593850285,"traceId":"738d4f83833a3051"},{"name":"write-routes-manifest","duration":434,"timestamp":222365457305,"id":109,"parentId":1,"tags":{},"startTime":1778593851282,"traceId":"738d4f83833a3051"},{"name":"print-tree-view","duration":9868,"timestamp":222365467781,"id":110,"parentId":1,"tags":{},"startTime":1778593851292,"traceId":"738d4f83833a3051"},{"name":"write-route-bundle-stats","duration":46578,"timestamp":222365477696,"id":111,"parentId":1,"tags":{},"startTime":1778593851302,"traceId":"738d4f83833a3051"},{"name":"telemetry-flush","duration":20336,"timestamp":222365524362,"id":112,"parentId":1,"tags":{},"startTime":1778593851349,"traceId":"738d4f83833a3051"},{"name":"next-build","duration":30216899,"timestamp":222335327837,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778593821153,"traceId":"738d4f83833a3051"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":15677313,"timestamp":222335637633,"id":14,"parentId":1,"tags":{},"startTime":1778593821462,"traceId":"738d4f83833a3051"},{"name":"turbopack-build-events","duration":79,"timestamp":222336083113,"id":15,"parentId":1,"tags":{},"startTime":1778593821908,"traceId":"738d4f83833a3051"},{"name":"run-typescript","duration":11930312,"timestamp":222351342329,"id":16,"parentId":1,"tags":{},"startTime":1778593837167,"traceId":"738d4f83833a3051"},{"name":"static-check","duration":1074142,"timestamp":222363364394,"id":19,"parentId":1,"tags":{},"startTime":1778593849189,"traceId":"738d4f83833a3051"},{"name":"static-generation","duration":997137,"timestamp":222364459960,"id":103,"parentId":1,"tags":{},"startTime":1778593850285,"traceId":"738d4f83833a3051"},{"name":"telemetry-flush","duration":20336,"timestamp":222365524362,"id":112,"parentId":1,"tags":{},"startTime":1778593851349,"traceId":"738d4f83833a3051"},{"name":"next-build","duration":30216899,"timestamp":222335327837,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778593821153,"traceId":"738d4f83833a3051"}]
|
package/app/nodes/page.tsx
CHANGED
|
@@ -9,6 +9,14 @@ import { EmptyState, NodesEmptyState } from '../components/EmptyState';
|
|
|
9
9
|
import { AliasAvatar } from '../components/AliasAvatar';
|
|
10
10
|
import type { Session } from '../components/types';
|
|
11
11
|
|
|
12
|
+
/** Round 81: shorten long server hostnames (Alibaba `iZ…oyZ` style)
|
|
13
|
+
* for table display. Returns the original string unchanged when ≤12
|
|
14
|
+
* chars. Full value should stay in `title=` for hover + screen-readers. */
|
|
15
|
+
function shortServer(server: string | null | undefined): string {
|
|
16
|
+
if (!server) return '—';
|
|
17
|
+
return server.length > 12 ? `${server.slice(0, 8)}…` : server;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
const STATUS_COLORS: Record<string, string> = {
|
|
13
21
|
working: 'bg-green-500/10 text-green-300 border-green-500/20',
|
|
14
22
|
idle: 'bg-blue-500/10 text-blue-300 border-blue-500/20',
|
|
@@ -148,7 +156,11 @@ export default function NodesPage() {
|
|
|
148
156
|
<option value="blocked">Blocked</option>
|
|
149
157
|
<option value="error">Error</option>
|
|
150
158
|
</select>
|
|
151
|
-
|
|
159
|
+
{/* Round 80: List/Grid toggle hidden on mobile — Grid uses
|
|
160
|
+
grid-cols-1 below `md` and List degrades to the same single
|
|
161
|
+
column, so the toggle has no visual effect under sm and only
|
|
162
|
+
steals a row of vertical space. */}
|
|
163
|
+
<div className="hidden sm:flex ml-auto rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 text-sm">
|
|
152
164
|
{(['list', 'grid'] as const).map(mode => (
|
|
153
165
|
<button
|
|
154
166
|
key={mode}
|
|
@@ -215,7 +227,7 @@ export default function NodesPage() {
|
|
|
215
227
|
</span>
|
|
216
228
|
</div>
|
|
217
229
|
<div className="mt-0.5 truncate text-xs text-gray-500">
|
|
218
|
-
{(s.agent || '—')}<span className="text-gray-700 mx-1.5">·</span
|
|
230
|
+
{(s.agent || '—')}<span className="text-gray-700 mx-1.5">·</span><span title={s.server || ''}>{shortServer(s.server)}</span>
|
|
219
231
|
</div>
|
|
220
232
|
</Link>
|
|
221
233
|
<div className="flex gap-1.5 shrink-0">
|
|
@@ -315,7 +327,7 @@ export default function NodesPage() {
|
|
|
315
327
|
</Link>
|
|
316
328
|
</div>
|
|
317
329
|
<div className="col-span-2 truncate text-xs text-gray-400">{s.agent || '--'}</div>
|
|
318
|
-
<div className="col-span-2 truncate text-xs text-gray-400"
|
|
330
|
+
<div className="col-span-2 truncate text-xs text-gray-400" title={s.server || ''}>{shortServer(s.server)}</div>
|
|
319
331
|
<div className="col-span-2 truncate text-xs text-gray-500">{s.task || '--'}</div>
|
|
320
332
|
<div className="col-span-1 text-xs text-gray-500">{timeAgo(s.last_seen_at || s.updated_at)}</div>
|
|
321
333
|
<div className="col-span-2 flex justify-end gap-1.5">
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Captures the fold (viewport-only screenshot) for a given page so we
|
|
2
|
+
* can inspect what the user actually sees on first paint. */
|
|
3
|
+
|
|
4
|
+
import { chromium } from 'playwright';
|
|
5
|
+
import { mkdirSync } from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
|
|
8
|
+
const TOKEN = process.env.LOOP_REVIEW_TOKEN;
|
|
9
|
+
const OUT = path.resolve(process.cwd(), 'test-results/loop-review/folds');
|
|
10
|
+
mkdirSync(OUT, { recursive: true });
|
|
11
|
+
|
|
12
|
+
const targets = [
|
|
13
|
+
{ name: 'tasks-cyber-desktop', path: '/tasks', theme: 'cyber', w: 1440, h: 900 },
|
|
14
|
+
{ name: 'tasks-cyber-mobile', path: '/tasks', theme: 'cyber', w: 390, h: 844 },
|
|
15
|
+
{ name: 'nodes-cyber-desktop', path: '/nodes', theme: 'cyber', w: 1440, h: 900 },
|
|
16
|
+
{ name: 'nodes-cyber-mobile', path: '/nodes', theme: 'cyber', w: 390, h: 844 },
|
|
17
|
+
{ name: 'overview-cyber-desktop', path: '/', theme: 'cyber', w: 1440, h: 900 },
|
|
18
|
+
{ name: 'overview-light-desktop', path: '/', theme: 'light', w: 1440, h: 900 },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const browser = await chromium.launch({ headless: true });
|
|
22
|
+
for (const t of targets) {
|
|
23
|
+
const ctx = await browser.newContext({ viewport: { width: t.w, height: t.h } });
|
|
24
|
+
await ctx.addCookies([{
|
|
25
|
+
name: 'anet_dashboard_session',
|
|
26
|
+
value: `v3:${TOKEN}`,
|
|
27
|
+
domain: '127.0.0.1', path: '/',
|
|
28
|
+
}]);
|
|
29
|
+
await ctx.addInitScript(theme => {
|
|
30
|
+
try { localStorage.setItem('anet-theme', theme); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
|
|
31
|
+
}, t.theme);
|
|
32
|
+
const page = await ctx.newPage();
|
|
33
|
+
await page.goto(`http://127.0.0.1:3000${t.path}`, { waitUntil: 'domcontentloaded' });
|
|
34
|
+
await page.waitForTimeout(2500);
|
|
35
|
+
await page.evaluate(theme => document.documentElement.setAttribute('data-theme', theme), t.theme);
|
|
36
|
+
await page.waitForTimeout(300);
|
|
37
|
+
await page.screenshot({ path: path.join(OUT, `${t.name}.png`), fullPage: false, animations: 'disabled' });
|
|
38
|
+
await ctx.close();
|
|
39
|
+
}
|
|
40
|
+
await browser.close();
|
|
41
|
+
console.log('captured', targets.length, 'fold-only screenshots to', OUT);
|
|
File without changes
|
/package/.next/static/{eIiIGgDMeRCw8L8q8u0ST → t5Z4Nok0y4KGl913a5FqJ}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|
|
File without changes
|