@sleep2agi/agent-network-dashboard 0.6.3-preview.21 → 0.6.3-preview.22
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 +26 -26
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +3 -3
- package/.next/server/app/admin.segments/_full.segment.rsc +3 -3
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +3 -3
- package/.next/server/app/logs.segments/_full.segment.rsc +3 -3
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +3 -3
- package/.next/server/app/messages.segments/_full.segment.rsc +3 -3
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node/page.js.nft.json +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +3 -3
- package/.next/server/app/node.segments/_full.segment.rsc +3 -3
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +2 -2
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page.js.nft.json +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +3 -3
- package/.next/server/app/nodes.segments/_full.segment.rsc +3 -3
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/providers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/providers.html +2 -2
- package/.next/server/app/providers.rsc +2 -2
- package/.next/server/app/providers.segments/_full.segment.rsc +2 -2
- package/.next/server/app/providers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/providers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/providers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/providers.segments/providers/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/providers.segments/providers.segment.rsc +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +2 -2
- package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +2 -2
- package/.next/server/app/servers.rsc +2 -2
- package/.next/server/app/servers.segments/_full.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/servers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/servers.segments/servers.segment.rsc +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +3 -3
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +3 -3
- package/.next/server/app/tasks.segments/_full.segment.rsc +3 -3
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/0zg~_pinyin-pro_dist_index_mjs_0fj60.q._.js +3 -0
- package/.next/server/chunks/ssr/0zg~_pinyin-pro_dist_index_mjs_0fj60.q._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0-tk.iv._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0-tk.iv._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__091su60._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__091su60._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0k~m-.b._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0k~m-.b._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v2rgdn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v2rgdn._.js.map +1 -0
- package/.next/server/chunks/ssr/dash-loop-wt_0rh8p9o._.js +3 -3
- package/.next/server/chunks/ssr/dash-loop-wt_0rh8p9o._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0-ky8pi._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0-ky8pi._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0ax3klf._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0ax3klf._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0cxknnm._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0cxknnm._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0mxr2l9._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0mxr2l9._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0pcz05f._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0pcz05f._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0~.1~ew._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_0~.1~ew._.js.map +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_13k3-ai._.js +1 -1
- package/.next/server/chunks/ssr/dash-loop-wt_app_13k3-ai._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/0-g~4q8j8mxm4.js +2 -0
- package/.next/static/chunks/0.324peadzie3.js +1 -0
- package/.next/static/chunks/016h47ls_.eb3.js +1 -0
- package/.next/static/chunks/03vplr5e8v~uy.js +1 -0
- package/.next/static/chunks/05srmv31apvro.css +1 -0
- package/.next/static/chunks/0a0xa8~ux8yj2.js +1 -0
- package/.next/static/chunks/{0~kjngaphakh5.js → 0a9ilbebmnl47.js} +1 -1
- package/.next/static/chunks/0b9n013t4o.m7.js +7 -0
- package/.next/static/chunks/0cdo0a8-9gjs0.js +1 -0
- package/.next/static/chunks/0da-je9qrw1o6.js +1 -0
- package/.next/static/chunks/{0qjbzxfgcd6_3.js → 0q-cs_6ry76lh.js} +1 -1
- package/.next/static/chunks/0q5xir~9v-77t.js +1 -0
- package/.next/static/chunks/{02-g_rv~6kywl.js → 0z31ajz1sgl21.js} +2 -2
- package/.next/static/chunks/17-dam4fv0tzs.js +4 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/AliasAvatar.tsx +31 -0
- package/app/components/NodeSettingsPanel.tsx +52 -0
- package/app/components/TaskChatPanel.tsx +26 -1
- package/app/lib/avatars.ts +79 -0
- package/app/page.tsx +8 -2
- package/package.json +3 -2
- package/public/avatars/manifest.json +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__04nqr0~._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__04nqr0~._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0rcs2vk._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0rcs2vk._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0vc.3k7._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0vc.3k7._.js.map +0 -1
- package/.next/static/chunks/02r4vb97r~-7r.js +0 -1
- package/.next/static/chunks/08medgd.1p151.js +0 -2
- package/.next/static/chunks/09-3btfwxmjfe.js +0 -1
- package/.next/static/chunks/09ju~nqgg3wpf.js +0 -4
- package/.next/static/chunks/0_gs9wrgf86-h.js +0 -7
- package/.next/static/chunks/0dq_d9k9asnws.js +0 -1
- package/.next/static/chunks/0usafm~4wag7t.js +0 -1
- package/.next/static/chunks/0wh6q.1qr0dmx.css +0 -1
- package/.next/static/chunks/0z52qau1ofv1z.js +0 -1
- package/.next/static/chunks/12jet.4d8djw0.js +0 -1
- /package/.next/static/{eAg58ZUqc0h75GPUsWy97 → Wh2iA_9c_IGG1Gq1ludnh}/_buildManifest.js +0 -0
- /package/.next/static/{eAg58ZUqc0h75GPUsWy97 → Wh2iA_9c_IGG1Gq1ludnh}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{eAg58ZUqc0h75GPUsWy97 → Wh2iA_9c_IGG1Gq1ludnh}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},86434,a=>{"use strict";var b=a.i(18945);a.s(["previewContent",0,function(a){return a&&a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(a){return(0,b.relativeAgo)(a)??"--"}])},90230,36422,a=>{"use strict";var b=a.i(91339),c=a.i(91921);let d="anet-avatars-updated";function e(a){return window.addEventListener(d,a),window.addEventListener("storage",a),()=>{window.removeEventListener(d,a),window.removeEventListener("storage",a)}}function f(a){return(0,c.useSyncExternalStore)(e,()=>a&&({})[a]||"",()=>"")}a.s(["setAvatarUrl",0,function(a,b){},"useAvatarUrl",0,f],36422);let g=[180,200,220,270,300,330,30,90];function h(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;let c=g[b%g.length];return{bg:`hsl(${c} 55% 22%)`,ring:`hsl(${c} 60% 45%)`,text:`hsl(${c} 80% 78%)`}}function i(a){return a?(a.trim().match(/[\p{L}\p{N}]/u)?.[0]||a.trim()[0]||"·").toUpperCase():"·"}a.s(["AliasAvatar",0,function({alias:a,size:d=28,className:e=""}){let g=f(a),[j,k]=(0,c.useState)("loading");if((0,c.useEffect)(()=>{k("loading")},[g]),g&&"error"!==j)return(0,b.jsx)("span",{className:`anet-alias-avatar relative inline-flex shrink-0 overflow-hidden rounded-full border border-[var(--border)] ${"loading"===j?"animate-pulse bg-[var(--bg-elevated)]":""} ${e}`,style:{width:d,height:d},title:a,"aria-hidden":!0,children:(0,b.jsx)("img",{src:g,alt:"",loading:"lazy",onLoad:()=>k("ready"),onError:()=>k("error"),className:`h-full w-full rounded-full object-cover transition-opacity duration-150 ${"ready"===j?"opacity-100":"opacity-0"}`})});if(/\bgrok\b|grok-build|grok测试员|grok-demo/i.test(a))return(0,b.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${e}`,style:{width:d,height:d,backgroundImage:"url(/vendors/grok.svg)",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"68% 68%"},title:a,"aria-hidden":!0});let l=h(a),m=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:m,backgroundColor:l.bg,borderColor:l.ring,color:l.text},title:a,"aria-hidden":!0,children:i(a)})},"aliasAvatarColors",0,h,"aliasInitial",0,i],90230)},34794,a=>{"use strict";var b=a.i(91339),c=a.i(91921),d=a.i(56388);let e={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 f({variant:a,size:c}){let d={width:c,height:c},e={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(a){case"nodes":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,b.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,b.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,b.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,b.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,b.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.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,b.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,b.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.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,b.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,b.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,b.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,b.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,b.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,b.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,b.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,b.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,b.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,b.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...e,children:[(0,b.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function g({variant:a="generic",title:c,sub:h,cta:i,compact:j=!1}){let k=e[a],l=c??k.title,m=h??k.sub;return(0,b.jsxs)("div",{className:`text-center ${j?"py-8":"py-16"} px-4`,role:"status",children:[(0,b.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,b.jsx)(f,{variant:a,size:j?40:56})}),(0,b.jsx)("h3",{className:`font-medium text-gray-300 ${j?"text-sm":"text-base"}`,children:l}),m&&(0,b.jsx)("p",{className:`text-gray-500 ${j?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:m}),i&&(0,b.jsx)("div",{className:"mt-4",children:i.href?(0,b.jsxs)(d.default,{href:i.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[i.label,(0,b.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,b.jsxs)("button",{onClick:i.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[i.label,(0,b.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function h({children:a}){return(0,b.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#26262b] bg-[#161618] shadow-lg shadow-black/20",children:a})}function i({cmd:a}){let[d,e]=(0,c.useState)(!1),f=async()=>{try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!1),1800)}catch{}};return(0,b.jsxs)("div",{className:"anet-empty-cmd flex items-start sm:items-center gap-2 bg-[#0e0e10] border border-[#26262b] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,b.jsx)("code",{className:"text-cyan-300 font-mono select-all min-w-0 break-all sm:break-normal",children:a}),(0,b.jsx)("button",{type:"button",onClick:f,"aria-label":d?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1c1c1f] transition-colors",children:d?(0,b.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,b.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,b.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,b.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}a.s(["EmptyState",0,g,"NodesEmptyState",0,function({hint:a,taskHistoryCount:c=0}){return a?.global_count?(0,b.jsx)(h,{children:(0,b.jsx)(g,{variant:"nodes",title:"No agents in this network",sub:`Server has ${a.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):c>0?(0,b.jsx)(h,{children:(0,b.jsx)(g,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${c.toLocaleString()} task${1===c?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,b.jsx)(h,{children:(0,b.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,b.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,b.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,b.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,b.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,b.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,b.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,b.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,b.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,b.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,b.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,b.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,b.jsx)("div",{className:"mt-4 inline-block",children:(0,b.jsx)(i,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,b.jsx)("p",{className:"text-gray-600 text-xs mt-3 max-w-md mx-auto",children:"Once the agent connects, it appears here automatically within a few seconds — no refresh needed."}),(0,b.jsx)("div",{className:"mt-3",children:(0,b.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,b.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},81505,a=>{"use strict";var b=a.i(80704),c=a.i(33617);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}},"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,keepPreviousData:!0});return{messages:h?.messages||[],error:i,isLoading:j}},"useNodeLifecycle",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/nodes",a),d,e),i={},j={};for(let a of g?.nodes??[])a.alias&&"string"==typeof a.lifecycle_state&&(i[a.alias]=a.lifecycle_state),a.alias&&"string"==typeof a.node_id&&(j[a.alias]=a.node_id);return{lifecycleByAlias:i,nodeIdByAlias:j,error:h}},"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}}])},70219,a=>{"use strict";a.s(["DASHBOARD_VERSION",0,"0.6.3-preview.22"],70219)},17530,a=>{"use strict";var b=a.i(91339),c=a.i(91921),d=a.i(80704);function e(){let{data:a}=(0,d.default)("/api/anet/node-lifecycle",a=>fetch(a).then(a=>a.json()),{revalidateOnFocus:!1,dedupingInterval:6e4,shouldRetryOnError:!1});return a?.ok&&a.tools?a.tools:null}async function f(a,b){try{let c=await fetch("/api/anet/node-lifecycle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,...b})});return{...await c.json().catch(()=>({})),httpStatus:c.status}}catch(a){return{ok:!1,error:"network_error",message:a instanceof Error?a.message:String(a),httpStatus:0}}}function g({alias:a,nodeId:d,networkId:e,onClose:h,onCompleted:i}){let[j,k]=(0,c.useState)(!1),[l,m]=(0,c.useState)(!1),[n,o]=(0,c.useState)(null);(0,c.useEffect)(()=>{let a=a=>{"Escape"!==a.key||j||h()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[h,j]);let p=n&&"number"==typeof n.in_flight_count?n.in_flight_count:0,q=async()=>{k(!0),o(null);let a=await f("stop",{node_id:d,...e?{network_id:e}:{},...l?{force:!0}:{}});(k(!1),a.ok)?i():o(a)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:j?void 0:h,"aria-hidden":!0}),(0,b.jsxs)("div",{role:"dialog","aria-label":`停止节点 ${a}`,className:"fixed left-1/2 top-1/2 z-50 w-[min(92vw,420px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-[#26262b] bg-[#161618] shadow-2xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[#26262b] px-4 py-3",children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-white",children:"停止节点"}),(0,b.jsx)("button",{onClick:j?void 0:h,"aria-label":"关闭",className:"text-gray-500 hover:text-white",children:"×"})]}),(0,b.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,b.jsxs)("div",{className:"text-sm text-gray-300",children:["将停止 ",(0,b.jsx)("span",{className:"font-mono text-cyan-300",children:a})," 子进程(SIGTERM,~10s 内)。配置目录保留,可通过「启动」恢复。"]}),n&&!1===n.ok&&(0,b.jsxs)("div",{className:"rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200",children:[(0,b.jsx)("div",{className:"font-semibold",children:n.error}),n.message?(0,b.jsx)("div",{className:"mt-0.5 text-red-300/80",children:n.message}):null,"number"==typeof n.in_flight_count&&(0,b.jsxs)("div",{className:"mt-0.5 text-red-300/80",children:["当前 in-flight 任务: ",n.in_flight_count]}),n.hint?(0,b.jsx)("div",{className:"mt-1 text-red-300/60",children:n.hint}):null]}),(p>0||l)&&(0,b.jsxs)("label",{className:"flex items-start gap-2 rounded-md border border-amber-700/40 bg-amber-900/10 px-3 py-2 text-xs text-amber-200",children:[(0,b.jsx)("input",{type:"checkbox",checked:l,onChange:a=>m(a.target.checked),className:"mt-0.5"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-semibold text-amber-300",children:"强制停止"}),p>0?`(会丢弃 ${p} 条待处理任务)`:"(覆盖 in-flight 拒绝;hub 会写 audit 行)"]})]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[#26262b] px-4 py-3",children:[(0,b.jsx)("button",{type:"button",disabled:j,onClick:h,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 disabled:opacity-50",children:"取消"}),(0,b.jsx)("button",{type:"button",disabled:j||p>0&&!l,onClick:q,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",children:j?"停止中…":"确认停止"})]})]})]})}function h({alias:a,nodeId:d,networkId:e,onClose:g,onCompleted:i}){let[j,k]=(0,c.useState)(!1),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null);(0,c.useEffect)(()=>{let a=a=>{"Escape"!==a.key||j||g()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[g,j]);let t=r&&"number"==typeof r.in_flight_count?r.in_flight_count:0,u=l===a,v=async()=>{if(!u)return;k(!0),s(null);let a=await f("delete",{node_id:d,confirm_alias:l,...e?{network_id:e}:{},...n?{force:!0}:{},...p?{delete_config:!1}:{}});(k(!1),a.ok)?i():s(a)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:j?void 0:g,"aria-hidden":!0}),(0,b.jsxs)("div",{role:"dialog","aria-label":`删除节点 ${a}`,className:"fixed left-1/2 top-1/2 z-50 w-[min(94vw,480px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-red-700/40 bg-[#161618] shadow-2xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[#26262b] px-4 py-3",children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-red-300",children:"删除节点"}),(0,b.jsx)("button",{onClick:j?void 0:g,"aria-label":"关闭",className:"text-gray-500 hover:text-white",children:"×"})]}),(0,b.jsxs)("div",{className:"space-y-3 px-4 py-4 text-sm text-gray-300",children:[(0,b.jsx)("div",{children:"这将:"}),(0,b.jsxs)("ul",{className:"list-inside list-disc space-y-1 pl-2 text-xs text-gray-400",children:[(0,b.jsxs)("li",{children:["停止 ",(0,b.jsx)("span",{className:"font-mono text-cyan-300",children:a})," 子进程(SIGTERM ~10s)"]}),(0,b.jsx)("li",{children:"从 hub 注销该节点"}),(0,b.jsx)("li",{children:"撤销该节点的 ntok"}),!p&&(0,b.jsxs)("li",{children:["配置文件备份到 ",(0,b.jsxs)("code",{className:"text-amber-300",children:["~/.anet/deleted/<ts>-",a,"/"]}),"(30 天后自动清除)"]}),p&&(0,b.jsx)("li",{className:"text-amber-300",children:"配置文件保留原地(不备份不清理 — 你勾选了「保留配置」)"})]}),r&&!1===r.ok&&(0,b.jsxs)("div",{className:"rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200",children:[(0,b.jsx)("div",{className:"font-semibold",children:r.error}),r.message?(0,b.jsx)("div",{className:"mt-0.5 text-red-300/80",children:r.message}):null,"number"==typeof r.in_flight_count&&(0,b.jsxs)("div",{className:"mt-0.5 text-red-300/80",children:["当前 in-flight 任务: ",r.in_flight_count]}),r.hint?(0,b.jsx)("div",{className:"mt-1 text-red-300/60",children:r.hint}):null]}),(t>0||n)&&(0,b.jsxs)("label",{className:"flex items-start gap-2 rounded-md border border-amber-700/40 bg-amber-900/10 px-3 py-2 text-xs text-amber-200",children:[(0,b.jsx)("input",{type:"checkbox",checked:n,onChange:a=>o(a.target.checked),className:"mt-0.5"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-semibold text-amber-300",children:"强制删除"}),t>0?`(会丢弃 ${t} 条待处理任务)`:"(覆盖 in-flight 拒绝)"]})]}),(0,b.jsxs)("label",{className:"flex items-center gap-2 text-xs text-gray-400",children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked)}),"保留配置目录(不备份;高级用法)"]}),(0,b.jsxs)("label",{className:"block space-y-1",children:[(0,b.jsxs)("span",{className:"text-xs text-gray-400",children:["输入节点名字 ",(0,b.jsx)("span",{className:"font-mono text-cyan-300",children:a})," 确认"]}),(0,b.jsx)("input",{autoFocus:!0,value:l,onChange:a=>m(a.target.value),placeholder:a,className:"w-full rounded-md border border-[#26262b] bg-[#0e0e10] px-3 py-2 text-sm text-gray-200 focus:border-red-500 focus:outline-none",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1}),l&&!u&&(0,b.jsx)("span",{className:"text-[11px] text-red-400",children:"名字不匹配(区分大小写)"})]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[#26262b] px-4 py-3",children:[(0,b.jsx)("button",{type:"button",disabled:j,onClick:g,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 disabled:opacity-50",children:"取消"}),(0,b.jsx)("button",{type:"button",disabled:j||!u||t>0&&!n,onClick:v,className:"rounded-md bg-red-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-red-500 disabled:cursor-not-allowed disabled:opacity-50",children:j?"删除中…":`删除 ${a}`})]})]})]})}a.s(["NodeLifecycleMenu",0,function({nodeId:a,alias:d,lifecycleState:i,networkId:j,onCompleted:k}){let l=e(),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!m)return;let a=a=>{w.current&&!w.current.contains(a.target)&&n(!1)},b=a=>{"Escape"===a.key&&n(!1)};return document.addEventListener("mousedown",a),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",b)}},[m]);let x=(0,c.useCallback)(async()=>{n(!1),v(null),t(!0);let b=await f("restart",{node_id:a,...j?{network_id:j}:{}});(t(!1),b.ok)?k?.():v(b)},[a,j,k]),y="string"==typeof i&&i.length>0?i:"active",z=[];return"stopping"===y||"deleting"===y?z.push({label:"stopping"===y?"停止中…":"删除中…",key:"loading",disabled:!0,onClick:()=>{}}):"active"===y?(z.push({label:s?"重启中…":"重启节点",key:"restart",disabled:s,onClick:x}),(null===l||l.stop)&&z.push({label:"停止节点",key:"stop",onClick:()=>{n(!1),p(!0)}}),(null===l||l.delete)&&z.push({label:"删除节点",key:"delete",danger:!0,onClick:()=>{n(!1),r(!0)}})):"stopped"===y||"stop_failed"===y?(z.push({label:s?"启动中…":"启动节点",key:"restart",disabled:s,onClick:x}),z.push({label:"删除节点",key:"delete",danger:!0,onClick:()=>{n(!1),r(!0)}})):z.push({label:`状态 ${y} (不识别)`,key:"unknown",disabled:!0,onClick:()=>{}}),(0,b.jsxs)("div",{ref:w,className:"relative inline-block",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("button",{type:"button","aria-label":`节点 ${d} 生命周期操作`,"aria-haspopup":"menu","aria-expanded":m,onClick:()=>n(a=>!a),className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-gray-400 hover:bg-white/5 hover:text-white focus:outline-none focus:ring-1 focus:ring-cyan-500/50",children:(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[(0,b.jsx)("circle",{cx:"12",cy:"5",r:"1.6"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"1.6"}),(0,b.jsx)("circle",{cx:"12",cy:"19",r:"1.6"})]})}),m&&(0,b.jsx)("div",{role:"menu",className:"absolute right-0 z-40 mt-1 w-44 overflow-hidden rounded-md border border-[#26262b] bg-[#161618] shadow-xl",children:z.map(a=>(0,b.jsx)("button",{type:"button",role:"menuitem",disabled:a.disabled,onClick:a.onClick,className:`block w-full px-3 py-2 text-left text-sm transition-colors ${a.disabled?"text-gray-600 cursor-not-allowed":a.danger?"text-red-300 hover:bg-red-900/20":"text-gray-200 hover:bg-white/5"}`,children:a.label},a.key))}),u&&!1===u.ok&&!o&&!q&&(0,b.jsx)("div",{className:"absolute right-0 z-40 mt-1 w-72 rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200",children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"font-semibold",children:u.error||"error"}),u.message?(0,b.jsx)("div",{className:"mt-0.5 text-red-300/80",children:u.message}):null,"number"==typeof u.in_flight_count&&(0,b.jsxs)("div",{className:"mt-0.5 text-red-300/80",children:["in-flight: ",u.in_flight_count]}),u.hint?(0,b.jsx)("div",{className:"mt-1 text-red-300/60",children:u.hint}):null]}),(0,b.jsx)("button",{type:"button",onClick:()=>v(null),className:"shrink-0 text-red-400 hover:text-red-200","aria-label":"关闭",children:"×"})]})}),o&&(0,b.jsx)(g,{alias:d,nodeId:a,networkId:j,onClose:()=>p(!1),onCompleted:()=>{p(!1),k?.()}}),q&&(0,b.jsx)(h,{alias:d,nodeId:a,networkId:j,onClose:()=>r(!1),onCompleted:()=>{r(!1),k?.()}})]})},"useLifecycleCaps",0,e])},35558,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0zg~_pinyin-pro_dist_index_mjs_0fj60.q._.js"].map(b=>a.l(b))).then(()=>b(40498)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0-tk.iv._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../dash-loop-wt/app/components/utils.ts","../../../../../dash-loop-wt/app/components/AliasAvatar.tsx","../../../../../dash-loop-wt/app/lib/avatars.ts","../../../../../dash-loop-wt/app/components/EmptyState.tsx","../../../../../dash-loop-wt/app/lib/hooks.ts","../../../../../dash-loop-wt/package.json.%5Bjson%5D.mjs","../../../../../dash-loop-wt/app/lib/version.ts","../../../../../dash-loop-wt/app/components/NodeLifecycleMenu.tsx"],"sourcesContent":["/** Round 82: strip the most common markdown markup from agent-to-agent\n * task / message bodies so single-line table previews read cleanly.\n * Full original content stays in the expanded row / drawer / title=. */\nexport function previewContent(raw: string | null | undefined): string {\n if (!raw) return '--';\n return raw\n .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1') // images:  → alt\n .replace(/\\[([^\\]]+)\\]\\([^)]*\\)/g, '$1') // links: [text](href) → text\n .replace(/`([^`]+)`/g, '$1') // inline code: `x` → x\n .replace(/\\s+/g, ' ') // collapse whitespace\n .trim() || '--';\n}\n\n// Round 44 / Loop: timeAgo now delegates to the shared lib/time helper.\n// The old in-line `replace + 'Z'` parse appended a Z to already-ISO\n// inputs (producing \"…ZZ\", browser-fragile) — strict-superset semantics\n// preserved for SQL-style inputs, fixed for ISO. Plus a 'just now' fallback\n// when clock skew puts the timestamp in the future. Five callers benefit:\n// /admin · /logs · /settings/networks · InboxPanel · /messages.\nimport { relativeAgo } from '../lib/time';\nexport function timeAgo(dateStr: string): string {\n return relativeAgo(dateStr) ?? '--';\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n","'use client';\n\nimport { useEffect, useState } from 'react';\nimport { useAvatarUrl } from '../lib/avatars';\n\n/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\nfunction isGrokAlias(alias: string) {\n return /\\bgrok\\b|grok-build|grok测试员|grok-demo/i.test(alias);\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n // R24 (Vincent: 头像换血): a custom image (user-set or designed default)\n // wins over every generated style — ONE seam, all 13 avatar surfaces.\n // Shimmer while loading, silent fallback to the pill on error.\n const url = useAvatarUrl(alias);\n const [imgState, setImgState] = useState<'loading' | 'ready' | 'error'>('loading');\n useEffect(() => { setImgState('loading'); }, [url]);\n if (url && imgState !== 'error') {\n return (\n <span\n className={`anet-alias-avatar relative inline-flex shrink-0 overflow-hidden rounded-full border border-[var(--border)] ${imgState === 'loading' ? 'animate-pulse bg-[var(--bg-elevated)]' : ''} ${className}`}\n style={{ width: size, height: size }}\n title={alias}\n aria-hidden\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={url}\n alt=\"\"\n loading=\"lazy\"\n onLoad={() => setImgState('ready')}\n onError={() => setImgState('error')}\n className={`h-full w-full rounded-full object-cover transition-opacity duration-150 ${imgState === 'ready' ? 'opacity-100' : 'opacity-0'}`}\n />\n </span>\n );\n }\n if (isGrokAlias(alias)) {\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${className}`}\n style={{\n width: size,\n height: size,\n backgroundImage: 'url(/vendors/grok.svg)',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '68% 68%',\n }}\n title={alias}\n aria-hidden\n />\n );\n }\n\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n","'use client';\n\nimport { useSyncExternalStore } from 'react';\n\n/* Loop R24 (Vincent 亲点: 头像换血) — custom avatar infrastructure.\n *\n * Resolution order, per alias:\n * 1. user override — localStorage map, settable in the node settings UI\n * 2. designed default — /avatars/manifest.json (static, alias → image URL);\n * the design-side illustration set lands there later with ZERO code\n * change (drop files under public/avatars/ + list them in the manifest)\n * 3. '' → caller falls back to the hue-hashed initial pill\n *\n * Hub-side persistence (cross-device) needs an RFC-024 whitelist extension\n * (`avatar_url` is not an editable flag today — update would return\n * invalid_patch); when the hub grows it, hydrate the store from the hub here\n * without touching any consumer.\n */\n\nconst STORE_KEY = 'anet_avatars_v1';\nconst AVATAR_EVENT = 'anet-avatars-updated';\n\nlet manifest: Record<string, string> | null = null;\nlet manifestRequested = false;\n\nfunction fetchManifestOnce() {\n if (manifestRequested || typeof window === 'undefined') return;\n manifestRequested = true;\n fetch('/avatars/manifest.json', { cache: 'no-cache' })\n .then((r) => (r.ok ? r.json() : null))\n .then((j) => {\n if (j && typeof j === 'object') {\n manifest = j as Record<string, string>;\n window.dispatchEvent(new Event(AVATAR_EVENT));\n }\n })\n .catch(() => {});\n}\n\nfunction readMap(): Record<string, string> {\n if (typeof window === 'undefined') return {};\n try {\n const parsed = JSON.parse(window.localStorage.getItem(STORE_KEY) || '{}');\n return parsed && typeof parsed === 'object' ? parsed : {};\n } catch {\n return {};\n }\n}\n\nexport function getAvatarUrl(alias?: string | null): string {\n if (!alias) return '';\n return readMap()[alias] || manifest?.[alias] || '';\n}\n\n/** Empty/whitespace url removes the override (falls back to manifest/pill). */\nexport function setAvatarUrl(alias: string, url: string) {\n if (typeof window === 'undefined' || !alias) return;\n try {\n const m = readMap();\n if (url.trim()) m[alias] = url.trim();\n else delete m[alias];\n window.localStorage.setItem(STORE_KEY, JSON.stringify(m));\n window.dispatchEvent(new Event(AVATAR_EVENT));\n } catch {}\n}\n\nfunction subscribe(callback: () => void) {\n fetchManifestOnce();\n window.addEventListener(AVATAR_EVENT, callback);\n window.addEventListener('storage', callback);\n return () => {\n window.removeEventListener(AVATAR_EVENT, callback);\n window.removeEventListener('storage', callback);\n };\n}\n\nexport function useAvatarUrl(alias?: string | null): string {\n return useSyncExternalStore(subscribe, () => getAvatarUrl(alias), () => '');\n}\n","'use client';\n\nimport { useState } from 'react';\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <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\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <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\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/** Round 105 (issue #90): centered card shell so the Overview empty state\n * reads as an intentional, layout-aligned card instead of bare text\n * floating in the content column. */\nfunction EmptyCard({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"max-w-2xl mx-auto rounded-xl border border-[#26262b] bg-[#161618] shadow-lg shadow-black/20\">\n {children}\n </div>\n );\n}\n\n/**\n * Overview-specific variant. Three cases:\n * 1. network-mismatch — agents exist globally, none in this network\n * 2. agents-offline — 0 registered now BUT task history exists, so this\n * is NOT a first run (round 105 / issue #90: showing \"Spin up your\n * first agent\" next to \"acked: 499\" was misleading)\n * 3. true first-run — 0 agents, 0 history → quickstart command\n */\nexport function NodesEmptyState({\n hint,\n taskHistoryCount = 0,\n}: {\n hint?: { global_count?: number; filtered_network?: string };\n taskHistoryCount?: number;\n}) {\n if (hint?.global_count) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n </EmptyCard>\n );\n }\n\n // Round 105 (issue #90): there's task history but no agents online right\n // now — they finished or disconnected. Don't pitch a first-run setup;\n // point at the history instead.\n if (taskHistoryCount > 0) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents online\"\n sub={`Every agent in this network is currently offline. ${taskHistoryCount.toLocaleString()} task${taskHistoryCount === 1 ? '' : 's'} in history — they may have finished their work or disconnected.`}\n cta={{ label: 'View task history', href: '/tasks' }}\n />\n </EmptyCard>\n );\n }\n\n // Round 52: true empty state (zero agents anywhere) — show the\n // quickstart command inline so users don't have to leave the dashboard\n // to figure out how to spin up their first agent.\n return (\n <EmptyCard>\n <div className=\"text-center py-16 px-4\" role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <svg viewBox=\"0 0 64 64\" width={56} height={56}>\n <g stroke=\"currentColor\" strokeWidth=\"1.5\" fill=\"none\">\n <rect x=\"10\" y=\"20\" width=\"44\" height=\"28\" rx=\"2\" />\n <rect x=\"20\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"32\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"44\" y=\"32\" width=\"4\" height=\"8\" opacity=\"0.5\" />\n <line x1=\"10\" y1=\"26\" x2=\"54\" y2=\"26\" opacity=\"0.4\" />\n <circle cx=\"14\" cy=\"23\" r=\"0.8\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <h3 className=\"font-medium text-gray-300 text-base\">Spin up your first agent</h3>\n <p className=\"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed\">\n Run this in a fresh terminal to register an agent with this CommHub:\n </p>\n <div className=\"mt-4 inline-block\">\n <QuickstartCommand cmd=\"npx --yes @sleep2agi/agent-network init\" />\n </div>\n {/* #214 F6: expectation management — without this line, users\n copy the command and stare at an empty screen not knowing\n what to wait for. The page polls every 5s, so the node\n really does appear by itself. */}\n <p className=\"text-gray-600 text-xs mt-3 max-w-md mx-auto\">\n Once the agent connects, it appears here automatically within a\n few seconds — no refresh needed.\n </p>\n <div className=\"mt-3\">\n <a\n href=\"https://anet.sh\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300\"\n >\n Full quickstart guide\n <span aria-hidden>→</span>\n </a>\n </div>\n </div>\n </EmptyCard>\n );\n}\n\n/** Code block + inline copy button used by the empty-Overview first-run\n * CTA. State lives here so the parent stays stateless. */\nfunction QuickstartCommand({ cmd }: { cmd: string }) {\n const [copied, setCopied] = useState(false);\n const onCopy = async () => {\n try {\n await navigator.clipboard.writeText(cmd);\n setCopied(true);\n setTimeout(() => setCopied(false), 1800);\n } catch {}\n };\n return (\n <div className=\"anet-empty-cmd flex items-start sm:items-center gap-2 bg-[#0e0e10] border border-[#26262b] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm\">\n {/* #209 R44: long quickstart commands (e.g. the `npm install -g …`\n variant) overflowed the empty-state card horizontally on phones\n because <code> defaults to white-space:pre. break-all on mobile\n lets them wrap inside the box; sm: up restores normal wrapping\n so desktop monospace lines stay clean. items-start on phones\n aligns the Copy button to the top so a wrapped 2-line command\n doesn't bottom-anchor the button. */}\n <code className=\"text-cyan-300 font-mono select-all min-w-0 break-all sm:break-normal\">{cmd}</code>\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={copied ? 'Copied' : 'Copy command'}\n className=\"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1c1c1f] transition-colors\"\n >\n {copied ? (\n <span className=\"flex items-center gap-1 text-green-400\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n Copied\n </span>\n ) : (\n <span className=\"flex items-center gap-1\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n Copy\n </span>\n )}\n </button>\n </div>\n );\n}\n","import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\n// RFC-027 PR2 — alias → lifecycle_state map sourced from /api/nodes\n// (commhub-server preview.12+). /api/status reads from `sessions` which\n// doesn't carry lifecycle_state; /api/nodes does. Cheap secondary\n// fetch, same SWR cadence as useSessions; merged client-side by alias.\n// Absent alias → caller defaults to 'active'.\ninterface NodesResp { nodes?: Array<{ alias?: string; node_id?: string; lifecycle_state?: string | null }>; }\nexport function useNodeLifecycle() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR<NodesResp>(\n withNetwork('/api/hub/nodes', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n const lifecycleByAlias: Record<string, string> = {};\n const nodeIdByAlias: Record<string, string> = {};\n for (const n of data?.nodes ?? []) {\n if (n.alias && typeof n.lifecycle_state === 'string') lifecycleByAlias[n.alias] = n.lifecycle_state;\n if (n.alias && typeof n.node_id === 'string') nodeIdByAlias[n.alias] = n.node_id;\n }\n return { lifecycleByAlias, nodeIdByAlias, error };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n // keepPreviousData: /messages grows `limit` when the user asks for older\n // history (#217 M5) — without it the key change would blank the list and\n // flash the skeleton while the bigger page is in flight.\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n { ...SWR_OPTIONS, keepPreviousData: true },\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n","\"use turbopack no side effects\";\nexport default {\"name\":\"@sleep2agi/agent-network-dashboard\",\"version\":\"0.6.3-preview.22\",\"description\":\"Agent Network Dashboard — Web UI for managing AI Agent networks\",\"main\":\"apps/desktop/electron/main.cjs\",\"scripts\":{\"dev\":\"next dev\",\"build\":\"next build\",\"postbuild\":\"node scripts/stamp-build-commit.mjs\",\"start\":\"next start\",\"lint\":\"eslint\",\"app:android:init\":\"npx cap add android\",\"app:android:sync\":\"npx cap sync android\",\"app:android:open\":\"npx cap open android\",\"app:ios:init\":\"npx cap add ios\",\"app:ios:sync\":\"npx cap sync ios\",\"app:ios:open\":\"npx cap open ios\",\"app:desktop\":\"electron apps/desktop/electron/main.cjs\",\"app:desktop:pack\":\"electron-builder --config electron-builder.json\",\"prepublishOnly\":\"[ -f .next/BUILD_ID ] || (echo 'prepublishOnly: .next/BUILD_ID missing — run npm run build first (see commit 05c1ebf body for R224 chunk-500 root cause)' >&2 && exit 1)\"},\"bin\":{\"agent-network-dashboard\":\"./bin/start.js\"},\"homepage\":\"https://anet.sh\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/sleep2agi/agent-network-dashboard\"},\"bugs\":{\"url\":\"https://github.com/sleep2agi/agent-network-dashboard/issues\"},\"author\":\"sleep2agi\",\"license\":\"Apache-2.0\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@capacitor/core\":\"^7.4.4\",\"next\":\"16.2.3\",\"pinyin-pro\":\"^3.28.1\",\"react\":\"19.2.4\",\"react-dom\":\"19.2.4\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"swr\":\"^2.4.1\"},\"devDependencies\":{\"@capacitor/android\":\"^7.4.4\",\"@capacitor/cli\":\"^7.4.4\",\"@capacitor/ios\":\"^7.4.4\",\"@playwright/test\":\"^1.59.1\",\"@tailwindcss/postcss\":\"^4\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"electron\":\"^39.2.6\",\"electron-builder\":\"^26.0.12\",\"eslint\":\"^9\",\"eslint-config-next\":\"16.2.3\",\"tailwindcss\":\"^4\",\"typescript\":\"^5\"}};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cmJvcGFjazovLy9kYXNoLWxvb3Atd3QvcGFja2FnZS5qc29uIl0sInNvdXJjZXNDb250ZW50IjpbIntcIm5hbWVcIjpcIkBzbGVlcDJhZ2kvYWdlbnQtbmV0d29yay1kYXNoYm9hcmRcIixcInZlcnNpb25cIjpcIjAuNi4zLXByZXZpZXcuMjJcIixcImRlc2NyaXB0aW9uXCI6XCJBZ2VudCBOZXR3b3JrIERhc2hib2FyZCDigJQgV2ViIFVJIGZvciBtYW5hZ2luZyBBSSBBZ2VudCBuZXR3b3Jrc1wiLFwibWFpblwiOlwiYXBwcy9kZXNrdG9wL2VsZWN0cm9uL21haW4uY2pzXCIsXC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LWJ1aWxkZXJcIjpcIl4yNi4wLjEyXCIsXCJlc2xpbnRcIjpcIl45XCIsXCJlc2xpbnQtY29uZmlnLW5leHRcIjpcIjE2LjIuM1wiLFwidGFpbHdpbmRjc3NcIjpcIl40XCIsXCJ0eXBlc2NyaXB0XCI6XCJeNVwifX0iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==","/** Dashboard package version sourced from package.json at build time.\n * Importing JSON requires `resolveJsonModule: true` in tsconfig, which\n * Next sets by default. Bumping is automated by the publish flow, so this\n * surfaces the real preview number in Settings → Dashboard. */\nimport pkg from '../../package.json' assert { type: 'json' };\n\nexport const DASHBOARD_VERSION: string = pkg.version;\n","'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport useSWR from 'swr';\n\n// RFC-027 PR2 — per-node ⋮ lifecycle menu + stop/delete modals.\n//\n// State-aware menu items (RFC-027 §3.1 table):\n// active → 重启 / 停止 / 删除\n// stopping/deleting → loading (all disabled,菜单 surfaces \"请稍候\")\n// stopped → 启动 / 删除 (停止 灰掉 — already stopped)\n// stop_failed → 启动 / 删除 (warn — operator should investigate)\n//\n// Stop modal: low-friction confirm (RFC-027 §3.3)\n// Delete modal: alias-input confirm + force-on-in-flight checkbox\n// (RFC-027 §3.2; mirrors hub's confirm_alias gate + force semantics).\n//\n// Error propagation per 通信龙 PR2 requirement: structured payloads\n// from hub (node_not_active / cannot_delete_daemon_via_delete_node /\n// node_busy_in_flight / confirm_alias_mismatch / forbidden_cross_tenant)\n// land in `lastError` with their real fields surfaced in the UI — no\n// generic \"操作失败\".\n//\n// React rules-of-hooks: all hooks declared BEFORE early returns.\n\nexport type LifecycleState =\n | 'active'\n | 'stopping'\n | 'stopped'\n | 'stop_failed'\n | 'deleting'\n | string; // forward-compat for unknown server values\n\nexport interface NodeLifecycleMenuProps {\n nodeId: string;\n alias: string;\n lifecycleState: LifecycleState | null | undefined;\n networkId?: string | null;\n /** Called when a lifecycle op completes successfully (caller refreshes nodes list). */\n onCompleted?: () => void;\n}\n\ntype LifecycleAction = 'restart' | 'stop' | 'delete';\n\ntype ApiReply = {\n ok?: boolean;\n error?: string;\n message?: string;\n in_flight_count?: number;\n hint?: string;\n lifecycle_state?: string;\n unconfirmed?: boolean;\n [k: string]: unknown;\n};\n\nconst normalizeState = (s: LifecycleState | null | undefined): LifecycleState =>\n (typeof s === 'string' && s.length > 0 ? s : 'active');\n\n/** Lifecycle capability probe (usability-audit rule: no dead buttons).\n * GET /api/anet/node-lifecycle reports which hub tools actually exist —\n * hubs behind the canonical train lack rename/stop/delete. SWR dedupes the\n * probe across every menu instance on /nodes (one fetch, 60s server cache).\n * `null` = unknown (loading / probe failed): callers keep today's behavior\n * for known-live actions (restart) and stay conservative for new ones. */\nexport function useLifecycleCaps(): Record<string, boolean> | null {\n const { data } = useSWR<{ ok: boolean; tools?: Record<string, boolean> }>(\n '/api/anet/node-lifecycle',\n (url: string) => fetch(url).then(r => r.json()),\n { revalidateOnFocus: false, dedupingInterval: 60_000, shouldRetryOnError: false },\n );\n return data?.ok && data.tools ? data.tools : null;\n}\n\nasync function callLifecycle(\n action: LifecycleAction,\n body: Record<string, unknown>,\n): Promise<ApiReply & { httpStatus: number }> {\n try {\n const r = await fetch('/api/anet/node-lifecycle', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ action, ...body }),\n });\n const data = (await r.json().catch(() => ({}))) as ApiReply;\n return { ...data, httpStatus: r.status };\n } catch (e: unknown) {\n return {\n ok: false,\n error: 'network_error',\n message: e instanceof Error ? e.message : String(e),\n httpStatus: 0,\n };\n }\n}\n\nexport function NodeLifecycleMenu({\n nodeId,\n alias,\n lifecycleState,\n networkId,\n onCompleted,\n}: NodeLifecycleMenuProps) {\n // All hooks above any early return (avoid hooks-order regression that\n // bit the mobile app at v0.1.29; 通信龙 explicit call-out for PR2).\n const caps = useLifecycleCaps();\n const [menuOpen, setMenuOpen] = useState(false);\n const [stopModal, setStopModal] = useState(false);\n const [deleteModal, setDeleteModal] = useState(false);\n const [restartBusy, setRestartBusy] = useState(false);\n const [lastError, setLastError] = useState<ApiReply | null>(null);\n const menuRef = useRef<HTMLDivElement | null>(null);\n\n // Outside-click + Escape close the menu (focus management).\n useEffect(() => {\n if (!menuOpen) return;\n const onDoc = (e: MouseEvent) => {\n if (menuRef.current && !menuRef.current.contains(e.target as Node)) setMenuOpen(false);\n };\n const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') setMenuOpen(false); };\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [menuOpen]);\n\n const onRestart = useCallback(async () => {\n setMenuOpen(false);\n setLastError(null);\n setRestartBusy(true);\n const r = await callLifecycle('restart', {\n node_id: nodeId,\n ...(networkId ? { network_id: networkId } : {}),\n });\n setRestartBusy(false);\n if (r.ok) {\n onCompleted?.();\n return;\n }\n setLastError(r);\n }, [nodeId, networkId, onCompleted]);\n\n const state = normalizeState(lifecycleState);\n const isLoading = state === 'stopping' || state === 'deleting';\n const isActive = state === 'active';\n const isStopped = state === 'stopped' || state === 'stop_failed';\n\n // Menu items per RFC-027 §3.1 table.\n const items: Array<{ label: string; key: string; danger?: boolean; onClick: () => void; disabled?: boolean }> = [];\n if (isLoading) {\n items.push({\n label: state === 'stopping' ? '停止中…' : '删除中…',\n key: 'loading', disabled: true, onClick: () => {},\n });\n } else if (isActive) {\n items.push({ label: restartBusy ? '重启中…' : '重启节点', key: 'restart', disabled: restartBusy, onClick: onRestart });\n // Usability-audit gating: hide stop/delete when the hub confirms the\n // tool doesn't exist (older hubs) — a visible control must work.\n if (caps === null || caps.stop) items.push({ label: '停止节点', key: 'stop', onClick: () => { setMenuOpen(false); setStopModal(true); } });\n if (caps === null || caps.delete) items.push({ label: '删除节点', key: 'delete', danger: true, onClick: () => { setMenuOpen(false); setDeleteModal(true); } });\n } else if (isStopped) {\n // stopped + stop_failed: \"启动\" = restart_node (hub resets lifecycle_state→active on success per PR1.2a)\n items.push({ label: restartBusy ? '启动中…' : '启动节点', key: 'restart', disabled: restartBusy, onClick: onRestart });\n items.push({ label: '删除节点', key: 'delete', danger: true, onClick: () => { setMenuOpen(false); setDeleteModal(true); } });\n } else {\n // Unknown state — surface read-only badge, no destructive action.\n items.push({\n label: `状态 ${state} (不识别)`,\n key: 'unknown', disabled: true, onClick: () => {},\n });\n }\n\n return (\n <div ref={menuRef} className=\"relative inline-block\" onClick={e => e.stopPropagation()}>\n <button\n type=\"button\"\n aria-label={`节点 ${alias} 生命周期操作`}\n aria-haspopup=\"menu\"\n aria-expanded={menuOpen}\n onClick={() => setMenuOpen(v => !v)}\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md text-gray-400 hover:bg-white/5 hover:text-white focus:outline-none focus:ring-1 focus:ring-cyan-500/50\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <circle cx=\"12\" cy=\"5\" r=\"1.6\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.6\" />\n <circle cx=\"12\" cy=\"19\" r=\"1.6\" />\n </svg>\n </button>\n {menuOpen && (\n <div role=\"menu\" className=\"absolute right-0 z-40 mt-1 w-44 overflow-hidden rounded-md border border-[#26262b] bg-[#161618] shadow-xl\">\n {items.map(item => (\n <button\n key={item.key}\n type=\"button\"\n role=\"menuitem\"\n disabled={item.disabled}\n onClick={item.onClick}\n className={`block w-full px-3 py-2 text-left text-sm transition-colors ${\n item.disabled\n ? 'text-gray-600 cursor-not-allowed'\n : item.danger\n ? 'text-red-300 hover:bg-red-900/20'\n : 'text-gray-200 hover:bg-white/5'\n }`}\n >\n {item.label}\n </button>\n ))}\n </div>\n )}\n\n {/* Last error inline (under the button) — pass-through hub's structured fields */}\n {lastError && lastError.ok === false && !stopModal && !deleteModal && (\n <div className=\"absolute right-0 z-40 mt-1 w-72 rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"font-semibold\">{lastError.error || 'error'}</div>\n {lastError.message ? <div className=\"mt-0.5 text-red-300/80\">{lastError.message}</div> : null}\n {typeof lastError.in_flight_count === 'number' && (\n <div className=\"mt-0.5 text-red-300/80\">in-flight: {lastError.in_flight_count}</div>\n )}\n {lastError.hint ? <div className=\"mt-1 text-red-300/60\">{lastError.hint}</div> : null}\n </div>\n <button type=\"button\" onClick={() => setLastError(null)} className=\"shrink-0 text-red-400 hover:text-red-200\" aria-label=\"关闭\">×</button>\n </div>\n </div>\n )}\n\n {stopModal && (\n <StopNodeModal\n alias={alias}\n nodeId={nodeId}\n networkId={networkId}\n onClose={() => setStopModal(false)}\n onCompleted={() => { setStopModal(false); onCompleted?.(); }}\n />\n )}\n {deleteModal && (\n <DeleteNodeModal\n alias={alias}\n nodeId={nodeId}\n networkId={networkId}\n onClose={() => setDeleteModal(false)}\n onCompleted={() => { setDeleteModal(false); onCompleted?.(); }}\n />\n )}\n </div>\n );\n}\n\n// ──────────────────────────────────────────────────────────────────────\n\ninterface ModalProps {\n alias: string;\n nodeId: string;\n networkId?: string | null;\n onClose: () => void;\n onCompleted: () => void;\n}\n\nfunction StopNodeModal({ alias, nodeId, networkId, onClose, onCompleted }: ModalProps) {\n const [busy, setBusy] = useState(false);\n const [force, setForce] = useState(false);\n const [reply, setReply] = useState<ApiReply | null>(null);\n\n useEffect(() => {\n const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape' && !busy) onClose(); };\n window.addEventListener('keydown', onKey);\n return () => window.removeEventListener('keydown', onKey);\n }, [onClose, busy]);\n\n const inFlight = reply && typeof reply.in_flight_count === 'number' ? reply.in_flight_count : 0;\n\n const onConfirm = async () => {\n setBusy(true);\n setReply(null);\n const r = await callLifecycle('stop', {\n node_id: nodeId,\n ...(networkId ? { network_id: networkId } : {}),\n ...(force ? { force: true } : {}),\n });\n setBusy(false);\n if (r.ok) { onCompleted(); return; }\n setReply(r);\n };\n\n return (\n <>\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={busy ? undefined : onClose} aria-hidden />\n <div role=\"dialog\" aria-label={`停止节点 ${alias}`} className=\"fixed left-1/2 top-1/2 z-50 w-[min(92vw,420px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-[#26262b] bg-[#161618] shadow-2xl\">\n <div className=\"flex items-center justify-between border-b border-[#26262b] px-4 py-3\">\n <div className=\"text-sm font-semibold text-white\">停止节点</div>\n <button onClick={busy ? undefined : onClose} aria-label=\"关闭\" className=\"text-gray-500 hover:text-white\">×</button>\n </div>\n <div className=\"space-y-3 px-4 py-4\">\n <div className=\"text-sm text-gray-300\">\n 将停止 <span className=\"font-mono text-cyan-300\">{alias}</span> 子进程(SIGTERM,~10s 内)。配置目录保留,可通过「启动」恢复。\n </div>\n {/* Surface hub's structured payload field-by-field; never collapse to generic */}\n {reply && reply.ok === false && (\n <div className=\"rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200\">\n <div className=\"font-semibold\">{reply.error}</div>\n {reply.message ? <div className=\"mt-0.5 text-red-300/80\">{reply.message}</div> : null}\n {typeof reply.in_flight_count === 'number' && (\n <div className=\"mt-0.5 text-red-300/80\">\n 当前 in-flight 任务: {reply.in_flight_count}\n </div>\n )}\n {reply.hint ? <div className=\"mt-1 text-red-300/60\">{reply.hint}</div> : null}\n </div>\n )}\n {(inFlight > 0 || force) && (\n <label className=\"flex items-start gap-2 rounded-md border border-amber-700/40 bg-amber-900/10 px-3 py-2 text-xs text-amber-200\">\n <input\n type=\"checkbox\"\n checked={force}\n onChange={e => setForce(e.target.checked)}\n className=\"mt-0.5\"\n />\n <span>\n <span className=\"font-semibold text-amber-300\">强制停止</span>{inFlight > 0 ? `(会丢弃 ${inFlight} 条待处理任务)` : '(覆盖 in-flight 拒绝;hub 会写 audit 行)'}\n </span>\n </label>\n )}\n </div>\n <div className=\"flex items-center justify-end gap-2 border-t border-[#26262b] px-4 py-3\">\n <button type=\"button\" disabled={busy} onClick={onClose} className=\"rounded-md px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 disabled:opacity-50\">取消</button>\n <button\n type=\"button\"\n disabled={busy || (inFlight > 0 && !force)}\n onClick={onConfirm}\n className=\"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n {busy ? '停止中…' : '确认停止'}\n </button>\n </div>\n </div>\n </>\n );\n}\n\nfunction DeleteNodeModal({ alias, nodeId, networkId, onClose, onCompleted }: ModalProps) {\n const [busy, setBusy] = useState(false);\n const [confirmInput, setConfirmInput] = useState('');\n const [force, setForce] = useState(false);\n const [keepConfig, setKeepConfig] = useState(false);\n const [reply, setReply] = useState<ApiReply | null>(null);\n\n useEffect(() => {\n const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape' && !busy) onClose(); };\n window.addEventListener('keydown', onKey);\n return () => window.removeEventListener('keydown', onKey);\n }, [onClose, busy]);\n\n const inFlight = reply && typeof reply.in_flight_count === 'number' ? reply.in_flight_count : 0;\n const confirmValid = confirmInput === alias;\n\n const onConfirm = async () => {\n if (!confirmValid) return;\n setBusy(true);\n setReply(null);\n const r = await callLifecycle('delete', {\n node_id: nodeId,\n confirm_alias: confirmInput,\n ...(networkId ? { network_id: networkId } : {}),\n ...(force ? { force: true } : {}),\n ...(keepConfig ? { delete_config: false } : {}),\n });\n setBusy(false);\n if (r.ok) { onCompleted(); return; }\n setReply(r);\n };\n\n return (\n <>\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={busy ? undefined : onClose} aria-hidden />\n <div role=\"dialog\" aria-label={`删除节点 ${alias}`} className=\"fixed left-1/2 top-1/2 z-50 w-[min(94vw,480px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-red-700/40 bg-[#161618] shadow-2xl\">\n <div className=\"flex items-center justify-between border-b border-[#26262b] px-4 py-3\">\n <div className=\"text-sm font-semibold text-red-300\">删除节点</div>\n <button onClick={busy ? undefined : onClose} aria-label=\"关闭\" className=\"text-gray-500 hover:text-white\">×</button>\n </div>\n <div className=\"space-y-3 px-4 py-4 text-sm text-gray-300\">\n <div>这将:</div>\n <ul className=\"list-inside list-disc space-y-1 pl-2 text-xs text-gray-400\">\n <li>停止 <span className=\"font-mono text-cyan-300\">{alias}</span> 子进程(SIGTERM ~10s)</li>\n <li>从 hub 注销该节点</li>\n <li>撤销该节点的 ntok</li>\n {!keepConfig && <li>配置文件备份到 <code className=\"text-amber-300\">~/.anet/deleted/<ts>-{alias}/</code>(30 天后自动清除)</li>}\n {keepConfig && <li className=\"text-amber-300\">配置文件保留原地(不备份不清理 — 你勾选了「保留配置」)</li>}\n </ul>\n\n {/* Surface hub's structured payload field-by-field */}\n {reply && reply.ok === false && (\n <div className=\"rounded-md border border-red-700/40 bg-red-900/20 px-3 py-2 text-xs text-red-200\">\n <div className=\"font-semibold\">{reply.error}</div>\n {reply.message ? <div className=\"mt-0.5 text-red-300/80\">{reply.message}</div> : null}\n {typeof reply.in_flight_count === 'number' && (\n <div className=\"mt-0.5 text-red-300/80\">当前 in-flight 任务: {reply.in_flight_count}</div>\n )}\n {reply.hint ? <div className=\"mt-1 text-red-300/60\">{reply.hint}</div> : null}\n </div>\n )}\n\n {(inFlight > 0 || force) && (\n <label className=\"flex items-start gap-2 rounded-md border border-amber-700/40 bg-amber-900/10 px-3 py-2 text-xs text-amber-200\">\n <input\n type=\"checkbox\"\n checked={force}\n onChange={e => setForce(e.target.checked)}\n className=\"mt-0.5\"\n />\n <span>\n <span className=\"font-semibold text-amber-300\">强制删除</span>{inFlight > 0 ? `(会丢弃 ${inFlight} 条待处理任务)` : '(覆盖 in-flight 拒绝)'}\n </span>\n </label>\n )}\n\n <label className=\"flex items-center gap-2 text-xs text-gray-400\">\n <input type=\"checkbox\" checked={keepConfig} onChange={e => setKeepConfig(e.target.checked)} />\n 保留配置目录(不备份;高级用法)\n </label>\n\n <label className=\"block space-y-1\">\n <span className=\"text-xs text-gray-400\">输入节点名字 <span className=\"font-mono text-cyan-300\">{alias}</span> 确认</span>\n <input\n autoFocus\n value={confirmInput}\n onChange={e => setConfirmInput(e.target.value)}\n placeholder={alias}\n className=\"w-full rounded-md border border-[#26262b] bg-[#0e0e10] px-3 py-2 text-sm text-gray-200 focus:border-red-500 focus:outline-none\"\n autoCapitalize=\"none\"\n autoCorrect=\"off\"\n spellCheck={false}\n />\n {confirmInput && !confirmValid && (\n <span className=\"text-[11px] text-red-400\">名字不匹配(区分大小写)</span>\n )}\n </label>\n </div>\n <div className=\"flex items-center justify-end gap-2 border-t border-[#26262b] px-4 py-3\">\n <button type=\"button\" disabled={busy} onClick={onClose} className=\"rounded-md px-3 py-1.5 text-sm text-gray-400 hover:text-gray-200 disabled:opacity-50\">取消</button>\n <button\n type=\"button\"\n disabled={busy || !confirmValid || (inFlight > 0 && !force)}\n onClick={onConfirm}\n className=\"rounded-md bg-red-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-red-500 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n {busy ? '删除中…' : `删除 ${alias}`}\n </button>\n </div>\n </div>\n </>\n );\n}\n"],"names":["previewContent","raw","replace","trim","timeAgo","dateStr","statusColor","status","hasSse","STORE_KEY","AVATAR_EVENT","manifest","manifestRequested","fetchManifestOnce","readMap","getAvatarUrl","alias","setAvatarUrl","url","subscribe","callback","window","addEventListener","removeEventListener","useAvatarUrl","DEFAULTS","nodes","title","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","size","s","width","height","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","className","role","href","label","onClick","EmptyCard","children","NodesEmptyState","hint","taskHistoryCount","global_count","toLocaleString","QuickstartCommand","cmd","target","rel","copied","setCopied","onCopy","navigator","clipboard","writeText","setTimeout","type","fetcher","res","fetch","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","_hint","useNodeLifecycle","lifecycleByAlias","nodeIdByAlias","n","lifecycle_state","node_id","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","count","source","useStats","stats","ok","useMessages","keepPreviousData","normalizeState","length","useLifecycleCaps","then","revalidateOnFocus","shouldRetryOnError","tools","callLifecycle","action","body","method","headers","JSON","stringify","catch","httpStatus","e","message","String","NodeLifecycleMenu","nodeId","lifecycleState","onCompleted","caps","menuOpen","setMenuOpen","stopModal","setStopModal","deleteModal","setDeleteModal","restartBusy","setRestartBusy","lastError","setLastError","menuRef","onDoc","current","contains","onKey","key","document","onRestart","network_id","state","isActive","isStopped","items","push","disabled","stop","delete","danger","ref","stopPropagation","v","map","item","in_flight_count","StopNodeModal","onClose","DeleteNodeModal","busy","setBusy","force","setForce","reply","setReply","inFlight","onConfirm","undefined","checked","onChange","confirmInput","setConfirmInput","keepConfig","setKeepConfig","confirmValid","confirm_alias","delete_config","autoFocus","value","placeholder","autoCapitalize","autoCorrect","spellCheck"],"mappings":"4GAmBA,IAAA,EAAA,EAAA,CAAA,CAAA,+BAhBO,SAAwBC,AAAfD,CAA6C,SAC3D,AAAKC,GACEA,CADH,CAAM,AAEPC,OAFc,AAEP,CAAC,0BAA2B,MAAQ,AAC3CA,OAAO,CAAC,oBAD+D,KACrC,MAClCA,AAD2C,OACpC,CAAC,aAAc,MAAqB,AAC3CA,GAFyE,IAElE,CAAC,OAAQ,KAA2B,AAC3CC,GAFkE,CAE9D,IAAM,IACf,UAFsE,IAW/D,SAASC,AAAQC,CAAe,EACrC,MAAO,CAAA,EAAA,EAAA,WAAA,AAAW,EAACA,IAAY,IACjC,mDCpBA,EAAA,EAAA,CAAA,CAAA,OCkBA,IAAMK,EAAe,uBA8CrB,SAASS,EAAUC,CAAoB,EAIrC,OAF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