@sleep2agi/agent-network-dashboard 0.4.5-preview.71 → 0.4.5-preview.73
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 +9 -9
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +2 -2
- package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +1 -1
- 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.html +1 -1
- package/.next/server/app/logs.rsc +1 -1
- package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages/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.html +1 -1
- package/.next/server/app/nodes.rsc +1 -1
- package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/server-logs.html +1 -1
- package/.next/server/app/server-logs.rsc +1 -1
- package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks.html +1 -1
- package/.next/server/app/settings/networks.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +1 -1
- package/.next/server/app/settings/tokens.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +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.html +1 -1
- package/.next/server/app/tasks.rsc +1 -1
- package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/app_0.zbtn5._.js +1 -1
- package/.next/server/chunks/ssr/app_0.zbtn5._.js.map +1 -1
- package/.next/server/chunks/ssr/app_03g4.pq._.js +3 -0
- package/.next/server/chunks/ssr/app_03g4.pq._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0aum_g5._.js +1 -1
- package/.next/server/chunks/ssr/app_0aum_g5._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0esuljp._.js +1 -1
- package/.next/server/chunks/ssr/app_0esuljp._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +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/{0glm3gl882al6.js → 0a6z88g_mmhkp.js} +1 -1
- package/.next/static/chunks/0mmzkcpx2q_7e.js +1 -0
- package/.next/static/chunks/{0iwn.7hiigyrz.js → 0ve696rkee.95.js} +1 -1
- package/.next/static/chunks/{09oxaqu0qn3c9.js → 0ww_16_ejf2xz.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/admin/page.tsx +6 -1
- package/app/messages/page.tsx +10 -2
- package/package.json +1 -1
- package/.next/server/chunks/ssr/app_0tncr1_._.js +0 -3
- package/.next/server/chunks/ssr/app_0tncr1_._.js.map +0 -1
- package/.next/static/chunks/08scyy1.s_5my.js +0 -1
- /package/.next/static/{C7A8u316NGa1ZA9zcEOFm → ncWgB-pytiYNIi5uO3l-g}/_buildManifest.js +0 -0
- /package/.next/static/{C7A8u316NGa1ZA9zcEOFm → ncWgB-pytiYNIi5uO3l-g}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{C7A8u316NGa1ZA9zcEOFm → ncWgB-pytiYNIi5uO3l-g}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"HzD5dwfScwCKMl2J+MMyJf/sb/T8vy03PYTDAj0gJ6I=\"\n}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65822,e=>{"use strict";var s=e.i(83599),a=e.i(58963);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.71"],94867)},32545,e=>{"use strict";var s=e.i(18050),a=e.i(71645),t=e.i(22016),r=e.i(65822),n=e.i(94867);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65822,e=>{"use strict";var s=e.i(83599),a=e.i(58963);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.73"],94867)},32545,e=>{"use strict";var s=e.i(18050),a=e.i(71645),t=e.i(22016),r=e.i(65822),n=e.i(94867);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18150,e=>{"use strict";e.s(["formatUptime",0,function(e){let s=Math.floor(e/3600),t=Math.floor(e%3600/60);return s>0?`${s}h ${t}m`:`${t}m`},"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 s=Math.floor((Date.now()-new Date(e.replace(" ","T")+"Z").getTime())/1e3);return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`}])},69874,e=>{"use strict";var s=e.i(18050);let t=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let l=function(e){let s=0;for(let t=0;t<e.length;t++)s=31*s+e.charCodeAt(t)>>>0;let a=t[s%t.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),n=Math.max(9,Math.round(.42*a));return(0,s.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:n,backgroundColor:l.bg,borderColor:l.ring,color:l.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},65822,e=>{"use strict";var s=e.i(83599),t=e.i(58963);let a=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function l(e,s){if(!s)return e;let t=e.includes("?")?"&":"?";return`${e}${t}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:t}=(0,s.default)("/api/hub/health",a,r);return{health:e||null,error:t}},"useLicense",0,function(){let{data:e,error:t}=(0,s.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:t}},"useMessages",0,function(e=100){let{networkId:n}=(0,t.useNetworkId)(),{data:i,error:d,isLoading:o}=(0,s.default)(l(`/api/hub/messages?limit=${e}`,n),a,r);return{messages:i?.messages||[],error:d,isLoading:o}},"useSessions",0,function(){let{networkId:e}=(0,t.useNetworkId)(),{data:n,error:i,isLoading:d}=(0,s.default)(l("/api/hub/status",e),a,r);return{sessions:n?.sessions||[],hint:n?._hint,error:i,isLoading:d}},"useStats",0,function(){let{networkId:e}=(0,t.useNetworkId)(),{data:n,error:i}=(0,s.default)(l("/api/hub/stats",e),a,r);return{stats:n?.ok?n:null,error:i}},"useTasks",0,function(e){let{networkId:n}=(0,t.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:d,error:o,isLoading:c}=(0,s.default)(l(`/api/hub/tasks?${i}`,n),a,r);return{tasks:d?.tasks||[],count:d?.count??0,source:d?.source,error:o,isLoading:c}}])},28490,e=>{"use strict";e.s(["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"]])},23261,e=>{"use strict";var s=e.i(18050),t=e.i(71645),a=e.i(65822),r=e.i(18150),l=e.i(69874),n=e.i(28490);e.s(["default",0,function(){let{sessions:e}=(0,a.useSessions)(),{health:i}=(0,a.useHealth)(),{stats:d}=(0,a.useStats)(),o=i?.sse_sessions||{},c=e=>(e.network_id?o[`${e.network_id}:${e.alias}`]:void 0)??o[e.alias],[x,u]=(0,t.useState)(""),[g,h]=(0,t.useState)(""),[m,b]=(0,t.useState)(""),[p,f]=(0,t.useState)(""),[y,j]=(0,t.useState)(""),[v,N]=(0,t.useState)(""),[w,S]=(0,t.useState)(""),[k,T]=(0,t.useState)(""),$=async()=>{if(x.trim()&&g.trim()){try{let e=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:x,password:g})}),s=await e.json();b(s.ok?`Created: ${s.user.username} (${s.user.user_id})`:`Failed: ${s.error}`),s.ok&&(u(""),h(""))}catch{b("Failed")}setTimeout(()=>b(""),8e3)}},C=async()=>{if(p.trim()){try{let e=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:p})}),s=await e.json();j(s.ok?`Sent to ${s.recipients} nodes`:`Failed: ${s.error}`),s.ok&&f("")}catch{j("Failed")}setTimeout(()=>j(""),5e3)}},A=async()=>{if(v&&w.trim()){try{let e=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:v,task:w})}),s=await e.json();T(s.ok?"Task sent":`Failed: ${s.error}`),s.ok&&S("")}catch{T("Failed")}setTimeout(()=>T(""),5e3)}},_=e.filter(e=>c(e)),U=e.filter(e=>!c(e));return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Admin"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#status",label:"Status"},{href:"#actions",label:"Actions"},{href:"#users",label:"Users"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-6xl space-y-10",children:[(0,s.jsxs)("div",{id:"status",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Status"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:_.length}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:U.length}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:i?.sse_connections??"--"}),(0,s.jsxs)("div",{className:"text-xs text-gray-500",children:["SSE Streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:d?.tasks?.total??"--"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),d?.tasks?.by_status&&d.tasks.by_status.length>0&&(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:d.tasks.by_status.map(e=>(0,s.jsxs)("span",{className:`text-xs px-2 py-1 rounded border ${n.STATUS_CHIP_CLASS[e.status]||"bg-[#0a0a15] border-[#1a1a2a] text-gray-400"}`,children:[e.status,": ",e.count]},e.status))})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:["Online Sessions ",(0,s.jsxs)("span",{className:"text-gray-600",children:["(",_.length,")"]})]}),(0,s.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===_.length?(0,s.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):_.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,s.jsx)(l.AliasAvatar,{alias:e.alias,size:20}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm text-white font-medium truncate",children:e.alias}),(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[e.agent||"--"," · ",e.task||"idle"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===e.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:e.status}),(0,s.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,r.timeAgo)(e.updated_at)})]})]},e.alias))})]})]})]}),(0,s.jsxs)("div",{id:"actions",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Actions"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),0===e.length?(0,s.jsx)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl px-5 py-4 text-sm text-gray-500",children:"Broadcast and Send Task become available after the first agent registers."}):(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Broadcast"}),(0,s.jsx)("textarea",{value:p,onChange:e=>f(e.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,s.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,s.jsxs)("span",{className:"text-xs text-gray-600",children:[p.length,"/500"]}),(0,s.jsx)("button",{onClick:C,disabled:!p.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),y&&(0,s.jsx)("div",{className:`mt-2 text-xs ${y.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:y})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Send Task"}),(0,s.jsxs)("select",{value:v,onChange:e=>N(e.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,s.jsx)("option",{value:"",children:"Select target node..."}),_.map(e=>(0,s.jsxs)("option",{value:e.alias,children:[e.alias," (",e.status,")"]},e.alias)),(0,s.jsx)("optgroup",{label:"Offline",children:U.map(e=>(0,s.jsxs)("option",{value:e.alias,children:[e.alias," (offline)"]},e.alias))})]}),(0,s.jsx)("textarea",{value:w,onChange:e=>S(e.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,s.jsx)("div",{className:"flex justify-end mt-3",children:(0,s.jsx)("button",{onClick:A,disabled:!v||!w.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Send Task"})}),k&&(0,s.jsx)("div",{className:`mt-2 text-xs ${k.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:k})]})]})]}),(0,s.jsxs)("div",{id:"users",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Users"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Register User (V3)"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"text",value:x,onChange:e=>u(e.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>h(e.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:$,disabled:!x.trim()||!g.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),m&&(0,s.jsx)("div",{className:`mt-2 text-xs ${m.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:m})]})})]})]})]})}])}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
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`}])},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),i=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:i,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:l,cta:o,compact:c=!1}){let x=r[e],d=s??x.title,h=l??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}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function 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}){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),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:i}=(0,s.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,i),a,r);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,s.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${l}`,i),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},82756,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150),n=e.i(95356),i=e.i(69874);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function o(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function c(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[h,m]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[g,y]=(0,s.useState)(!1),[j,b]=(0,s.useState)("timeline"),f=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),v=(0,s.useMemo)(()=>{let t=u.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!h||e.type===h)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>o(e.created_at)-o(t.created_at))},[h,e,u]),w=(0,s.useMemo)(()=>{let e=new Map;return v.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,o(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[v]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:e.length}),v.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=v.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
|
|
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`}])},69874,e=>{"use strict";var t=e.i(18050);let s=[180,200,220,270,300,330,30,90];e.s(["AliasAvatar",0,function({alias:e,size:a=28,className:r=""}){let n=function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}(e),i=Math.max(9,Math.round(.42*a));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${r}`,style:{width:a,height:a,fontSize:i,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"})}])},95356,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:l,cta:o,compact:c=!1}){let x=r[e],d=s??x.title,h=l??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}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function 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}){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),s=e.i(58963);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useLicense",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/license",a,{refreshInterval:6e4});return{license:e?.ok?e:null,error:s}},"useMessages",0,function(e=100){let{networkId:i}=(0,s.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,i),a,r);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,s.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${l}`,i),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},82756,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(65822),r=e.i(18150),n=e.i(95356),i=e.i(69874);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function o(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function c(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[h,m]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[g,y]=(0,s.useState)(!1),[j,b]=(0,s.useState)("timeline"),f=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),v=(0,s.useMemo)(()=>{let t=u.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!h||e.type===h)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>o(e.created_at)-o(t.created_at))},[h,e,u]),w=(0,s.useMemo)(()=>{let e=new Map;return v.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,o(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[v]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums",title:v.length<e.length?`Showing ${v.length} of ${e.length} messages`:void 0,children:v.length<e.length?`${v.length} / ${e.length}`:e.length}),v.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=v.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
|
|
2
2
|
|
|
3
3
|
${e.content||"--"}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94867,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.5-preview.73"],94867)},89954,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(94867);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":286,"timestamp":225588400103,"id":4,"parentId":1,"tags":{},"startTime":1778597074225,"traceId":"cd61fb1de50a4710"},{"name":"load-custom-routes","duration":481,"timestamp":225588400540,"id":5,"parentId":1,"tags":{},"startTime":1778597074225,"traceId":"cd61fb1de50a4710"},{"name":"create-dist-dir","duration":330,"timestamp":225588401073,"id":6,"parentId":1,"tags":{},"startTime":1778597074226,"traceId":"cd61fb1de50a4710"},{"name":"clean","duration":506,"timestamp":225588402457,"id":7,"parentId":1,"tags":{},"startTime":1778597074227,"traceId":"cd61fb1de50a4710"},{"name":"discover-routes","duration":9816,"timestamp":225588490179,"id":8,"parentId":1,"tags":{},"startTime":1778597074315,"traceId":"cd61fb1de50a4710"},{"name":"create-root-mapping","duration":129,"timestamp":225588500095,"id":9,"parentId":1,"tags":{},"startTime":1778597074325,"traceId":"cd61fb1de50a4710"},{"name":"generate-route-types","duration":33159,"timestamp":225588502645,"id":10,"parentId":1,"tags":{},"startTime":1778597074327,"traceId":"cd61fb1de50a4710"},{"name":"public-dir-conflict-check","duration":130,"timestamp":225588535993,"id":11,"parentId":1,"tags":{},"startTime":1778597074361,"traceId":"cd61fb1de50a4710"},{"name":"generate-routes-manifest","duration":4488,"timestamp":225588536254,"id":12,"parentId":1,"tags":{},"startTime":1778597074361,"traceId":"cd61fb1de50a4710"},{"name":"run-turbopack","duration":7957124,"timestamp":225588547609,"id":14,"parentId":1,"tags":{},"startTime":1778597074372,"traceId":"cd61fb1de50a4710"},{"name":"turbopack-build-events","duration":81,"timestamp":225588832282,"id":15,"parentId":1,"tags":{},"startTime":1778597074657,"traceId":"cd61fb1de50a4710"},{"name":"run-typescript","duration":8128160,"timestamp":225596513162,"id":16,"parentId":1,"tags":{},"startTime":1778597082338,"traceId":"cd61fb1de50a4710"},{"name":"generate-required-server-files","duration":2127,"timestamp":225604642325,"id":18,"parentId":1,"tags":{},"startTime":1778597090467,"traceId":"cd61fb1de50a4710"},{"name":"check-static-error-page","duration":23709,"timestamp":225604716798,"id":20,"parentId":19,"tags":{},"startTime":1778597090541,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":333986,"timestamp":225604750329,"id":62,"parentId":22,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":364061,"timestamp":225604720410,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778597090545,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":431655,"timestamp":225604750511,"id":63,"parentId":25,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":458130,"timestamp":225604724116,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778597090549,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":450003,"timestamp":225604749328,"id":61,"parentId":21,"tags":{},"startTime":1778597090574,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":480550,"timestamp":225604718845,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778597090544,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":461106,"timestamp":225604750718,"id":65,"parentId":27,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":487320,"timestamp":225604724562,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778597090549,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":462158,"timestamp":225604750677,"id":64,"parentId":26,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":488472,"timestamp":225604724392,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778597090549,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":466041,"timestamp":225604750827,"id":68,"parentId":30,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":490009,"timestamp":225604726911,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778597090552,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":471220,"timestamp":225604750870,"id":69,"parentId":32,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":494066,"timestamp":225604728091,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778597090553,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":473349,"timestamp":225604750971,"id":70,"parentId":33,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":495374,"timestamp":225604728990,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778597090554,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":476961,"timestamp":225604751059,"id":71,"parentId":34,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":498921,"timestamp":225604729154,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778597090554,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":480749,"timestamp":225604751076,"id":72,"parentId":35,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":502578,"timestamp":225604729294,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778597090554,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":481503,"timestamp":225604750792,"id":67,"parentId":29,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":507496,"timestamp":225604724839,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778597090550,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":484604,"timestamp":225604751154,"id":74,"parentId":37,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":505482,"timestamp":225604730321,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778597090555,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":484820,"timestamp":225604751135,"id":73,"parentId":36,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":505884,"timestamp":225604730092,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778597090555,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":489923,"timestamp":225604751170,"id":76,"parentId":39,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":510477,"timestamp":225604730672,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778597090555,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":490145,"timestamp":225604751164,"id":75,"parentId":38,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":510807,"timestamp":225604730526,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778597090555,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":492300,"timestamp":225604751176,"id":77,"parentId":40,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":512719,"timestamp":225604730805,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778597090555,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":495553,"timestamp":225604751181,"id":78,"parentId":41,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":515950,"timestamp":225604730928,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":496014,"timestamp":225604751187,"id":79,"parentId":42,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":516176,"timestamp":225604731066,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":499331,"timestamp":225604751192,"id":80,"parentId":43,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":519376,"timestamp":225604731191,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":499468,"timestamp":225604751198,"id":81,"parentId":44,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":519386,"timestamp":225604731300,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":503006,"timestamp":225604751203,"id":82,"parentId":45,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":522889,"timestamp":225604731367,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":503268,"timestamp":225604751209,"id":83,"parentId":46,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":522939,"timestamp":225604731565,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":504416,"timestamp":225604750755,"id":66,"parentId":28,"tags":{},"startTime":1778597090575,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":530508,"timestamp":225604724702,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778597090549,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":505988,"timestamp":225604751214,"id":84,"parentId":47,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":525539,"timestamp":225604731699,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":506505,"timestamp":225604751219,"id":85,"parentId":48,"tags":{},"startTime":1778597090576,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":525955,"timestamp":225604731800,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778597090556,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":501893,"timestamp":225604757659,"id":86,"parentId":24,"tags":{},"startTime":1778597090582,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":538498,"timestamp":225604721086,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778597090546,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":502284,"timestamp":225604758438,"id":87,"parentId":31,"tags":{},"startTime":1778597090583,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":533080,"timestamp":225604727668,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778597090552,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":497812,"timestamp":225604767223,"id":89,"parentId":49,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":528459,"timestamp":225604736612,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778597090561,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":504399,"timestamp":225604767239,"id":91,"parentId":51,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":534339,"timestamp":225604737343,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778597090562,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":509908,"timestamp":225604767249,"id":92,"parentId":52,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":539616,"timestamp":225604737586,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778597090562,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":518045,"timestamp":225604767257,"id":93,"parentId":53,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":547534,"timestamp":225604737827,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778597090563,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":521327,"timestamp":225604767263,"id":94,"parentId":55,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":549598,"timestamp":225604739044,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778597090564,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":526876,"timestamp":225604767271,"id":95,"parentId":56,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":554986,"timestamp":225604739231,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778597090564,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":532855,"timestamp":225604767233,"id":90,"parentId":50,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":563149,"timestamp":225604736995,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778597090562,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":533013,"timestamp":225604767279,"id":96,"parentId":58,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":560508,"timestamp":225604739808,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778597090565,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":535616,"timestamp":225604767183,"id":88,"parentId":23,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":582083,"timestamp":225604720759,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778597090545,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":542740,"timestamp":225604767294,"id":98,"parentId":60,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":569906,"timestamp":225604740184,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778597090565,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":543015,"timestamp":225604767302,"id":99,"parentId":57,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":570979,"timestamp":225604739371,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778597090564,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":546909,"timestamp":225604767284,"id":97,"parentId":59,"tags":{},"startTime":1778597090592,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":574273,"timestamp":225604739973,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778597090565,"traceId":"cd61fb1de50a4710"},{"name":"is-page-static","duration":533833,"timestamp":225604781539,"id":100,"parentId":54,"tags":{},"startTime":1778597090606,"traceId":"cd61fb1de50a4710"},{"name":"check-page","duration":577193,"timestamp":225604738213,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778597090563,"traceId":"cd61fb1de50a4710"},{"name":"static-check","duration":599527,"timestamp":225604715920,"id":19,"parentId":1,"tags":{},"startTime":1778597090541,"traceId":"cd61fb1de50a4710"},{"name":"write-routes-manifest","duration":559,"timestamp":225605322229,"id":102,"parentId":1,"tags":{},"startTime":1778597091147,"traceId":"cd61fb1de50a4710"},{"name":"load-dotenv","duration":53,"timestamp":225605336377,"id":105,"parentId":104,"tags":{},"startTime":1778597091161,"traceId":"cd61fb1de50a4710"},{"name":"run-export-path-map","duration":698,"timestamp":225605339348,"id":106,"parentId":104,"tags":{},"startTime":1778597091164,"traceId":"cd61fb1de50a4710"},{"name":"next-export","duration":579942,"timestamp":225605334981,"id":104,"parentId":1,"tags":{},"startTime":1778597091160,"traceId":"cd61fb1de50a4710"},{"name":"move-exported-app-not-found-","duration":610,"timestamp":225605918303,"id":107,"parentId":103,"tags":{},"startTime":1778597091743,"traceId":"cd61fb1de50a4710"},{"name":"move-exported-app-global-error-","duration":417,"timestamp":225605919037,"id":108,"parentId":103,"tags":{},"startTime":1778597091744,"traceId":"cd61fb1de50a4710"}]
|
|
2
|
-
[{"name":"static-generation","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":305,"timestamp":226637641983,"id":4,"parentId":1,"tags":{},"startTime":1778598123467,"traceId":"e80a2b630c7cf66d"},{"name":"load-custom-routes","duration":501,"timestamp":226637642461,"id":5,"parentId":1,"tags":{},"startTime":1778598123467,"traceId":"e80a2b630c7cf66d"},{"name":"create-dist-dir","duration":350,"timestamp":226637643025,"id":6,"parentId":1,"tags":{},"startTime":1778598123468,"traceId":"e80a2b630c7cf66d"},{"name":"clean","duration":531,"timestamp":226637644208,"id":7,"parentId":1,"tags":{},"startTime":1778598123469,"traceId":"e80a2b630c7cf66d"},{"name":"discover-routes","duration":11867,"timestamp":226637782455,"id":8,"parentId":1,"tags":{},"startTime":1778598123607,"traceId":"e80a2b630c7cf66d"},{"name":"create-root-mapping","duration":147,"timestamp":226637794406,"id":9,"parentId":1,"tags":{},"startTime":1778598123619,"traceId":"e80a2b630c7cf66d"},{"name":"generate-route-types","duration":47487,"timestamp":226637797692,"id":10,"parentId":1,"tags":{},"startTime":1778598123622,"traceId":"e80a2b630c7cf66d"},{"name":"public-dir-conflict-check","duration":140,"timestamp":226637845462,"id":11,"parentId":1,"tags":{},"startTime":1778598123670,"traceId":"e80a2b630c7cf66d"},{"name":"generate-routes-manifest","duration":5911,"timestamp":226637845759,"id":12,"parentId":1,"tags":{},"startTime":1778598123670,"traceId":"e80a2b630c7cf66d"},{"name":"run-turbopack","duration":9571165,"timestamp":226637858571,"id":14,"parentId":1,"tags":{},"startTime":1778598123683,"traceId":"e80a2b630c7cf66d"},{"name":"turbopack-build-events","duration":105,"timestamp":226638232392,"id":15,"parentId":1,"tags":{},"startTime":1778598124057,"traceId":"e80a2b630c7cf66d"},{"name":"run-typescript","duration":8569310,"timestamp":226647443377,"id":16,"parentId":1,"tags":{},"startTime":1778598133268,"traceId":"e80a2b630c7cf66d"},{"name":"generate-required-server-files","duration":2744,"timestamp":226656013710,"id":18,"parentId":1,"tags":{},"startTime":1778598141838,"traceId":"e80a2b630c7cf66d"},{"name":"check-static-error-page","duration":16012,"timestamp":226656081311,"id":20,"parentId":19,"tags":{},"startTime":1778598141906,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":314057,"timestamp":226656099589,"id":62,"parentId":22,"tags":{},"startTime":1778598141924,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":330134,"timestamp":226656083632,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778598141908,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":424096,"timestamp":226656099672,"id":63,"parentId":25,"tags":{},"startTime":1778598141924,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":437640,"timestamp":226656086208,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778598141911,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":425368,"timestamp":226656099818,"id":64,"parentId":26,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":438892,"timestamp":226656086362,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778598141911,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":428524,"timestamp":226656099858,"id":65,"parentId":27,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":442022,"timestamp":226656086456,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778598141911,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":430320,"timestamp":226656099893,"id":66,"parentId":28,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":443740,"timestamp":226656086536,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778598141911,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":441414,"timestamp":226656099964,"id":68,"parentId":30,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":453320,"timestamp":226656088138,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":445241,"timestamp":226656099998,"id":69,"parentId":32,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":456764,"timestamp":226656088542,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":447273,"timestamp":226656099271,"id":61,"parentId":21,"tags":{},"startTime":1778598141924,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":464211,"timestamp":226656082388,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778598141907,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":455192,"timestamp":226656100143,"id":70,"parentId":33,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":466734,"timestamp":226656088668,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":460549,"timestamp":226656099931,"id":67,"parentId":29,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":472712,"timestamp":226656087827,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":461896,"timestamp":226656100208,"id":72,"parentId":35,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":473329,"timestamp":226656088844,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":467218,"timestamp":226656100263,"id":73,"parentId":36,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":478330,"timestamp":226656089203,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":473485,"timestamp":226656100282,"id":74,"parentId":37,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":484484,"timestamp":226656089348,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":473757,"timestamp":226656100291,"id":75,"parentId":38,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":484617,"timestamp":226656089462,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":477789,"timestamp":226656100297,"id":76,"parentId":39,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":488602,"timestamp":226656089541,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":477982,"timestamp":226656100303,"id":77,"parentId":40,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":488668,"timestamp":226656089640,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":479367,"timestamp":226656100309,"id":78,"parentId":41,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":490030,"timestamp":226656089711,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":483420,"timestamp":226656100321,"id":80,"parentId":43,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":493910,"timestamp":226656089879,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":484936,"timestamp":226656100315,"id":79,"parentId":42,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":495510,"timestamp":226656089782,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778598141914,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":486958,"timestamp":226656100326,"id":81,"parentId":44,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":497370,"timestamp":226656089950,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":488143,"timestamp":226656100332,"id":82,"parentId":45,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":498481,"timestamp":226656090034,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":490304,"timestamp":226656100336,"id":83,"parentId":46,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":500541,"timestamp":226656090135,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":491582,"timestamp":226656100341,"id":84,"parentId":47,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":501740,"timestamp":226656090217,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":493260,"timestamp":226656100346,"id":85,"parentId":48,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":503351,"timestamp":226656090295,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":493772,"timestamp":226656102564,"id":86,"parentId":24,"tags":{},"startTime":1778598141927,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":512276,"timestamp":226656084097,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778598141909,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":493606,"timestamp":226656103344,"id":87,"parentId":31,"tags":{},"startTime":1778598141928,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":508725,"timestamp":226656088266,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":506242,"timestamp":226656100190,"id":71,"parentId":34,"tags":{},"startTime":1778598141925,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":517732,"timestamp":226656088759,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778598141913,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":491196,"timestamp":226656122148,"id":90,"parentId":50,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":522453,"timestamp":226656090950,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778598141916,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":497069,"timestamp":226656122158,"id":91,"parentId":51,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":528167,"timestamp":226656091121,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778598141916,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":507469,"timestamp":226656122169,"id":92,"parentId":52,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":538378,"timestamp":226656091316,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778598141916,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":514556,"timestamp":226656122175,"id":93,"parentId":53,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":545284,"timestamp":226656091513,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778598141916,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":514890,"timestamp":226656122099,"id":88,"parentId":23,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":553205,"timestamp":226656083853,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778598141909,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":518372,"timestamp":226656122141,"id":89,"parentId":49,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":549813,"timestamp":226656090772,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778598141915,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":518537,"timestamp":226656122185,"id":94,"parentId":55,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":548411,"timestamp":226656092331,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778598141917,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":524769,"timestamp":226656122194,"id":95,"parentId":56,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":554699,"timestamp":226656092525,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778598141917,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":525189,"timestamp":226656122200,"id":96,"parentId":58,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":550608,"timestamp":226656096804,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778598141922,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":530870,"timestamp":226656122221,"id":98,"parentId":60,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":556018,"timestamp":226656097128,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778598141922,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":533967,"timestamp":226656122229,"id":99,"parentId":54,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":564476,"timestamp":226656091774,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778598141916,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":539217,"timestamp":226656122210,"id":97,"parentId":59,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":564516,"timestamp":226656096975,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778598141922,"traceId":"e80a2b630c7cf66d"},{"name":"is-page-static","duration":539864,"timestamp":226656122239,"id":100,"parentId":57,"tags":{},"startTime":1778598141947,"traceId":"e80a2b630c7cf66d"},{"name":"check-page","duration":569449,"timestamp":226656092701,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778598141917,"traceId":"e80a2b630c7cf66d"},{"name":"static-check","duration":581693,"timestamp":226656080495,"id":19,"parentId":1,"tags":{},"startTime":1778598141905,"traceId":"e80a2b630c7cf66d"},{"name":"write-routes-manifest","duration":384,"timestamp":226656669039,"id":102,"parentId":1,"tags":{},"startTime":1778598142494,"traceId":"e80a2b630c7cf66d"},{"name":"load-dotenv","duration":55,"timestamp":226656682369,"id":105,"parentId":104,"tags":{},"startTime":1778598142507,"traceId":"e80a2b630c7cf66d"},{"name":"run-export-path-map","duration":842,"timestamp":226656686151,"id":106,"parentId":104,"tags":{},"startTime":1778598142511,"traceId":"e80a2b630c7cf66d"},{"name":"next-export","duration":594584,"timestamp":226656681117,"id":104,"parentId":1,"tags":{},"startTime":1778598142506,"traceId":"e80a2b630c7cf66d"},{"name":"move-exported-app-not-found-","duration":643,"timestamp":226657279207,"id":107,"parentId":103,"tags":{},"startTime":1778598143104,"traceId":"e80a2b630c7cf66d"},{"name":"move-exported-app-global-error-","duration":408,"timestamp":226657279941,"id":108,"parentId":103,"tags":{},"startTime":1778598143105,"traceId":"e80a2b630c7cf66d"}]
|
|
2
|
+
[{"name":"static-generation","duration":610897,"timestamp":226656673698,"id":103,"parentId":1,"tags":{},"startTime":1778598142498,"traceId":"e80a2b630c7cf66d"},{"name":"write-routes-manifest","duration":450,"timestamp":226657284793,"id":109,"parentId":1,"tags":{},"startTime":1778598143109,"traceId":"e80a2b630c7cf66d"},{"name":"print-tree-view","duration":4385,"timestamp":226657300169,"id":110,"parentId":1,"tags":{},"startTime":1778598143125,"traceId":"e80a2b630c7cf66d"},{"name":"write-route-bundle-stats","duration":12695,"timestamp":226657304598,"id":111,"parentId":1,"tags":{},"startTime":1778598143129,"traceId":"e80a2b630c7cf66d"},{"name":"telemetry-flush","duration":24062,"timestamp":226657317331,"id":112,"parentId":1,"tags":{},"startTime":1778598143142,"traceId":"e80a2b630c7cf66d"},{"name":"next-build","duration":19759874,"timestamp":226637581561,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778598123406,"traceId":"e80a2b630c7cf66d"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":9571165,"timestamp":226637858571,"id":14,"parentId":1,"tags":{},"startTime":1778598123683,"traceId":"e80a2b630c7cf66d"},{"name":"turbopack-build-events","duration":105,"timestamp":226638232392,"id":15,"parentId":1,"tags":{},"startTime":1778598124057,"traceId":"e80a2b630c7cf66d"},{"name":"run-typescript","duration":8569310,"timestamp":226647443377,"id":16,"parentId":1,"tags":{},"startTime":1778598133268,"traceId":"e80a2b630c7cf66d"},{"name":"static-check","duration":581693,"timestamp":226656080495,"id":19,"parentId":1,"tags":{},"startTime":1778598141905,"traceId":"e80a2b630c7cf66d"},{"name":"static-generation","duration":610897,"timestamp":226656673698,"id":103,"parentId":1,"tags":{},"startTime":1778598142498,"traceId":"e80a2b630c7cf66d"},{"name":"telemetry-flush","duration":24062,"timestamp":226657317331,"id":112,"parentId":1,"tags":{},"startTime":1778598143142,"traceId":"e80a2b630c7cf66d"},{"name":"next-build","duration":19759874,"timestamp":226637581561,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778598123406,"traceId":"e80a2b630c7cf66d"}]
|
package/app/admin/page.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useState } from 'react';
|
|
|
4
4
|
import { useSessions, useHealth, useStats } from '../lib/hooks';
|
|
5
5
|
import { timeAgo } from '../components/utils';
|
|
6
6
|
import { AliasAvatar } from '../components/AliasAvatar';
|
|
7
|
+
import { STATUS_CHIP_CLASS } from '../lib/status';
|
|
7
8
|
|
|
8
9
|
export default function AdminPage() {
|
|
9
10
|
const { sessions } = useSessions();
|
|
@@ -123,9 +124,13 @@ export default function AdminPage() {
|
|
|
123
124
|
</div>
|
|
124
125
|
</div>
|
|
125
126
|
{stats?.tasks?.by_status && stats.tasks.by_status.length > 0 && (
|
|
127
|
+
/* Round 90: adopt the shared STATUS_CHIP_CLASS palette so
|
|
128
|
+
`acked`/`replied`/`failed` here color-match the same
|
|
129
|
+
chips on /tasks, Overview r69, and /tasks/[id] r68.
|
|
130
|
+
Unknown statuses fall back to the previous flat gray. */
|
|
126
131
|
<div className="mt-4 flex flex-wrap gap-2">
|
|
127
132
|
{stats.tasks.by_status.map((s: { status: string; count: number }) => (
|
|
128
|
-
<span key={s.status} className=
|
|
133
|
+
<span key={s.status} className={`text-xs px-2 py-1 rounded border ${STATUS_CHIP_CLASS[s.status] || 'bg-[#0a0a15] border-[#1a1a2a] text-gray-400'}`}>
|
|
129
134
|
{s.status}: {s.count}
|
|
130
135
|
</span>
|
|
131
136
|
))}
|
package/app/messages/page.tsx
CHANGED
|
@@ -107,8 +107,16 @@ export default function MessagesPage() {
|
|
|
107
107
|
<div className="min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono">
|
|
108
108
|
<div className="flex items-center gap-4 mb-6">
|
|
109
109
|
<h1 className="text-2xl font-bold text-white lg:ml-0 ml-10">Messages</h1>
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
{/* Round 89: filter-aware chip. When search/type filter is active
|
|
111
|
+
the visible rows are filtered.length; the total loaded is
|
|
112
|
+
messages.length (capped at 200 by useMessages). Show
|
|
113
|
+
`filtered / total` so users notice how much the filter is
|
|
114
|
+
hiding. Same pattern as r88 /tasks chip. */}
|
|
115
|
+
<span
|
|
116
|
+
className="text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums"
|
|
117
|
+
title={filtered.length < messages.length ? `Showing ${filtered.length} of ${messages.length} messages` : undefined}
|
|
118
|
+
>
|
|
119
|
+
{filtered.length < messages.length ? `${filtered.length} / ${messages.length}` : messages.length}
|
|
112
120
|
</span>
|
|
113
121
|
{filtered.length > 0 && (
|
|
114
122
|
<button
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[43515,a=>{"use strict";a.s(["formatUptime",0,function(a){let b=Math.floor(a/3600),c=Math.floor(a%3600/60);return b>0?`${b}h ${c}m`:`${c}m`},"previewContent",0,function(a){return a&&a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}])},1720,a=>{"use strict";var b=a.i(87924);let c=[180,200,220,270,300,330,30,90];a.s(["AliasAvatar",0,function({alias:a,size:d=28,className:e=""}){let f=function(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;let d=c[b%c.length];return{bg:`hsl(${d} 55% 22%)`,ring:`hsl(${d} 60% 45%)`,text:`hsl(${d} 80% 78%)`}}(a),g=Math.max(9,Math.round(.42*d));return(0,b.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${e}`,style:{width:d,height:d,fontSize:g,backgroundColor:f.bg,borderColor:f.ring,color:f.text},title:a,"aria-hidden":!0,children:a?(a.trim().match(/[\p{L}\p{N}]/u)?.[0]||a.trim()[0]||"·").toUpperCase():"·"})}])},44332,a=>{"use strict";var b=a.i(72596),c=a.i(22397);let d=async a=>{let b=await fetch(a);if(401===b.status)throw window.location.assign("/login"),Error("unauthorized");return b.json()},e={refreshInterval:5e3,dedupingInterval:3e3};function f(a,b){if(!b)return a;let c=a.includes("?")?"&":"?";return`${a}${c}network_id=${encodeURIComponent(b)}`}a.s(["useAnetConfig",0,function(){let{data:a}=(0,b.default)("/api/anet/config",d,{refreshInterval:3e4});return{config:a||null}},"useHealth",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/health",d,e);return{health:a||null,error:c}},"useLicense",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/license",d,{refreshInterval:6e4});return{license:a?.ok?a:null,error:c}},"useMessages",0,function(a=100){let{networkId:g}=(0,c.useNetworkId)(),{data:h,error:i,isLoading:j}=(0,b.default)(f(`/api/hub/messages?limit=${a}`,g),d,e);return{messages:h?.messages||[],error:i,isLoading:j}},"useSessions",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h,isLoading:i}=(0,b.default)(f("/api/hub/status",a),d,e);return{sessions:g?.sessions||[],hint:g?._hint,error:h,isLoading:i}},"useStats",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/stats",a),d,e);return{stats:g?.ok?g:null,error:h}},"useTasks",0,function(a){let{networkId:g}=(0,c.useNetworkId)(),h=new URLSearchParams({limit:"100",...a}).toString(),{data:i,error:j,isLoading:k}=(0,b.default)(f(`/api/hub/tasks?${h}`,g),d,e);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:j,isLoading:k}}])},88367,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(44332),e=a.i(43515),f=a.i(1720);a.s(["default",0,function(){let{sessions:a}=(0,d.useSessions)(),{health:g}=(0,d.useHealth)(),{stats:h}=(0,d.useStats)(),i=g?.sse_sessions||{},j=a=>(a.network_id?i[`${a.network_id}:${a.alias}`]:void 0)??i[a.alias],[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(""),[s,t]=(0,c.useState)(""),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(""),[y,z]=(0,c.useState)(""),A=async()=>{if(k.trim()&&m.trim()){try{let a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"register",username:k,password:m})}),b=await a.json();p(b.ok?`Created: ${b.user.username} (${b.user.user_id})`:`Failed: ${b.error}`),b.ok&&(l(""),n(""))}catch{p("Failed")}setTimeout(()=>p(""),8e3)}},B=async()=>{if(q.trim()){try{let a=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:q})}),b=await a.json();t(b.ok?`Sent to ${b.recipients} nodes`:`Failed: ${b.error}`),b.ok&&r("")}catch{t("Failed")}setTimeout(()=>t(""),5e3)}},C=async()=>{if(u&&w.trim()){try{let a=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:u,task:w})}),b=await a.json();z(b.ok?"Task sent":`Failed: ${b.error}`),b.ok&&x("")}catch{z("Failed")}setTimeout(()=>z(""),5e3)}},D=a.filter(a=>j(a)),E=a.filter(a=>!j(a));return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Admin"}),(0,b.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#status",label:"Status"},{href:"#actions",label:"Actions"},{href:"#users",label:"Users"}].map(a=>(0,b.jsx)("a",{href:a.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:a.label},a.href))}),(0,b.jsxs)("div",{className:"max-w-6xl space-y-10",children:[(0,b.jsxs)("div",{id:"status",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Status"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Overview"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-green-400 tabular-nums",children:D.length}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Online"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-gray-500 tabular-nums",children:E.length}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Offline"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-cyan-400 tabular-nums",children:g?.sse_connections??"--"}),(0,b.jsxs)("div",{className:"text-xs text-gray-500",children:["SSE Streams ",(0,b.jsx)("span",{className:"text-gray-600",children:"· server"})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-3xl font-bold text-white tabular-nums",children:h?.tasks?.total??"--"}),(0,b.jsx)("div",{className:"text-xs text-gray-500",children:"Total Tasks"})]})]}),h?.tasks?.by_status&&h.tasks.by_status.length>0&&(0,b.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:h.tasks.by_status.map(a=>(0,b.jsxs)("span",{className:"text-xs px-2 py-1 rounded bg-[#0a0a15] border border-[#1a1a2a] text-gray-400",children:[a.status,": ",a.count]},a.status))})]}),(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:["Online Sessions ",(0,b.jsxs)("span",{className:"text-gray-600",children:["(",D.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:0===D.length?(0,b.jsx)("div",{className:"text-xs text-gray-600 text-center py-4",children:"No online sessions"}):D.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-3 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,b.jsx)(f.AliasAvatar,{alias:a.alias,size:20}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-sm text-white font-medium truncate",children:a.alias}),(0,b.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:[a.agent||"--"," · ",a.task||"idle"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)("span",{className:`text-xs px-2 py-0.5 rounded border ${"working"===a.status?"bg-green-900/30 text-green-300 border-green-800/30":"bg-blue-900/30 text-blue-300 border-blue-800/30"}`,children:a.status}),(0,b.jsx)("span",{className:"text-[10px] text-gray-600",children:(0,e.timeAgo)(a.updated_at)})]})]},a.alias))})]})]})]}),(0,b.jsxs)("div",{id:"actions",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Actions"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),0===a.length?(0,b.jsx)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl px-5 py-4 text-sm text-gray-500",children:"Broadcast and Send Task become available after the first agent registers."}):(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Broadcast"}),(0,b.jsx)("textarea",{value:q,onChange:a=>r(a.target.value),placeholder:"Message to all online nodes...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,b.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,b.jsxs)("span",{className:"text-xs text-gray-600",children:[q.length,"/500"]}),(0,b.jsx)("button",{onClick:B,disabled:!q.trim(),className:"px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Broadcast"})]}),s&&(0,b.jsx)("div",{className:`mt-2 text-xs ${s.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:s})]}),(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Send Task"}),(0,b.jsxs)("select",{value:u,onChange:a=>v(a.target.value),className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white focus:border-cyan-500/50 focus:outline-none mb-3",children:[(0,b.jsx)("option",{value:"",children:"Select target node..."}),D.map(a=>(0,b.jsxs)("option",{value:a.alias,children:[a.alias," (",a.status,")"]},a.alias)),(0,b.jsx)("optgroup",{label:"Offline",children:E.map(a=>(0,b.jsxs)("option",{value:a.alias,children:[a.alias," (offline)"]},a.alias))})]}),(0,b.jsx)("textarea",{value:w,onChange:a=>x(a.target.value),placeholder:"Task content...",rows:3,className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none resize-none"}),(0,b.jsx)("div",{className:"flex justify-end mt-3",children:(0,b.jsx)("button",{onClick:C,disabled:!u||!w.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Send Task"})}),y&&(0,b.jsx)("div",{className:`mt-2 text-xs ${y.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:y})]})]})]}),(0,b.jsxs)("div",{id:"users",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Users"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(0,b.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Register User (V3)"}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("input",{type:"text",value:k,onChange:a=>l(a.target.value),placeholder:"Username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,b.jsx)("input",{type:"password",value:m,onChange:a=>n(a.target.value),placeholder:"Password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,b.jsx)("button",{onClick:A,disabled:!k.trim()||!m.trim(),className:"w-full px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Register"})]}),o&&(0,b.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})})]})]})]})}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=app_0tncr1_._.js.map
|