@sleep2agi/agent-network-dashboard 0.4.5-preview.87 → 0.4.5-preview.88
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 +17 -17
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.html +1 -1
- package/.next/server/app/admin.rsc +1 -1
- package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +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 +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +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 +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +2 -2
- 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 +1 -1
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node.html +1 -1
- package/.next/server/app/node.rsc +1 -1
- package/.next/server/app/node.segments/_full.segment.rsc +1 -1
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +1 -1
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +2 -2
- package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +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.html +1 -1
- package/.next/server/app/server-logs.rsc +1 -1
- package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks/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 +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +2 -2
- 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 +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +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 +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0jl4ukn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0jl4ukn._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0w2ay2h._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0w2ay2h._.js.map +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0.zbtn5._.js +1 -1
- package/.next/server/chunks/ssr/app_0.zbtn5._.js.map +1 -1
- package/.next/server/chunks/ssr/app_04n78pr._.js +1 -1
- package/.next/server/chunks/ssr/app_04n78pr._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0_agk0r._.js +1 -1
- package/.next/server/chunks/ssr/app_0_agk0r._.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_0emvkn2._.js +1 -1
- package/.next/server/chunks/ssr/app_0emvkn2._.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/chunks/ssr/app_0izi28j._.js +1 -1
- package/.next/server/chunks/ssr/app_0izi28j._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{0ywwa79l.thf~.js → 02_zpo7taex9o.js} +2 -2
- package/.next/static/chunks/06n3d~fbbtagk.js +1 -0
- package/.next/static/chunks/07eba1lz2u3p4.js +1 -0
- package/.next/static/chunks/{0tnv-gzgr8bp..js → 0at4zpeqlf-2l.js} +1 -1
- package/.next/static/chunks/{0n7w64kqer3dq.js → 0f.0umzj2p553.js} +1 -1
- package/.next/static/chunks/{0-848dav5-02p.js → 0f4e9qr_gjx8a.js} +1 -1
- package/.next/static/chunks/0g9aof0ob_fcj.js +1 -0
- package/.next/static/chunks/0ubqqhhpsaez4.js +1 -0
- package/.next/static/chunks/{0ogy2-45xvdjy.js → 12gprw3l0kvvf.js} +1 -1
- package/.next/static/chunks/12yuo353giomx.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/EmptyState.tsx +81 -39
- package/app/page.tsx +4 -1
- package/package.json +1 -1
- package/scripts/empty-state-test.mjs +41 -0
- package/.next/static/chunks/06uku.~mtk9zz.js +0 -1
- package/.next/static/chunks/0_tkvll6kmd9r.js +0 -1
- package/.next/static/chunks/0wles3.ky8_p..js +0 -1
- package/.next/static/chunks/1213rotrv_o6s.js +0 -1
- package/.next/static/chunks/171cg07p8~k-l.js +0 -1
- package/scripts/topo-dbg.mjs +0 -32
- package/scripts/topo-dbg2.mjs +0 -25
- package/scripts/topo-dbg3.mjs +0 -34
- package/scripts/topo-dbltap-test.mjs +0 -40
- /package/.next/static/{XMlyDlWAfl_NXffGIo7_8 → ukIN0_qcdiWXoCnHr0oZ3}/_buildManifest.js +0 -0
- /package/.next/static/{XMlyDlWAfl_NXffGIo7_8 → ukIN0_qcdiWXoCnHr0oZ3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{XMlyDlWAfl_NXffGIo7_8 → ukIN0_qcdiWXoCnHr0oZ3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"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 a=[180,200,220,270,300,330,30,90];function s(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;let s=a[t%a.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:i=""}){let n=s(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 ${i}`,style:{width:a,height:a,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,s,"aliasInitial",0,r])},95356,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(22016);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function i({variant:e,size:a}){let s={width:a,height:a},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",...s,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",...s,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",...s,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",...s,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",...s,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",...s,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",...s,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 n({variant:e="generic",title:a,sub:l,cta:o,compact:c=!1}){let d=r[e],x=a??d.title,h=l??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)(i,{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)(s.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[s,r]=(0,a.useState)(!1),i=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:i,"aria-label":s?"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:s?(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,n,"NodesEmptyState",0,function({hint:e,taskHistoryCount:a=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):a>0?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${a.toLocaleString()} task${1===a?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(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)(o,{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:"→"})]})})]})})}])},79365,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(22016),r=e.i(18150),i=e.i(58963),n=e.i(95356),l=e.i(69874);let o={register:"bg-green-500/10 text-green-300 border-green-500/20",login:"bg-blue-500/10 text-blue-300 border-blue-500/20",login_failed:"bg-red-500/10 text-red-300 border-red-500/20",create_network:"bg-purple-500/10 text-purple-300 border-purple-500/20",send_task:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"},c={register:"#4ade80",login:"#60a5fa",login_failed:"#ef4444",create_network:"#a78bfa",send_task:"#22d3ee"};e.s(["default",0,function(){let e,d,{networkId:x}=(0,i.useNetworkId)(),[h,m]=(0,a.useState)([]),[g,y]=(0,a.useState)(!0),[u,p]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),f=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams({limit:"100"});x&&e.set("network_id",x),j&&e.set("action",j);let t=sessionStorage.getItem("anet_v3_auth");if(t)try{let a=JSON.parse(t);a.token&&e.set("token",a.token)}catch{}let a=await fetch(`/api/hub/audit-log?${e.toString()}`);if(401===a.status)return void window.location.assign("/login");let s=await a.json();m(s.logs||[]),p(s.error&&!s.logs?.length?s.error:"")}catch(e){p(e instanceof Error?e.message:"fetch failed")}finally{y(!1)}},[j,x]);return(0,a.useEffect)(()=>{y(!0),f();let e=setInterval(f,1e4);return()=>clearInterval(e)},[f]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsx)("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:"Audit Log"})}),(0,t.jsx)("div",{className:"mb-6 flex flex-wrap items-center gap-1 anet-tabstrip-wrap overflow-x-auto sm:overflow-x-visible",children:(e={},h.forEach(t=>{e[t.action]=(e[t.action]||0)+1}),[{key:"",label:"All"},{key:"login",label:"login",dot:c.login},{key:"login_failed",label:"login_failed",dot:c.login_failed},{key:"register",label:"register",dot:c.register},{key:"create_network",label:"create_network",dot:c.create_network},{key:"send_task",label:"send_task",dot:c.send_task}].map(a=>{let s=""===a.key?h.length:e[a.key]||0,r=j===a.key;return(0,t.jsxs)("button",{type:"button",onClick:()=>b(a.key),disabled:0===s&&""!==a.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed shrink-0 whitespace-nowrap ${r?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[a.dot&&(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:a.dot}}),(0,t.jsx)("span",{children:a.label}),(0,t.jsx)("span",{className:`text-[10px] tabular-nums ${r?"text-cyan-400":"text-gray-600"}`,children:s})]},a.key||"all")}))}),u&&(d=/unauthor|401|forbidden|403|admin/i.test(u),(0,t.jsxs)("div",{className:"anet-warn-chip bg-yellow-900/20 border border-yellow-800/40 text-yellow-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-start gap-3",role:"alert",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-base leading-none",children:"⚠"}),(0,t.jsx)("div",{className:"flex-1",children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"需要 admin 权限查看审计日志"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"审计日志记录用户注册 / 登录 / 网络变更等事件,需要 admin 角色。"}),(0,t.jsx)(s.default,{href:"/login",className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"切到 admin 账号 →"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"加载失败"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"请检查 CommHub 是否在线,或稍后重试。"}),(0,t.jsx)("button",{onClick:()=>window.location.reload(),className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"重新加载 →"})]})})]})),g?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-14 bg-gray-800/20 rounded-lg"},e))}):0===h.length?(0,t.jsx)(n.EmptyState,{variant:"logs"}):(0,t.jsx)("div",{className:"space-y-2",children:h.map(e=>{let a=e.username||e.user_id;return(0,t.jsxs)("div",{className:"relative bg-[#111128] border border-[#2a2a4a] rounded-lg pl-4 pr-4 py-3 hover:border-[#3a3a5a] transition-colors overflow-hidden",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute left-0 top-0 bottom-0 w-0.5",style:{backgroundColor:c[e.action]||"transparent"}}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${o[e.action]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.action}),a&&(0,t.jsx)(l.AliasAvatar,{alias:a,size:16}),(0,t.jsx)("span",{className:"text-sm text-gray-200 font-medium",children:a}),e.target_type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsxs)("span",{className:"text-xs text-gray-400",children:[e.target_type,e.target_id?`:${e.target_id.slice(0,12)}`:""]})]}),(0,t.jsx)("span",{className:"text-xs text-gray-600 ml-auto",children:(0,r.timeAgo)(e.created_at)})]}),e.detail&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.detail}),e.ip&&"unknown"!==e.ip&&(0,t.jsxs)("div",{className:"text-[10px] text-gray-700",children:["IP: ",e.ip]})]},e.id)})})]})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28490,e=>{"use strict";e.s(["SESSION_STATUS_CHIP_CLASS",0,{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"},"SESSION_STATUS_TEXT_CLASS",0,{working:"text-green-400",idle:"text-blue-400",blocked:"text-yellow-400",error:"text-red-400",offline:"text-gray-500"},"STATUS_BAR_CLASS",0,{created:"bg-gray-500",delivered:"bg-blue-500",acked:"bg-cyan-500",running:"bg-green-500",replied:"bg-purple-500",closed:"bg-gray-600",failed:"bg-red-500",cancelled:"bg-yellow-500",expired:"bg-orange-500"},"STATUS_CHIP_CLASS",0,{created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"},"STATUS_DOT_HEX",0,{created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"},"TASK_STATUSES",0,["created","delivered","acked","running","replied","closed","failed","cancelled","expired"]])},18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60);return t>0?`${t}h ${r}m`:`${r}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"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 r=[180,200,220,270,300,330,30,90];function s(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;let s=r[t%r.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}function n(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:r=28,className:a=""}){let i=s(e),l=Math.max(9,Math.round(.42*r));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${a}`,style:{width:r,height:r,fontSize:l,backgroundColor:i.bg,borderColor:i.ring,color:i.text},title:e,"aria-hidden":!0,children:n(e)})},"aliasAvatarColors",0,s,"aliasInitial",0,n])},95356,e=>{"use strict";var t=e.i(18050),r=e.i(71645),s=e.i(22016);let n={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function a({variant:e,size:r}){let s={width:r,height:r},n={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:r,sub:l,cta:o,compact:c=!1}){let d=n[e],x=r??d.title,h=l??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)(a,{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)(s.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({cmd:e}){let[s,n]=(0,r.useState)(!1),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!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:a,"aria-label":s?"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:s?(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,i,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(0,t.jsx)(i,{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)(l,{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),r=e.i(58963);let s=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},n={refreshInterval:5e3,dedupingInterval:3e3};function a(e,t){if(!t)return e;let r=e.includes("?")?"&":"?";return`${e}${r}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",s,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:r}=(0,t.default)("/api/hub/health",s,n);return{health:e||null,error:r}},"useLicense",0,function(){let{data:e,error:r}=(0,t.default)("/api/hub/license",s,{refreshInterval:6e4});return{license:e?.ok?e:null,error:r}},"useMessages",0,function(e=100){let{networkId:i}=(0,r.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(a(`/api/hub/messages?limit=${e}`,i),s,n);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,r.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(a("/api/hub/status",e),s,n);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,r.useNetworkId)(),{data:i,error:l}=(0,t.default)(a("/api/hub/stats",e),s,n);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,r.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,t.default)(a(`/api/hub/tasks?${l}`,i),s,n);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28490,e=>{"use strict";e.s(["SESSION_STATUS_CHIP_CLASS",0,{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"},"SESSION_STATUS_TEXT_CLASS",0,{working:"text-green-400",idle:"text-blue-400",blocked:"text-yellow-400",error:"text-red-400",offline:"text-gray-500"},"STATUS_BAR_CLASS",0,{created:"bg-gray-500",delivered:"bg-blue-500",acked:"bg-cyan-500",running:"bg-green-500",replied:"bg-purple-500",closed:"bg-gray-600",failed:"bg-red-500",cancelled:"bg-yellow-500",expired:"bg-orange-500"},"STATUS_CHIP_CLASS",0,{created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"},"STATUS_DOT_HEX",0,{created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"},"TASK_STATUSES",0,["created","delivered","acked","running","replied","closed","failed","cancelled","expired"]])},18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60);return t>0?`${t}h ${r}m`:`${r}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"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 r=[180,200,220,270,300,330,30,90];function s(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;let s=r[t%r.length];return{bg:`hsl(${s} 55% 22%)`,ring:`hsl(${s} 60% 45%)`,text:`hsl(${s} 80% 78%)`}}function n(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:r=28,className:a=""}){let i=s(e),l=Math.max(9,Math.round(.42*r));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${a}`,style:{width:r,height:r,fontSize:l,backgroundColor:i.bg,borderColor:i.ring,color:i.text},title:e,"aria-hidden":!0,children:n(e)})},"aliasAvatarColors",0,s,"aliasInitial",0,n])},95356,e=>{"use strict";var t=e.i(18050),r=e.i(71645),s=e.i(22016);let n={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function a({variant:e,size:r}){let s={width:r,height:r},n={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...s,children:(0,t.jsxs)("g",{...n,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:r,sub:l,cta:o,compact:c=!1}){let d=n[e],x=r??d.title,h=l??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)(a,{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)(s.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[s,n]=(0,r.useState)(!1),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!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:a,"aria-label":s?"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:s?(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,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:r=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(i,{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.`})}):r>0?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${r.toLocaleString()} task${1===r?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(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)(o,{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),r=e.i(58963);let s=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},n={refreshInterval:5e3,dedupingInterval:3e3};function a(e,t){if(!t)return e;let r=e.includes("?")?"&":"?";return`${e}${r}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",s,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:r}=(0,t.default)("/api/hub/health",s,n);return{health:e||null,error:r}},"useLicense",0,function(){let{data:e,error:r}=(0,t.default)("/api/hub/license",s,{refreshInterval:6e4});return{license:e?.ok?e:null,error:r}},"useMessages",0,function(e=100){let{networkId:i}=(0,r.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(a(`/api/hub/messages?limit=${e}`,i),s,n);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,r.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(a("/api/hub/status",e),s,n);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,r.useNetworkId)(),{data:i,error:l}=(0,t.default)(a("/api/hub/stats",e),s,n);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,r.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,t.default)(a(`/api/hub/tasks?${l}`,i),s,n);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(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 i({variant:e="generic",title:s,sub:o,cta:l,compact:c=!1}){let x=r[e],d=s??x.title,h=o??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),l&&(0,t.jsx)("div",{className:"mt-4",children:l.href?(0,t.jsxs)(a.default,{href:l.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:l.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function o({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function l({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,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(o,{children:(0,t.jsx)(i,{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.`})}):s>0?(0,t.jsx)(o,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(o,{children:(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)(l,{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:"→"})]})})]})})}])},28523,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),r=e.i(18150),n=e.i(95356);e.s(["default",0,function(){let[e,i]=(0,s.useState)([]),[o,l]=(0,s.useState)(!0),[c,x]=(0,s.useState)(""),[d,h]=(0,s.useState)({}),m=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();i(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let y=async()=>{if(c.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),s=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:c})}),a=await s.json();a.ok?(h({token:a.token}),x(""),m()):h({error:a.error})}catch{h({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:s}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:s,token_id:e})}),m()}catch{}};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)(a.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 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,t.jsx)("button",{onClick:y,disabled:!c.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)(n.EmptyState,{variant:"tokens",compact:!0,sub:"Tokens authenticate CLI tools and external integrations. Sign in with V3 auth, then create one above."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,r.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":309,"timestamp":364597939857,"id":4,"parentId":1,"tags":{},"startTime":1778736083765,"traceId":"54b331ea1974c723"},{"name":"load-custom-routes","duration":476,"timestamp":364597940311,"id":5,"parentId":1,"tags":{},"startTime":1778736083765,"traceId":"54b331ea1974c723"},{"name":"create-dist-dir","duration":309,"timestamp":364597940829,"id":6,"parentId":1,"tags":{},"startTime":1778736083766,"traceId":"54b331ea1974c723"},{"name":"clean","duration":482,"timestamp":364597941803,"id":7,"parentId":1,"tags":{},"startTime":1778736083766,"traceId":"54b331ea1974c723"},{"name":"discover-routes","duration":9083,"timestamp":364598027522,"id":8,"parentId":1,"tags":{},"startTime":1778736083852,"traceId":"54b331ea1974c723"},{"name":"create-root-mapping","duration":137,"timestamp":364598036690,"id":9,"parentId":1,"tags":{},"startTime":1778736083861,"traceId":"54b331ea1974c723"},{"name":"generate-route-types","duration":31246,"timestamp":364598039571,"id":10,"parentId":1,"tags":{},"startTime":1778736083864,"traceId":"54b331ea1974c723"},{"name":"public-dir-conflict-check","duration":109,"timestamp":364598071059,"id":11,"parentId":1,"tags":{},"startTime":1778736083896,"traceId":"54b331ea1974c723"},{"name":"generate-routes-manifest","duration":4186,"timestamp":364598071290,"id":12,"parentId":1,"tags":{},"startTime":1778736083896,"traceId":"54b331ea1974c723"},{"name":"run-turbopack","duration":8455214,"timestamp":364598081566,"id":14,"parentId":1,"tags":{},"startTime":1778736083906,"traceId":"54b331ea1974c723"},{"name":"turbopack-build-events","duration":97,"timestamp":364598373944,"id":15,"parentId":1,"tags":{},"startTime":1778736084199,"traceId":"54b331ea1974c723"},{"name":"run-typescript","duration":8319092,"timestamp":364606551649,"id":16,"parentId":1,"tags":{},"startTime":1778736092376,"traceId":"54b331ea1974c723"},{"name":"generate-required-server-files","duration":2654,"timestamp":364614871891,"id":18,"parentId":1,"tags":{},"startTime":1778736100697,"traceId":"54b331ea1974c723"},{"name":"check-static-error-page","duration":21816,"timestamp":364614953823,"id":20,"parentId":19,"tags":{},"startTime":1778736100779,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":316519,"timestamp":364614979030,"id":62,"parentId":22,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":337738,"timestamp":364614957956,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778736100783,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":394437,"timestamp":364614978653,"id":61,"parentId":21,"tags":{},"startTime":1778736100803,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":417103,"timestamp":364614956069,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778736100781,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":448334,"timestamp":364614979286,"id":64,"parentId":26,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":464437,"timestamp":364614963263,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778736100788,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":452376,"timestamp":364614979369,"id":66,"parentId":28,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":468269,"timestamp":364614963543,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778736100788,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":455163,"timestamp":364614979328,"id":65,"parentId":27,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":471190,"timestamp":364614963412,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778736100788,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":455652,"timestamp":364614979126,"id":63,"parentId":25,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":471751,"timestamp":364614963054,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778736100788,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":456706,"timestamp":364614979407,"id":67,"parentId":29,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":472465,"timestamp":364614963693,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778736100788,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":461058,"timestamp":364614979643,"id":70,"parentId":33,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":476098,"timestamp":364614964655,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778736100789,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":464736,"timestamp":364614979692,"id":71,"parentId":34,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":479705,"timestamp":364614964775,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778736100789,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":466965,"timestamp":364614979441,"id":68,"parentId":30,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":482426,"timestamp":364614964032,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778736100789,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":468307,"timestamp":364614979710,"id":72,"parentId":35,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":483158,"timestamp":364614964901,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778736100790,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":470086,"timestamp":364614979765,"id":73,"parentId":36,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":484500,"timestamp":364614965401,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778736100790,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":472723,"timestamp":364614979784,"id":74,"parentId":37,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":486912,"timestamp":364614965634,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778736100790,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":477875,"timestamp":364614979792,"id":75,"parentId":38,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":491910,"timestamp":364614965808,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778736100790,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":478508,"timestamp":364614979798,"id":76,"parentId":39,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":492428,"timestamp":364614965919,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":481134,"timestamp":364614979805,"id":77,"parentId":40,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":494928,"timestamp":364614966050,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":485443,"timestamp":364614979811,"id":78,"parentId":41,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":499151,"timestamp":364614966169,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":488896,"timestamp":364614979816,"id":79,"parentId":42,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":502472,"timestamp":364614966287,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":492434,"timestamp":364614979823,"id":80,"parentId":43,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":505898,"timestamp":364614966405,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":493433,"timestamp":364614979829,"id":81,"parentId":44,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":506783,"timestamp":364614966518,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":498177,"timestamp":364614979835,"id":82,"parentId":45,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":511435,"timestamp":364614966635,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":499830,"timestamp":364614979489,"id":69,"parentId":32,"tags":{},"startTime":1778736100804,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":514875,"timestamp":364614964510,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778736100789,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":499685,"timestamp":364614979852,"id":84,"parentId":47,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":512706,"timestamp":364614966861,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778736100792,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":501050,"timestamp":364614979843,"id":83,"parentId":46,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":514171,"timestamp":364614966761,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778736100791,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":504314,"timestamp":364614979861,"id":85,"parentId":48,"tags":{},"startTime":1778736100805,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":517275,"timestamp":364614966962,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778736100792,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":502183,"timestamp":364614982220,"id":86,"parentId":24,"tags":{},"startTime":1778736100807,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":525842,"timestamp":364614958593,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778736100783,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":503991,"timestamp":364614982941,"id":87,"parentId":31,"tags":{},"startTime":1778736100808,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":522784,"timestamp":364614964192,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778736100789,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":500578,"timestamp":364614992939,"id":90,"parentId":50,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":525413,"timestamp":364614968156,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778736100793,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":513229,"timestamp":364614992945,"id":91,"parentId":51,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":537807,"timestamp":364614968432,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778736100793,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":519394,"timestamp":364614992954,"id":92,"parentId":52,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":543499,"timestamp":364614968904,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778736100794,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":530434,"timestamp":364614992962,"id":93,"parentId":53,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":554314,"timestamp":364614969148,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778736100794,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":533439,"timestamp":364614992927,"id":89,"parentId":49,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":558460,"timestamp":364614967958,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778736100793,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":540116,"timestamp":364614992975,"id":95,"parentId":56,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":563008,"timestamp":364614970163,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778736100795,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":541261,"timestamp":364614992967,"id":94,"parentId":55,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":564303,"timestamp":364614969972,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778736100795,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":542846,"timestamp":364614992881,"id":88,"parentId":23,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":577462,"timestamp":364614958311,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778736100783,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":547619,"timestamp":364614992984,"id":96,"parentId":58,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":565603,"timestamp":364614975053,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778736100800,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":548610,"timestamp":364614993014,"id":98,"parentId":60,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":566249,"timestamp":364614975418,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778736100800,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":553379,"timestamp":364614992990,"id":97,"parentId":59,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":571153,"timestamp":364614975269,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778736100800,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":555220,"timestamp":364614993026,"id":99,"parentId":54,"tags":{},"startTime":1778736100818,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":578876,"timestamp":364614969411,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778736100794,"traceId":"54b331ea1974c723"},{"name":"is-page-static","duration":552378,"timestamp":364614999135,"id":100,"parentId":57,"tags":{},"startTime":1778736100824,"traceId":"54b331ea1974c723"},{"name":"check-page","duration":577102,"timestamp":364614974524,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778736100799,"traceId":"54b331ea1974c723"},{"name":"static-check","duration":599039,"timestamp":364614952627,"id":19,"parentId":1,"tags":{},"startTime":1778736100777,"traceId":"54b331ea1974c723"},{"name":"write-routes-manifest","duration":526,"timestamp":364615559842,"id":102,"parentId":1,"tags":{},"startTime":1778736101385,"traceId":"54b331ea1974c723"},{"name":"load-dotenv","duration":61,"timestamp":364615574687,"id":105,"parentId":104,"tags":{},"startTime":1778736101399,"traceId":"54b331ea1974c723"},{"name":"run-export-path-map","duration":664,"timestamp":364615577812,"id":106,"parentId":104,"tags":{},"startTime":1778736101403,"traceId":"54b331ea1974c723"},{"name":"next-export","duration":779504,"timestamp":364615573409,"id":104,"parentId":1,"tags":{},"startTime":1778736101398,"traceId":"54b331ea1974c723"},{"name":"move-exported-app-not-found-","duration":912,"timestamp":364616357180,"id":107,"parentId":103,"tags":{},"startTime":1778736102182,"traceId":"54b331ea1974c723"},{"name":"move-exported-app-global-error-","duration":457,"timestamp":364616358201,"id":108,"parentId":103,"tags":{},"startTime":1778736102183,"traceId":"54b331ea1974c723"}]
|
|
2
|
-
[{"name":"static-generation","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":323,"timestamp":365434777808,"id":4,"parentId":1,"tags":{},"startTime":1778736920603,"traceId":"a60b7cd740d47617"},{"name":"load-custom-routes","duration":587,"timestamp":365434778286,"id":5,"parentId":1,"tags":{},"startTime":1778736920603,"traceId":"a60b7cd740d47617"},{"name":"create-dist-dir","duration":338,"timestamp":365434778920,"id":6,"parentId":1,"tags":{},"startTime":1778736920604,"traceId":"a60b7cd740d47617"},{"name":"clean","duration":515,"timestamp":365434780044,"id":7,"parentId":1,"tags":{},"startTime":1778736920605,"traceId":"a60b7cd740d47617"},{"name":"discover-routes","duration":10332,"timestamp":365434862249,"id":8,"parentId":1,"tags":{},"startTime":1778736920687,"traceId":"a60b7cd740d47617"},{"name":"create-root-mapping","duration":125,"timestamp":365434872649,"id":9,"parentId":1,"tags":{},"startTime":1778736920697,"traceId":"a60b7cd740d47617"},{"name":"generate-route-types","duration":33426,"timestamp":365434874970,"id":10,"parentId":1,"tags":{},"startTime":1778736920700,"traceId":"a60b7cd740d47617"},{"name":"public-dir-conflict-check","duration":109,"timestamp":365434908616,"id":11,"parentId":1,"tags":{},"startTime":1778736920733,"traceId":"a60b7cd740d47617"},{"name":"generate-routes-manifest","duration":5004,"timestamp":365434908856,"id":12,"parentId":1,"tags":{},"startTime":1778736920734,"traceId":"a60b7cd740d47617"},{"name":"run-turbopack","duration":10040238,"timestamp":365434919140,"id":14,"parentId":1,"tags":{},"startTime":1778736920744,"traceId":"a60b7cd740d47617"},{"name":"turbopack-build-events","duration":125,"timestamp":365435284927,"id":15,"parentId":1,"tags":{},"startTime":1778736921110,"traceId":"a60b7cd740d47617"},{"name":"run-typescript","duration":8308073,"timestamp":365444970643,"id":16,"parentId":1,"tags":{},"startTime":1778736930795,"traceId":"a60b7cd740d47617"},{"name":"generate-required-server-files","duration":3279,"timestamp":365453279635,"id":18,"parentId":1,"tags":{},"startTime":1778736939104,"traceId":"a60b7cd740d47617"},{"name":"check-static-error-page","duration":14203,"timestamp":365453362556,"id":20,"parentId":19,"tags":{},"startTime":1778736939187,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":306045,"timestamp":365453383159,"id":62,"parentId":22,"tags":{},"startTime":1778736939208,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":324391,"timestamp":365453364925,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778736939190,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":393510,"timestamp":365453383399,"id":64,"parentId":26,"tags":{},"startTime":1778736939208,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":406766,"timestamp":365453370272,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":429196,"timestamp":365453386207,"id":65,"parentId":27,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":445121,"timestamp":365453370362,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":443160,"timestamp":365453386300,"id":66,"parentId":28,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":459078,"timestamp":365453370444,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":447257,"timestamp":365453386341,"id":67,"parentId":29,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":463139,"timestamp":365453370519,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":450765,"timestamp":365453386397,"id":68,"parentId":30,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":466486,"timestamp":365453370738,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":454365,"timestamp":365453386443,"id":69,"parentId":32,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":469791,"timestamp":365453371072,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":457566,"timestamp":365453386587,"id":70,"parentId":33,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":473037,"timestamp":365453371167,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":463987,"timestamp":365453383261,"id":63,"parentId":25,"tags":{},"startTime":1778736939208,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":477229,"timestamp":365453370087,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778736939195,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":460857,"timestamp":365453386637,"id":71,"parentId":34,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":476278,"timestamp":365453371244,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":464329,"timestamp":365453386911,"id":73,"parentId":36,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":479624,"timestamp":365453371662,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":468222,"timestamp":365453386941,"id":74,"parentId":37,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":483425,"timestamp":365453371785,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":471322,"timestamp":365453386950,"id":75,"parentId":38,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":486443,"timestamp":365453371871,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":476119,"timestamp":365453386956,"id":76,"parentId":39,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":491198,"timestamp":365453371934,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":478131,"timestamp":365453386962,"id":77,"parentId":40,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":493134,"timestamp":365453371994,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":481158,"timestamp":365453386968,"id":78,"parentId":41,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":496092,"timestamp":365453372073,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":487395,"timestamp":365453386658,"id":72,"parentId":35,"tags":{},"startTime":1778736939211,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":502796,"timestamp":365453371323,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":487261,"timestamp":365453386973,"id":79,"parentId":42,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":502119,"timestamp":365453372138,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":496019,"timestamp":365453382750,"id":61,"parentId":21,"tags":{},"startTime":1778736939207,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":515125,"timestamp":365453363695,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778736939188,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":491975,"timestamp":365453386983,"id":81,"parentId":44,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":506729,"timestamp":365453372264,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":493999,"timestamp":365453386978,"id":80,"parentId":43,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":508836,"timestamp":365453372196,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":495942,"timestamp":365453386993,"id":83,"parentId":46,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":510578,"timestamp":365453372404,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":497241,"timestamp":365453386998,"id":84,"parentId":47,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":513607,"timestamp":365453372467,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":499544,"timestamp":365453387018,"id":85,"parentId":48,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":514094,"timestamp":365453372529,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":498703,"timestamp":365453389789,"id":86,"parentId":24,"tags":{},"startTime":1778736939214,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":523175,"timestamp":365453365351,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778736939190,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":500027,"timestamp":365453390526,"id":87,"parentId":31,"tags":{},"startTime":1778736939215,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":519780,"timestamp":365453370831,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778736939196,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":530193,"timestamp":365453407891,"id":88,"parentId":23,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":572978,"timestamp":365453365170,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778736939190,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":536946,"timestamp":365453407941,"id":90,"parentId":50,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":571957,"timestamp":365453372987,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":537213,"timestamp":365453407928,"id":89,"parentId":49,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":572305,"timestamp":365453372863,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":561627,"timestamp":365453386988,"id":82,"parentId":45,"tags":{},"startTime":1778736939212,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":576344,"timestamp":365453372321,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778736939197,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":543190,"timestamp":365453407954,"id":91,"parentId":51,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":578053,"timestamp":365453373131,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":543346,"timestamp":365453407963,"id":92,"parentId":52,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":578014,"timestamp":365453373314,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":546265,"timestamp":365453407974,"id":93,"parentId":53,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":580810,"timestamp":365453373486,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":550132,"timestamp":365453407988,"id":95,"parentId":56,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":583809,"timestamp":365453374351,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778736939199,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":550301,"timestamp":365453407983,"id":94,"parentId":55,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":584138,"timestamp":365453374168,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778736939199,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":553323,"timestamp":365453407996,"id":96,"parentId":58,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":584974,"timestamp":365453376385,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778736939201,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":555434,"timestamp":365453408031,"id":98,"parentId":60,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":586909,"timestamp":365453376591,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778736939201,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":556390,"timestamp":365453408043,"id":99,"parentId":57,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":588421,"timestamp":365453376048,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778736939201,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":560610,"timestamp":365453408052,"id":100,"parentId":54,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":594997,"timestamp":365453373701,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778736939198,"traceId":"a60b7cd740d47617"},{"name":"is-page-static","duration":563671,"timestamp":365453408019,"id":97,"parentId":59,"tags":{},"startTime":1778736939233,"traceId":"a60b7cd740d47617"},{"name":"check-page","duration":595252,"timestamp":365453376485,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778736939201,"traceId":"a60b7cd740d47617"},{"name":"static-check","duration":610057,"timestamp":365453361726,"id":19,"parentId":1,"tags":{},"startTime":1778736939186,"traceId":"a60b7cd740d47617"},{"name":"write-routes-manifest","duration":570,"timestamp":365453978459,"id":102,"parentId":1,"tags":{},"startTime":1778736939803,"traceId":"a60b7cd740d47617"},{"name":"load-dotenv","duration":58,"timestamp":365453991709,"id":105,"parentId":104,"tags":{},"startTime":1778736939816,"traceId":"a60b7cd740d47617"},{"name":"run-export-path-map","duration":679,"timestamp":365453994795,"id":106,"parentId":104,"tags":{},"startTime":1778736939819,"traceId":"a60b7cd740d47617"},{"name":"next-export","duration":553198,"timestamp":365453990450,"id":104,"parentId":1,"tags":{},"startTime":1778736939815,"traceId":"a60b7cd740d47617"},{"name":"move-exported-app-not-found-","duration":598,"timestamp":365454547010,"id":107,"parentId":103,"tags":{},"startTime":1778736940372,"traceId":"a60b7cd740d47617"},{"name":"move-exported-app-global-error-","duration":384,"timestamp":365454547705,"id":108,"parentId":103,"tags":{},"startTime":1778736940372,"traceId":"a60b7cd740d47617"}]
|
|
2
|
+
[{"name":"static-generation","duration":568162,"timestamp":365453984251,"id":103,"parentId":1,"tags":{},"startTime":1778736939809,"traceId":"a60b7cd740d47617"},{"name":"write-routes-manifest","duration":401,"timestamp":365454552616,"id":109,"parentId":1,"tags":{},"startTime":1778736940377,"traceId":"a60b7cd740d47617"},{"name":"print-tree-view","duration":4479,"timestamp":365454559853,"id":110,"parentId":1,"tags":{},"startTime":1778736940385,"traceId":"a60b7cd740d47617"},{"name":"write-route-bundle-stats","duration":15457,"timestamp":365454564372,"id":111,"parentId":1,"tags":{},"startTime":1778736940389,"traceId":"a60b7cd740d47617"},{"name":"telemetry-flush","duration":39919,"timestamp":365454579868,"id":112,"parentId":1,"tags":{},"startTime":1778736940405,"traceId":"a60b7cd740d47617"},{"name":"next-build","duration":19896694,"timestamp":365434723132,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778736920548,"traceId":"a60b7cd740d47617"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":10040238,"timestamp":365434919140,"id":14,"parentId":1,"tags":{},"startTime":1778736920744,"traceId":"a60b7cd740d47617"},{"name":"turbopack-build-events","duration":125,"timestamp":365435284927,"id":15,"parentId":1,"tags":{},"startTime":1778736921110,"traceId":"a60b7cd740d47617"},{"name":"run-typescript","duration":8308073,"timestamp":365444970643,"id":16,"parentId":1,"tags":{},"startTime":1778736930795,"traceId":"a60b7cd740d47617"},{"name":"static-check","duration":610057,"timestamp":365453361726,"id":19,"parentId":1,"tags":{},"startTime":1778736939186,"traceId":"a60b7cd740d47617"},{"name":"static-generation","duration":568162,"timestamp":365453984251,"id":103,"parentId":1,"tags":{},"startTime":1778736939809,"traceId":"a60b7cd740d47617"},{"name":"telemetry-flush","duration":39919,"timestamp":365454579868,"id":112,"parentId":1,"tags":{},"startTime":1778736940405,"traceId":"a60b7cd740d47617"},{"name":"next-build","duration":19896694,"timestamp":365434723132,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778736920548,"traceId":"a60b7cd740d47617"}]
|
|
@@ -167,56 +167,98 @@ export function EmptyState({ variant = 'generic', title, sub, cta, compact = fal
|
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/** Round 105 (issue #90): centered card shell so the Overview empty state
|
|
171
|
+
* reads as an intentional, layout-aligned card instead of bare text
|
|
172
|
+
* floating in the content column. */
|
|
173
|
+
function EmptyCard({ children }: { children: React.ReactNode }) {
|
|
174
|
+
return (
|
|
175
|
+
<div className="max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20">
|
|
176
|
+
{children}
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
170
181
|
/**
|
|
171
|
-
* Overview-specific variant
|
|
172
|
-
*
|
|
182
|
+
* Overview-specific variant. Three cases:
|
|
183
|
+
* 1. network-mismatch — agents exist globally, none in this network
|
|
184
|
+
* 2. agents-offline — 0 registered now BUT task history exists, so this
|
|
185
|
+
* is NOT a first run (round 105 / issue #90: showing "Spin up your
|
|
186
|
+
* first agent" next to "acked: 499" was misleading)
|
|
187
|
+
* 3. true first-run — 0 agents, 0 history → quickstart command
|
|
173
188
|
*/
|
|
174
|
-
export function NodesEmptyState({
|
|
189
|
+
export function NodesEmptyState({
|
|
190
|
+
hint,
|
|
191
|
+
taskHistoryCount = 0,
|
|
192
|
+
}: {
|
|
193
|
+
hint?: { global_count?: number; filtered_network?: string };
|
|
194
|
+
taskHistoryCount?: number;
|
|
195
|
+
}) {
|
|
175
196
|
if (hint?.global_count) {
|
|
176
197
|
return (
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
198
|
+
<EmptyCard>
|
|
199
|
+
<EmptyState
|
|
200
|
+
variant="nodes"
|
|
201
|
+
title="No agents in this network"
|
|
202
|
+
sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}
|
|
203
|
+
/>
|
|
204
|
+
</EmptyCard>
|
|
182
205
|
);
|
|
183
206
|
}
|
|
207
|
+
|
|
208
|
+
// Round 105 (issue #90): there's task history but no agents online right
|
|
209
|
+
// now — they finished or disconnected. Don't pitch a first-run setup;
|
|
210
|
+
// point at the history instead.
|
|
211
|
+
if (taskHistoryCount > 0) {
|
|
212
|
+
return (
|
|
213
|
+
<EmptyCard>
|
|
214
|
+
<EmptyState
|
|
215
|
+
variant="nodes"
|
|
216
|
+
title="No agents online"
|
|
217
|
+
sub={`Every agent in this network is currently offline. ${taskHistoryCount.toLocaleString()} task${taskHistoryCount === 1 ? '' : 's'} in history — they may have finished their work or disconnected.`}
|
|
218
|
+
cta={{ label: 'View task history', href: '/tasks' }}
|
|
219
|
+
/>
|
|
220
|
+
</EmptyCard>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
184
224
|
// Round 52: true empty state (zero agents anywhere) — show the
|
|
185
225
|
// quickstart command inline so users don't have to leave the dashboard
|
|
186
226
|
// to figure out how to spin up their first agent.
|
|
187
227
|
return (
|
|
188
|
-
<
|
|
189
|
-
<div className="
|
|
190
|
-
<
|
|
191
|
-
<
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
228
|
+
<EmptyCard>
|
|
229
|
+
<div className="text-center py-16 px-4" role="status">
|
|
230
|
+
<div className="anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500" aria-hidden>
|
|
231
|
+
<svg viewBox="0 0 64 64" width={56} height={56}>
|
|
232
|
+
<g stroke="currentColor" strokeWidth="1.5" fill="none">
|
|
233
|
+
<rect x="10" y="20" width="44" height="28" rx="2" />
|
|
234
|
+
<rect x="20" y="32" width="6" height="8" opacity="0.5" />
|
|
235
|
+
<rect x="32" y="32" width="6" height="8" opacity="0.5" />
|
|
236
|
+
<rect x="44" y="32" width="4" height="8" opacity="0.5" />
|
|
237
|
+
<line x1="10" y1="26" x2="54" y2="26" opacity="0.4" />
|
|
238
|
+
<circle cx="14" cy="23" r="0.8" fill="currentColor" />
|
|
239
|
+
</g>
|
|
240
|
+
</svg>
|
|
241
|
+
</div>
|
|
242
|
+
<h3 className="font-medium text-gray-300 text-base">Spin up your first agent</h3>
|
|
243
|
+
<p className="text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed">
|
|
244
|
+
Run this in a fresh terminal to register an agent with this CommHub:
|
|
245
|
+
</p>
|
|
246
|
+
<div className="mt-4 inline-block">
|
|
247
|
+
<QuickstartCommand cmd="npx --yes @sleep2agi/agent-network init" />
|
|
248
|
+
</div>
|
|
249
|
+
<div className="mt-3">
|
|
250
|
+
<a
|
|
251
|
+
href="https://anet.sh"
|
|
252
|
+
target="_blank"
|
|
253
|
+
rel="noopener noreferrer"
|
|
254
|
+
className="inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300"
|
|
255
|
+
>
|
|
256
|
+
Full quickstart guide
|
|
257
|
+
<span aria-hidden>→</span>
|
|
258
|
+
</a>
|
|
259
|
+
</div>
|
|
218
260
|
</div>
|
|
219
|
-
</
|
|
261
|
+
</EmptyCard>
|
|
220
262
|
);
|
|
221
263
|
}
|
|
222
264
|
|
package/app/page.tsx
CHANGED
|
@@ -372,7 +372,10 @@ export default function Dashboard() {
|
|
|
372
372
|
{showTopo && sessions.length > 0 && <TopoGraph sessions={sessions} sseSessions={sseSessions} />}
|
|
373
373
|
|
|
374
374
|
{sessions.length === 0 && !sessError ? (
|
|
375
|
-
<EmptyState
|
|
375
|
+
<EmptyState
|
|
376
|
+
hint={sessHint}
|
|
377
|
+
taskHistoryCount={Object.values(taskStats).reduce((a, b) => a + b, 0)}
|
|
378
|
+
/>
|
|
376
379
|
) : (() => {
|
|
377
380
|
const counts = {
|
|
378
381
|
all: sortedSessions.length,
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { chromium } from 'playwright';
|
|
2
|
+
const TOKEN = process.env.LOOP_REVIEW_TOKEN;
|
|
3
|
+
const browser = await chromium.launch({ headless: true });
|
|
4
|
+
|
|
5
|
+
async function shoot(name, { emptyStats }) {
|
|
6
|
+
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
7
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
8
|
+
await ctx.addInitScript(() => { try { localStorage.setItem('anet-theme','cyber'); sessionStorage.setItem('anet_v3_auth','1'); } catch {} });
|
|
9
|
+
// force 0 sessions
|
|
10
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
11
|
+
const r = await route.fetch(); const b = await r.json();
|
|
12
|
+
await route.fulfill({ response: r, json: { ...b, sessions: [] } });
|
|
13
|
+
});
|
|
14
|
+
if (emptyStats) {
|
|
15
|
+
// also zero out task history → true first-run
|
|
16
|
+
await ctx.route('**/api/hub/stats*', async (route) => {
|
|
17
|
+
const r = await route.fetch(); const b = await r.json();
|
|
18
|
+
await route.fulfill({ response: r, json: { ...b, tasks: { by_status: [] } } });
|
|
19
|
+
});
|
|
20
|
+
await ctx.route('**/api/hub/tasks*', async (route) => {
|
|
21
|
+
const r = await route.fetch(); const b = await r.json();
|
|
22
|
+
await route.fulfill({ response: r, json: { ...b, tasks: [] } });
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const page = await ctx.newPage();
|
|
26
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
27
|
+
await page.waitForTimeout(3000);
|
|
28
|
+
// find the empty-state card text
|
|
29
|
+
const txt = await page.evaluate(() => {
|
|
30
|
+
const h3 = [...document.querySelectorAll('h3')].map(h => h.textContent?.trim());
|
|
31
|
+
return h3.filter(t => /agent/i.test(t || ''));
|
|
32
|
+
});
|
|
33
|
+
console.log(name, '→ empty-state headline(s):', JSON.stringify(txt));
|
|
34
|
+
await page.screenshot({ path: `/tmp/anet-issue-50/empty-${name}.png`, fullPage: true });
|
|
35
|
+
await ctx.close();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
await shoot('with-history', { emptyStats: false }); // 0 sessions, real task history → "No agents online"
|
|
39
|
+
await shoot('true-firstrun', { emptyStats: true }); // 0 sessions, 0 tasks → "Spin up your first agent"
|
|
40
|
+
await browser.close();
|
|
41
|
+
console.log('done');
|
|
@@ -1 +0,0 @@
|
|
|
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`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){if(!e)return"--";let t=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(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 i({variant:e="generic",title:s,sub:o,cta:l,compact:c=!1}){let x=r[e],d=s??x.title,h=o??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),l&&(0,t.jsx)("div",{className:"mt-4",children:l.href?(0,t.jsxs)(a.default,{href:l.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:l.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function o({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,i,"NodesEmptyState",0,function({hint:e}){return e?.global_count?(0,t.jsx)(i,{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)(o,{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:"→"})]})})]})}])},28523,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),r=e.i(18150),n=e.i(95356);e.s(["default",0,function(){let[e,i]=(0,s.useState)([]),[o,l]=(0,s.useState)(!0),[c,x]=(0,s.useState)(""),[d,h]=(0,s.useState)({}),m=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();i(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let y=async()=>{if(c.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),s=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:c})}),a=await s.json();a.ok?(h({token:a.token}),x(""),m()):h({error:a.error})}catch{h({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:s}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:s,token_id:e})}),m()}catch{}};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)(a.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 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,t.jsx)("button",{onClick:y,disabled:!c.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)(n.EmptyState,{variant:"tokens",compact:!0,sub:"Tokens authenticate CLI tools and external integrations. Sign in with V3 auth, then create one above."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,r.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);
|