@sleep2agi/agent-network-dashboard 0.4.6-preview.10 → 0.4.6-preview.101
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/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +69 -55
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- 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 +12 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/admin.segments/_full.segment.rsc +14 -14
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +7 -7
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
- package/.next/server/app/api/hub/servers/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/hub/servers/route/build-manifest.json +9 -0
- package/.next/server/app/api/hub/servers/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/hub/servers/route.js +7 -0
- package/.next/server/app/api/hub/servers/route.js.map +5 -0
- package/.next/server/app/api/hub/servers/route.js.nft.json +1 -0
- package/.next/server/app/api/hub/servers/route_client-reference-manifest.js +3 -0
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +14 -14
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +7 -7
- 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 +14 -14
- package/.next/server/app/login.segments/_full.segment.rsc +14 -14
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +7 -7
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/login.segments/login.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/messages.segments/_full.segment.rsc +14 -14
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +7 -7
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/node.segments/_full.segment.rsc +14 -14
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +7 -7
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/node.segments/node.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/nodes.segments/_full.segment.rsc +14 -14
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +7 -7
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +14 -14
- package/.next/server/app/server-logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +14 -14
- package/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- 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 +14 -14
- package/.next/server/app/tasks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js +3 -0
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +2 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.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-mpa_947ipeq.js +1 -0
- package/.next/static/chunks/01lmbsd37fybu.js +1 -0
- package/.next/static/chunks/02cg1w~3p2rym.js +2 -0
- package/.next/static/chunks/03o.h6kvmw4l_.js +1 -0
- package/.next/static/chunks/03~~oirxz7~vc.js +1 -0
- package/.next/static/chunks/05uk96gc~9mni.js +1 -0
- package/.next/static/chunks/072so8rfx2tt-.css +2 -0
- package/.next/static/chunks/08kf-.bgs10ze.js +1 -0
- package/.next/static/chunks/0glmrdj9112tc.js +7 -0
- package/.next/static/chunks/0rxrez_cjn.eh.js +1 -0
- package/.next/static/chunks/0tvn2l1pc.h65.js +1 -0
- package/.next/static/chunks/0vtn.bm.9hpmx.js +1 -0
- package/.next/static/chunks/0weeije070zxa.js +1 -0
- package/.next/static/chunks/0x8x.29hkju5a.js +1 -0
- package/.next/static/chunks/121d8yvfl8l_..js +7 -0
- package/.next/static/chunks/174re5ar~kxne.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/app/api/hub/servers/route.ts +39 -0
- package/app/components/AppShell.tsx +2 -0
- package/app/components/ChatPopover.tsx +38 -2
- package/app/components/CommandPalette.tsx +67 -0
- package/app/components/HelpOverlay.tsx +71 -0
- package/app/components/ServersDrawer.tsx +206 -0
- package/app/components/TopoGraph.tsx +1817 -157
- package/app/components/utils.ts +8 -7
- package/app/globals.css +19 -1
- package/app/lib/time.ts +36 -0
- package/package.json +1 -1
- package/scripts/help-overlay-topo-test.mjs +44 -0
- package/scripts/servers-drawer-live-test.mjs +96 -0
- package/scripts/topo-active-filter-pill-test.mjs +101 -0
- package/scripts/topo-active-links-chip-hover-test.mjs +103 -0
- package/scripts/topo-active-links-chip-test.mjs +73 -0
- package/scripts/topo-arrival-ping-test.mjs +87 -0
- package/scripts/topo-arrow-tier-test.mjs +61 -0
- package/scripts/topo-auto-fit-test.mjs +73 -0
- package/scripts/topo-chat-focus-ring-test.mjs +77 -0
- package/scripts/topo-chip-pin-mirror-test.mjs +113 -0
- package/scripts/topo-click-ripple-test.mjs +66 -0
- package/scripts/topo-cmdk-layout-view-test.mjs +108 -0
- package/scripts/topo-cmdk-pin-test.mjs +123 -0
- package/scripts/topo-cmdk-vendor-clear-test.mjs +133 -0
- package/scripts/topo-cwd-tooltip-test.mjs +64 -0
- package/scripts/topo-dblclick-reset-test.mjs +74 -0
- package/scripts/topo-dispatch-pulse-test.mjs +83 -0
- package/scripts/topo-edge-endpoint-highlight-test.mjs +111 -0
- package/scripts/topo-edge-focus-test.mjs +113 -0
- package/scripts/topo-edge-hover-test.mjs +93 -0
- package/scripts/topo-edge-tooltip-test.mjs +70 -0
- package/scripts/topo-esc-clears-pin-test.mjs +98 -0
- package/scripts/topo-filter-pill-body-click-test.mjs +112 -0
- package/scripts/topo-filter-pill-count-test.mjs +110 -0
- package/scripts/topo-filter-pill-mobile-test.mjs +90 -0
- package/scripts/topo-fit-key-test.mjs +106 -0
- package/scripts/topo-freshness-chip-test.mjs +74 -0
- package/scripts/topo-group-box-pinned-state-test.mjs +95 -0
- package/scripts/topo-group-count-test.mjs +68 -0
- package/scripts/topo-group-hover-test.mjs +82 -0
- package/scripts/topo-group-label-hover-test.mjs +119 -0
- package/scripts/topo-group-pin-test.mjs +119 -0
- package/scripts/topo-group-status-pips-test.mjs +103 -0
- package/scripts/topo-groupbox-live-test.mjs +100 -0
- package/scripts/topo-groupbox-test.mjs +4 -2
- package/scripts/topo-help-overlay-r59-test.mjs +67 -0
- package/scripts/topo-help-overlay-r65-test.mjs +64 -0
- package/scripts/topo-help-overlay-r70-test.mjs +63 -0
- package/scripts/topo-help-overlay-r78-test.mjs +59 -0
- package/scripts/topo-help-overlay-r81-test.mjs +58 -0
- package/scripts/topo-help-overlay-r87-test.mjs +64 -0
- package/scripts/topo-help-overlay-r91-test.mjs +65 -0
- package/scripts/topo-hub-busyness-test.mjs +100 -0
- package/scripts/topo-hub-click-fit-test.mjs +137 -0
- package/scripts/topo-hub-title-test.mjs +93 -0
- package/scripts/topo-ingroup-edge-test.mjs +103 -0
- package/scripts/topo-label-lift-test.mjs +119 -0
- package/scripts/topo-label-scale-test.mjs +78 -0
- package/scripts/topo-lastseen-tooltip-test.mjs +59 -0
- package/scripts/topo-layout-key-test.mjs +91 -0
- package/scripts/topo-legend-hover-test.mjs +113 -0
- package/scripts/topo-legend-pin-test.mjs +128 -0
- package/scripts/topo-minimap-test.mjs +68 -0
- package/scripts/topo-mobile-chips-test.mjs +103 -0
- package/scripts/topo-node-hover-lift-test.mjs +85 -0
- package/scripts/topo-offline-dim-test.mjs +70 -0
- package/scripts/topo-overlap-test.mjs +32 -5
- package/scripts/topo-pan-cursor-test.mjs +62 -0
- package/scripts/topo-panel-elevation-test.mjs +76 -0
- package/scripts/topo-pin-persistence-test.mjs +105 -0
- package/scripts/topo-popover-meta-test.mjs +78 -0
- package/scripts/topo-pressure-bar-test.mjs +69 -0
- package/scripts/topo-pressure-hover-test.mjs +123 -0
- package/scripts/topo-pressure-pin-test.mjs +119 -0
- package/scripts/topo-pulse-rate-test.mjs +71 -0
- package/scripts/topo-recent-row-hover-test.mjs +122 -0
- package/scripts/topo-recent-row-ts-test.mjs +92 -0
- package/scripts/topo-recent-signal-empty-test.mjs +63 -0
- package/scripts/topo-reduced-motion-test.mjs +77 -0
- package/scripts/topo-status-chip-hover-test.mjs +101 -0
- package/scripts/topo-tier-ring-occupancy-test.mjs +87 -0
- package/scripts/topo-tier-ring-test.mjs +69 -0
- package/scripts/topo-tier-ring-tint-test.mjs +110 -0
- package/scripts/topo-tier-stagger-test.mjs +89 -0
- package/scripts/topo-tz-ghost-test.mjs +69 -0
- package/scripts/topo-vendor-chip-hover-test.mjs +111 -0
- package/scripts/topo-vendor-pill-test.mjs +125 -0
- package/scripts/topo-vendor-pin-test.mjs +125 -0
- package/scripts/topo-wheel-zoom-test.mjs +79 -0
- package/scripts/topo-zoom-keys-test.mjs +89 -0
- package/.next/static/chunks/0-7iowzu4.798.js +0 -1
- package/.next/static/chunks/0016gkow7hgob.js +0 -1
- package/.next/static/chunks/02t5jr4shh.hy.js +0 -1
- package/.next/static/chunks/0_qfg5s5uzs7..js +0 -7
- package/.next/static/chunks/0cj5qr_a8dzky.js +0 -7
- package/.next/static/chunks/0elalb9n_.~di.js +0 -1
- package/.next/static/chunks/0j_q__o8p6g83.js +0 -1
- package/.next/static/chunks/0jl6_w50zh4l5.js +0 -1
- package/.next/static/chunks/0nbw9c8k8ecwn.js +0 -1
- package/.next/static/chunks/0r4q73.-1bkyl.js +0 -1
- package/.next/static/chunks/0r_c8eccg3z2o.js +0 -1
- package/.next/static/chunks/0y0_~78h5zp1g.js +0 -1
- package/.next/static/chunks/0~5-jv77qynyc.css +0 -2
- package/.next/static/chunks/10oi7l-tycgl9.js +0 -1
- package/.next/static/chunks/11uk1izuv3~0t.js +0 -1
- /package/.next/static/{mD5mWtAz2L5GuQ3XkS7ys → XZMyyxNU2Za5VigO0SM2d}/_buildManifest.js +0 -0
- /package/.next/static/{mD5mWtAz2L5GuQ3XkS7ys → XZMyyxNU2Za5VigO0SM2d}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{mD5mWtAz2L5GuQ3XkS7ys → XZMyyxNU2Za5VigO0SM2d}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24156,e=>{"use strict";var t=e.i(22381),a=e.i(23910);let s=[{id:"cyber",label:"Cyber",emoji:"🌃",desc:"默认深色"},{id:"light",label:"Light",emoji:"☀️",desc:"浅色简洁"},{id:"mint",label:"Mint",emoji:"🌿",desc:"薄荷绿"},{id:"sunset",label:"Sunset",emoji:"🌅",desc:"暖色橙紫"}],r="anet-theme";function n(e){"u">typeof document&&document.documentElement.setAttribute("data-theme",e)}e.s(["ThemeProvider",0,function({children:e}){return(0,a.useEffect)(()=>{n(localStorage.getItem(r)||"cyber")},[]),(0,t.jsx)(t.Fragment,{children:e})},"ThemeSwitcher",0,function({compact:e=!1}){let[o,l]=(0,a.useState)("cyber"),[i,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=localStorage.getItem(r)||"cyber";l(e),n(e)},[]);let d=s.find(e=>e.id===o)||s[0];return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{"aria-label":"切换主题",onClick:()=>c(!i),className:"px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity",style:{background:"var(--bg-elevated)",color:"var(--fg)",border:"1px solid var(--border)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:d.emoji}),!e&&(0,t.jsx)("span",{children:d.label})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),(0,t.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:s.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;l(t=e.id),localStorage.setItem(r,t),n(t),c(!1)},className:"w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80",style:{background:e.id===o?"var(--bg-elevated)":"transparent",color:"var(--fg)"},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:e.emoji}),(0,t.jsx)("span",{className:"flex-1",children:e.label}),(0,t.jsx)("span",{style:{color:"var(--fg-dim)"},className:"text-[10px]",children:e.desc}),e.id===o&&(0,t.jsx)("span",{style:{color:"var(--accent)"},children:"•"})]},e.id))})]})]})}])},22485,e=>{"use strict";var t=e.i(22381),a=e.i(56058),s=e.i(56839),r=e.i(23910),n=e.i(12629),o=e.i(11449),l=e.i(24156);let i=e=>fetch(e).then(e=>e.ok?e.json():{networks:[]}),c=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Audit Log",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/server-logs",label:"Server Logs",icon:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],d={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function h(){let e=(0,a.usePathname)(),[h,p]=(0,r.useState)(!1),[u,g]=(0,r.useState)(!1),{networkId:f,setNetworkId:v}=(0,o.useNetworkId)(),{data:b}=(0,n.default)("/api/hub/networks",i,{refreshInterval:15e3,dedupingInterval:1e4}),{data:y}=(0,n.default)("/api/hub/status",m,{refreshInterval:15e3,dedupingInterval:1e4}),k=b?.networks||[],j=(()=>{let e=new Map;for(let t of y?.sessions||[])t.network_id&&e.set(t.network_id,(e.get(t.network_id)||0)+1);let t=new Set(k.map(e=>e.network_id));return[...k,...[...e.keys()].filter(e=>!t.has(e)).map(e=>({network_id:e,network_name:e}))].map(t=>({...t,agentCount:e.get(t.network_id)||0}))})(),w=(0,t.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:c.map(a=>{var r;return(0,t.jsxs)(s.default,{href:a.href,prefetch:!1,onClick:()=>g(!1),title:h?a.label:void 0,className:`relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(r=a.href)?"/"===e:"/settings"===r?"/settings"===e:e.startsWith(r))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20 anet-nav-active":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${h?"justify-center px-0":""}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a.icon})}),!h&&(0,t.jsx)("span",{children:a.label})]},a.href)})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>g(!u),className:"fixed top-4 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-2.5 text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),u&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden anet-fade-in",onClick:()=>g(!1)}),(0,t.jsxs)("aside",{"data-anet-sidebar":"true",className:`
|
|
2
|
+
fixed top-0 left-0 h-full z-40 bg-[#0d0d1a] border-r border-[#2a2a4a]
|
|
3
|
+
transition-transform duration-200 ease-out
|
|
4
|
+
${h?"w-16":"w-52"}
|
|
5
|
+
${u?"translate-x-0 shadow-2xl shadow-black/40 lg:shadow-none":"-translate-x-full"}
|
|
6
|
+
lg:translate-x-0 lg:static lg:shrink-0 lg:shadow-none
|
|
7
|
+
`,children:[(0,t.jsx)(x,{collapsed:h}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!h&&j.length>0&&(0,t.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,t.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,t.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("button",{onClick:()=>{v(e.network_id),g(!1)},title:e.network_id,className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${f===e.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,t.jsx)("span",{children:d[e.role||"member"]||"👤"}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.network_name}),e.agentCount?(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:e.agentCount}):null]},e.network_id))})]}),(0,t.jsx)("div",{className:"pb-20",children:w}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,t.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:h?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${h?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-2"}`,"aria-label":"Open command palette",children:[(0,t.jsxs)("span",{className:`flex items-center ${h?"":"gap-2"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!h&&"Quick search"]}),!h&&(0,t.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,t.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:h?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${h?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!h&&"Sign out"]}),(0,t.jsxs)("div",{className:`flex items-center gap-2 ${h?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,t.jsx)(l.ThemeSwitcher,{compact:h}),(0,t.jsx)("button",{onClick:()=>p(!h),title:h?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":h?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${h?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let m=e=>fetch(e).then(e=>e.ok?e.json():{sessions:[]});function x({collapsed:e}){let{data:a}=(0,n.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),r=a?.sessions||[],o=r.filter(e=>e.status&&"offline"!==e.status).length,l=r.length;return e?(0,t.jsx)(s.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,t.jsx)(p,{size:32})}):(0,t.jsxs)(s.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,t.jsx)(p,{size:32}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${o>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===l?(0,t.jsx)("span",{children:"waiting for agents"}):(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:o}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",l]})," online"]})]})]})]})}function p({size:e}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let u=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function g(){let e,a,{data:o,error:l}=(0,n.default)("/api/hub/stats",u,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:c}=(0,n.default)("/api/hub/health",u,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,h]=(0,r.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let m=l&&c||i&&!1===i.ok,x=o?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,p=o?.nodes?.total===0,g=null;if(m?(e="red",a="CommHub unreachable — agents may be offline",g={label:"Open Settings",href:"/settings"}):x>0?(e="amber",a=`${x} task${x>1?"s":""} failed recently`,g={label:"Review failures",href:"/tasks?status=failed"}):(p?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),g=null),"green"===e&&!o)return null;let f={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[e],v={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[e];return(0,t.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${f} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${v}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[g&&(0,t.jsxs)(s.default,{href:g.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[g.label," →"]}),g&&(0,t.jsx)(s.default,{href:g.href,"aria-label":g.label,className:"sm:hidden text-[11px] font-medium opacity-90 hover:opacity-100",children:"→"}),(0,t.jsx)("button",{onClick:()=>{h(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-50 hover:opacity-100 leading-none px-1",children:"×"})]})]})}let f="anet-cmdk-recents";function v(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function b(e){try{let t=v().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function y(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),r=0,n=0,o=0,l=0,i=[];for(;r<a.length&&n<s.length;)a[r]===s[n]?(o+=2+l,l++,i.push(r),(0===r||/[\s·:_/-]/.test(a[r-1]))&&(o+=4),n++):l=0,r++;return n<s.length?{score:-1,indices:[]}:{score:o-.05*Math.max(0,a.length-s.length),indices:i}}function k({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),r=Array.from(e);return(0,t.jsx)(t.Fragment,{children:r.map((e,a)=>s.has(a)?(0,t.jsx)("mark",{className:"anet-cmdk-mark",children:e},a):(0,t.jsx)("span",{children:e},a))})}function j({d:e}){return(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}let w=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(j,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:e=>e.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:e=>e.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:e=>e.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,t.jsx)(j,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:e=>e.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:e=>e.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,t.jsx)(j,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:e=>e.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:e=>e.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:e=>e.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:e=>e.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,t.jsx)(j,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:e=>e.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,t.jsx)(j,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber",t="light"===e||"mint"===e?"cyber":"light";document.documentElement.setAttribute("data-theme",t);try{localStorage.setItem("anet-theme",t)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,t.jsx)(j,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,t.jsx)(j,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,t.jsx)(j,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}},{id:"act-pin-working",title:"Pin topology filter: working",hint:"highlight working nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","working")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"working"}}))}},{id:"act-pin-idle",title:"Pin topology filter: idle",hint:"highlight idle (online) nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","idle")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"idle"}}))}},{id:"act-pin-offline",title:"Pin topology filter: offline",hint:"highlight offline / no-SSE nodes",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","offline")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"offline"}}))}},{id:"act-clear-topo-pins",title:"Clear topology filters",hint:"release pinned status + group + vendor",group:"Actions",icon:(0,t.jsx)(j,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-status"),sessionStorage.removeItem("anet-topo-pinned-group"),sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear"}}))}},{id:"act-clear-topo-vendor",title:"Clear topology vendor filter",hint:"release pinned vendor only",group:"Actions",icon:(0,t.jsx)(j,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear-vendor"}}))}},{id:"act-topo-toggle-layout",title:"Toggle topology layout",hint:"ring ↔ grid (or press `l`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-layout",{detail:{kind:"toggle"}}))}},{id:"act-topo-fit",title:"Fit topology to canvas",hint:"auto-zoom to content (or press `f`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-view",{detail:{kind:"fit"}}))}}];function N(){let e=(0,a.useRouter)(),[s,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),[i,c]=(0,r.useState)(0),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),n(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,r.useEffect)(()=>{s&&(l(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[h,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{s&&m(v())},[s]);let[x,p]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s)return;let e=!1;return(async()=>{try{let[a,s]=await Promise.all([fetch("/api/hub/status").then(e=>e.ok?e.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(e=>e.ok?e.json():{tasks:[]})]);if(e)return;let r=(a.sessions||[]).filter(e=>e.alias).slice(0,20).map(e=>({id:`agent-${e.alias}`,title:`Go to agent ${e.alias}`,hint:`${e.agent||"agent"} \xb7 ${e.status||"unknown"}`,group:"Agents",icon:(0,t.jsx)(j,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:t=>t.push(`/node?alias=${encodeURIComponent(e.alias)}`)})),n=(s.tasks||[]).filter(e=>e.task_id).slice(0,15).map(e=>({id:`task-${e.task_id}`,title:`Open task: ${(e.content||e.task_id||"").slice(0,50)}`,hint:`${e.from_name||"?"} → ${e.to_name||"?"} \xb7 ${e.status||""}`,group:"Tasks",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:t=>t.push(`/tasks/${encodeURIComponent(e.task_id)}`)}));p([...r,...n])}catch{}})(),()=>{e=!0}},[s]);let u=(0,r.useMemo)(()=>{let e=[...w,...x];if(!o.trim()){let t=h.map(t=>e.find(e=>e.id===t)).filter(e=>!!e).map(e=>({...e,group:"Recents"})),a=new Set(h);return[...t,...w.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=y(e.title,o),a=e.hint?y(e.hint,o):{score:-1,indices:[]},s=y(e.id,o);return{c:e,score:Math.max(t.score>=0?+t.score:-1/0,a.score>=0?.6*a.score:-1/0,s.score>=0?.3*s.score:-1/0),_titleHi:t.score>=0?t.indices:[],_hintHi:a.score>=0?a.indices:[]}}).filter(e=>e.score>-1/0);return t.sort((e,t)=>t.score-e.score),t.map(e=>({...e.c,_titleHi:e._titleHi,_hintHi:e._hintHi}))},[o,h,x]);if((0,r.useEffect)(()=>{i>=u.length&&c(0)},[u.length,i]),!s)return null;let g={};for(let e of u)(g[e.group]||=[]).push(e);let f=0;return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>n(!1),onKeyDown:t=>{if("Escape"===t.key)return void n(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,u.length-1));return}if("ArrowUp"===t.key){t.preventDefault(),c(e=>Math.max(e-1,0));return}if("Enter"===t.key){t.preventDefault();let a=u[i];a&&(b(a.id),a.perform(e),n(!1))}},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("input",{ref:d,value:o,onChange:e=>{l(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,t.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,t.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===u.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',o,'"']}):Object.entries(g).map(([a,s])=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:a}),s.map(a=>{let s=f++,r=s===i;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{b(a.id),a.perform(e),n(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${r?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:r?"text-cyan-400":"text-gray-500",children:a.icon}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block truncate",children:(0,t.jsx)(k,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(k,{text:a.hint,indices:a._hintHi||[]})})]}),r&&(0,t.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},a.id)})]},a))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let M=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan (empty canvas only)"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"},{keys:["click hub"],label:"Fit topology to canvas (R52)"},{keys:["hover legend"],label:"Highlight nodes of a status (R55)"},{keys:["hover signal"],label:"Highlight one flow edge (R56)"},{keys:["click chip"],label:"Pin a status filter (R60/R61)"},{keys:["Esc"],label:"Clear pinned filter (R62) — or close chat"},{keys:["click group"],label:"Pin a team focus (R63)"},{keys:["click ×"],label:"Clear one filter (R64) — Esc clears all"},{keys:["⌘","K"],label:'Pin / clear filters via palette → "Pin topology filter…" (R69)'},{keys:["⌘","K"],label:"Toggle layout / Fit canvas via palette (R74)"},{keys:["click pill"],label:"Clear filter — click anywhere on the pill body (R73)"},{keys:["hover chip"],label:'Brighten all active flows — hover "N active links" (R77)'},{keys:["hover N working"],label:"Highlight working nodes — chip-row sibling of legend (R79)"},{keys:["hover vendor"],label:"Highlight one vendor — hover A/O/书/? in the chip row (R80)"},{keys:["hover seg"],label:"Preview a status filter — hover a pressure-bar segment (R83)"},{keys:["hover group"],label:"Preview a team focus — hover a group label (R86)"},{keys:["click vendor"],label:"Pin a vendor filter — click A/O/书/? in the chip row (R88)"},{keys:["⌘","K"],label:'Clear vendor pin only via palette → "Clear topology vendor filter" (R90)'}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function E(){let[e,s]=(0,r.useState)(!1),n=(0,a.useRouter)(),o=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,r="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!r){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!r&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){o.current=Date.now();return}if(Date.now()-o.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),o.current=0,n.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),e)?(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>s(!1),children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,t.jsx)("button",{onClick:()=>s(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,t.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:M.map(e=>(0,t.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:e.group}),(0,t.jsx)("ul",{className:"space-y-1.5",children:e.items.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"flex items-center gap-1",children:e.keys.map((e,a)=>(0,t.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:e},a))}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:e.label})]},a))})]},e.group))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Press ",(0,t.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,t.jsxs)("span",{children:["or ",(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}let S=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");if(!t.ok)throw Error(`hub ${t.status}`);return t.json()};function _({pct:e,label:a}){let s=e>=85?{fill:"#ef4444",track:"rgb(239 68 68 / 0.16)"}:e>=60?{fill:"#f59e0b",track:"rgb(245 158 11 / 0.16)"}:{fill:"#10b981",track:"rgb(16 185 129 / 0.16)"},r=Math.max(0,Math.min(100,e));return(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between text-[10px] text-[var(--fg-muted)] font-mono",children:[(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"tabular-nums",children:[Math.round(r),"%"]})]}),(0,t.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:s.track},children:(0,t.jsx)("div",{className:"h-full transition-[width] duration-300 ease-out",style:{width:`${r}%`,background:s.fill}})})]})}function A(){let[e,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{"1"===localStorage.getItem("anet-servers-drawer")&&a(!0)}catch{}},[]);let{data:s,error:o}=(0,n.default)(e?"/api/hub/servers":null,S,{refreshInterval:5e3,dedupingInterval:3e3}),l=s?.servers??[],i=s?.unavailable===!0,c=l.filter(e=>"online"===e.status).length,d=e&&!s&&!o;return(0,t.jsxs)("aside",{className:"fixed right-0 top-20 z-40 hidden lg:flex flex-col rounded-l-xl border border-r-0 shadow-xl shadow-black/30 anet-fade-in",style:{background:"var(--bg-secondary)",borderColor:"var(--border)",width:e?296:40,maxHeight:"calc(100vh - 6rem)",transition:"width 200ms ease-out"},"aria-label":"Servers panel",children:[(0,t.jsxs)("button",{onClick:()=>a(e=>{let t=!e;try{localStorage.setItem("anet-servers-drawer",t?"1":"0")}catch{}return t}),"aria-expanded":e,"aria-label":e?"Collapse servers panel":"Expand servers panel",className:"flex items-center gap-2 px-2.5 py-2 border-b text-[11px] font-semibold tracking-wide select-none",style:{color:"var(--fg)",borderColor:"var(--border)"},children:[(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"7",r:"0.7",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"17",r:"0.7",fill:"currentColor"})]}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:"Servers"}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono",children:[c,"/",l.length]})]})]}),e&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-2 py-2 space-y-2","data-servers-body":!0,children:[d&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"loading servers…"}),o&&!s&&(0,t.jsx)("div",{className:"rounded-md border px-2.5 py-2 text-[10px] font-mono",style:{background:"rgb(239 68 68 / 0.06)",borderColor:"rgb(239 68 68 / 0.25)",color:"#ef4444"},children:"hub unreachable · retrying every 5s"}),i&&(0,t.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-3 leading-relaxed",children:["host telemetry not available",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[var(--fg-dim)]",children:"upgrade commhub-server ≥ 0.8.1-preview.2"})]}),!d&&!o&&!i&&0===l.length&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"no servers reporting yet"}),l.map(e=>{let a="offline"===e.status,s=null!=e.cpu_load_1min&&e.cpu_cores>0?e.cpu_load_1min/e.cpu_cores*100:null,r=null!=e.mem_used_gb&&null!=e.mem_total_gb&&e.mem_total_gb>0?e.mem_used_gb/e.mem_total_gb*100:null;return(0,t.jsxs)("div",{className:"rounded-lg border px-2.5 py-2 space-y-1.5",style:{background:"var(--bg)",borderColor:"var(--border)",opacity:a?.55:1},title:e.ip?`${e.hostname} \xb7 ${e.ip}`:e.hostname,children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono text-[12px] font-semibold truncate",style:{color:"var(--fg)"},children:e.hostname}),e.note&&(0,t.jsxs)("span",{className:"text-[9px] text-[var(--fg-dim)]",children:["(",e.note,")"]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono tabular-nums shrink-0",children:[e.agent_count," agent",1===e.agent_count?"":"s"]})]}),!a&&null!=s&&(0,t.jsx)(_,{pct:s,label:`CPU ${e.cpu_load_1min.toFixed(2)}/${e.cpu_cores}`}),!a&&null!=r&&(0,t.jsx)(_,{pct:r,label:`RAM ${e.mem_used_gb.toFixed(1)}/${e.mem_total_gb.toFixed(1)}G`}),a&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-dim)] font-mono italic",children:"CPU n/a · RAM n/a · offline"})]},e.hostname)}),l.length>0&&(0,t.jsx)("div",{className:"pt-1 text-[9px] text-[var(--fg-dim)] font-mono text-center",children:"live · refreshing every 5s"})]})]})}let L=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return L.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-screen",children:[(0,t.jsx)(h,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 flex flex-col",children:[(0,t.jsx)(g,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]}),(0,t.jsx)(N,{}),(0,t.jsx)(E,{}),(0,t.jsx)(A,{})]})}],22485)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,59746,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e.includes("T")?e:e.replace(" ","T")+"Z");return Number.isFinite(t)?t:null}function s(e){let s=t(e);if(null===s)return null;let a=Math.floor((Date.now()-s)/1e3);return a<0?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:`${Math.floor(a/86400)}d ago`}e.s(["parseHubTime",0,t,"relativeAgo",0,s],59746),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){return s(e)??"--"}],3479)},46228,e=>{"use strict";var t=e.i(22381);let s=[180,200,220,270,300,330,30,90];function a(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%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:s=28,className:i=""}){let n=a(e),l=Math.max(9,Math.round(.42*s));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${i}`,style:{width:s,height:s,fontSize:l,backgroundColor:n.bg,borderColor:n.ring,color:n.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,a,"aliasInitial",0,r])},76161,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(56839);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function i({variant:e,size: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 n({variant:e="generic",title:s,sub:l,cta:o,compact:c=!1}){let d=r[e],x=s??d.title,h=l??d.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(i,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:x}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(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({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[a,r]=(0,s.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":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,n,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):s>0?(0,t.jsx)(l,{children:(0,t.jsx)(n,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(o,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},46860,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(56839),r=e.i(3479),i=e.i(11449),n=e.i(76161),l=e.i(46228);let o={register:"bg-green-500/10 text-green-300 border-green-500/20",login:"bg-blue-500/10 text-blue-300 border-blue-500/20",login_failed:"bg-red-500/10 text-red-300 border-red-500/20",create_network:"bg-purple-500/10 text-purple-300 border-purple-500/20",send_task:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"},c={register:"#4ade80",login:"#60a5fa",login_failed:"#ef4444",create_network:"#a78bfa",send_task:"#22d3ee"};e.s(["default",0,function(){let e,d,{networkId:x}=(0,i.useNetworkId)(),[h,m]=(0,s.useState)([]),[g,u]=(0,s.useState)(!0),[y,p]=(0,s.useState)(""),[j,b]=(0,s.useState)(""),f=(0,s.useCallback)(async()=>{try{let e=new URLSearchParams({limit:"100"});x&&e.set("network_id",x),j&&e.set("action",j);let t=sessionStorage.getItem("anet_v3_auth");if(t)try{let s=JSON.parse(t);s.token&&e.set("token",s.token)}catch{}let s=await fetch(`/api/hub/audit-log?${e.toString()}`);if(401===s.status)return void window.location.assign("/login");let a=await s.json();m(a.logs||[]),p(a.error&&!a.logs?.length?a.error:"")}catch(e){p(e instanceof Error?e.message:"fetch failed")}finally{u(!1)}},[j,x]);return(0,s.useEffect)(()=>{u(!0),f();let e=setInterval(f,1e4);return()=>clearInterval(e)},[f]),(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Audit Log"})}),(0,t.jsx)("div",{className:"mb-6 flex flex-wrap items-center gap-1 anet-tabstrip-wrap overflow-x-auto sm:overflow-x-visible",children:(e={},h.forEach(t=>{e[t.action]=(e[t.action]||0)+1}),[{key:"",label:"All"},{key:"login",label:"login",dot:c.login},{key:"login_failed",label:"login_failed",dot:c.login_failed},{key:"register",label:"register",dot:c.register},{key:"create_network",label:"create_network",dot:c.create_network},{key:"send_task",label:"send_task",dot:c.send_task}].map(s=>{let a=""===s.key?h.length:e[s.key]||0,r=j===s.key;return(0,t.jsxs)("button",{type:"button",onClick:()=>b(s.key),disabled:0===a&&""!==s.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed shrink-0 whitespace-nowrap ${r?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[s.dot&&(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:s.dot}}),(0,t.jsx)("span",{children:s.label}),(0,t.jsx)("span",{className:`text-[10px] tabular-nums ${r?"text-cyan-400":"text-gray-600"}`,children:a})]},s.key||"all")}))}),y&&(d=/unauthor|401|forbidden|403|admin/i.test(y),(0,t.jsxs)("div",{className:"anet-warn-chip bg-yellow-900/20 border border-yellow-800/40 text-yellow-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-start gap-3",role:"alert",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-base leading-none",children:"⚠"}),(0,t.jsx)("div",{className:"flex-1",children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"需要 admin 权限查看审计日志"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"审计日志记录用户注册 / 登录 / 网络变更等事件,需要 admin 角色。"}),(0,t.jsx)(a.default,{href:"/login",className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"切到 admin 账号 →"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium",children:"加载失败"}),(0,t.jsx)("div",{className:"text-xs opacity-80 mt-1",children:"请检查 CommHub 是否在线,或稍后重试。"}),(0,t.jsx)("button",{onClick:()=>window.location.reload(),className:"inline-block mt-2 text-xs font-medium underline underline-offset-4 hover:opacity-80",children:"重新加载 →"})]})})]})),g?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-14 bg-gray-800/20 rounded-lg"},e))}):0===h.length?(0,t.jsx)(n.EmptyState,{variant:"logs"}):(0,t.jsx)("div",{className:"space-y-2",children:h.map(e=>{let s=e.username||e.user_id;return(0,t.jsxs)("div",{className:"relative bg-[#111128] border border-[#2a2a4a] rounded-lg pl-4 pr-4 py-3 hover:border-[#3a3a5a] transition-colors overflow-hidden",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute left-0 top-0 bottom-0 w-0.5",style:{backgroundColor:c[e.action]||"transparent"}}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${o[e.action]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.action}),s&&(0,t.jsx)(l.AliasAvatar,{alias:s,size:16}),(0,t.jsx)("span",{className:"text-sm text-gray-200 font-medium",children:s}),e.target_type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsxs)("span",{className:"text-xs text-gray-400",children:[e.target_type,e.target_id?`:${e.target_id.slice(0,12)}`:""]})]}),(0,t.jsx)("span",{className:"text-xs text-gray-600 ml-auto",children:(0,r.timeAgo)(e.created_at)})]}),e.detail&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.detail}),e.ip&&"unknown"!==e.ip&&(0,t.jsxs)("div",{className:"text-[10px] text-gray-700",children:["IP: ",e.ip]})]},e.id)})})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":262,"timestamp":6510397176,"id":4,"parentId":1,"tags":{},"startTime":1778814482643,"traceId":"410283e0b951e470"},{"name":"load-custom-routes","duration":482,"timestamp":6510397575,"id":5,"parentId":1,"tags":{},"startTime":1778814482644,"traceId":"410283e0b951e470"},{"name":"create-dist-dir","duration":622,"timestamp":6510398100,"id":6,"parentId":1,"tags":{},"startTime":1778814482644,"traceId":"410283e0b951e470"},{"name":"clean","duration":457,"timestamp":6510399385,"id":7,"parentId":1,"tags":{},"startTime":1778814482646,"traceId":"410283e0b951e470"},{"name":"discover-routes","duration":9044,"timestamp":6510486665,"id":8,"parentId":1,"tags":{},"startTime":1778814482733,"traceId":"410283e0b951e470"},{"name":"create-root-mapping","duration":105,"timestamp":6510495766,"id":9,"parentId":1,"tags":{},"startTime":1778814482742,"traceId":"410283e0b951e470"},{"name":"generate-route-types","duration":31825,"timestamp":6510498121,"id":10,"parentId":1,"tags":{},"startTime":1778814482744,"traceId":"410283e0b951e470"},{"name":"public-dir-conflict-check","duration":103,"timestamp":6510530164,"id":11,"parentId":1,"tags":{},"startTime":1778814482776,"traceId":"410283e0b951e470"},{"name":"generate-routes-manifest","duration":4298,"timestamp":6510530380,"id":12,"parentId":1,"tags":{},"startTime":1778814482777,"traceId":"410283e0b951e470"},{"name":"run-turbopack","duration":5705992,"timestamp":6510540391,"id":14,"parentId":1,"tags":{},"startTime":1778814482787,"traceId":"410283e0b951e470"},{"name":"turbopack-build-events","duration":85,"timestamp":6510840323,"id":15,"parentId":1,"tags":{},"startTime":1778814483087,"traceId":"410283e0b951e470"},{"name":"run-typescript","duration":8747836,"timestamp":6516268787,"id":16,"parentId":1,"tags":{},"startTime":1778814488515,"traceId":"410283e0b951e470"},{"name":"generate-required-server-files","duration":2339,"timestamp":6525017893,"id":18,"parentId":1,"tags":{},"startTime":1778814497264,"traceId":"410283e0b951e470"},{"name":"check-static-error-page","duration":12580,"timestamp":6525215015,"id":20,"parentId":19,"tags":{},"startTime":1778814497461,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":459286,"timestamp":6525230069,"id":62,"parentId":22,"tags":{},"startTime":1778814497476,"traceId":"410283e0b951e470"},{"name":"check-page","duration":472332,"timestamp":6525217196,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778814497463,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":584842,"timestamp":6525230223,"id":63,"parentId":25,"tags":{},"startTime":1778814497476,"traceId":"410283e0b951e470"},{"name":"check-page","duration":594445,"timestamp":6525220727,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778814497467,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":593211,"timestamp":6525230846,"id":67,"parentId":29,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":602820,"timestamp":6525221307,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":595868,"timestamp":6525230982,"id":68,"parentId":30,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":605451,"timestamp":6525221449,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":597520,"timestamp":6525230454,"id":65,"parentId":27,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":607001,"timestamp":6525221050,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778814497467,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":601950,"timestamp":6525229755,"id":61,"parentId":21,"tags":{},"startTime":1778814497476,"traceId":"410283e0b951e470"},{"name":"check-page","duration":615780,"timestamp":6525216097,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778814497462,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":600777,"timestamp":6525231326,"id":71,"parentId":34,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":610059,"timestamp":6525222088,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":607314,"timestamp":6525231352,"id":72,"parentId":35,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":616502,"timestamp":6525222215,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":618232,"timestamp":6525231189,"id":69,"parentId":32,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":627668,"timestamp":6525221816,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":620419,"timestamp":6525231486,"id":74,"parentId":37,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":629032,"timestamp":6525222913,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778814497469,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":624032,"timestamp":6525230695,"id":66,"parentId":28,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":633598,"timestamp":6525221170,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778814497467,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":629206,"timestamp":6525231536,"id":78,"parentId":41,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":637454,"timestamp":6525223330,"id":41,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":631031,"timestamp":6525231524,"id":77,"parentId":40,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":639357,"timestamp":6525223247,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":632971,"timestamp":6525231252,"id":70,"parentId":33,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":642319,"timestamp":6525221949,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":637880,"timestamp":6525230332,"id":64,"parentId":26,"tags":{},"startTime":1778814497477,"traceId":"410283e0b951e470"},{"name":"check-page","duration":647351,"timestamp":6525220904,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778814497467,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":636833,"timestamp":6525231555,"id":80,"parentId":43,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":644916,"timestamp":6525223493,"id":43,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":646270,"timestamp":6525231589,"id":83,"parentId":46,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":654165,"timestamp":6525223756,"id":46,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":652049,"timestamp":6525231601,"id":84,"parentId":47,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":659855,"timestamp":6525223840,"id":47,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":653114,"timestamp":6525231499,"id":75,"parentId":38,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":661594,"timestamp":6525223059,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778814497469,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":656282,"timestamp":6525231512,"id":76,"parentId":39,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":665901,"timestamp":6525223147,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778814497469,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":658479,"timestamp":6525231576,"id":82,"parentId":45,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":666441,"timestamp":6525223655,"id":45,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":656995,"timestamp":6525236168,"id":87,"parentId":31,"tags":{},"startTime":1778814497482,"traceId":"410283e0b951e470"},{"name":"check-page","duration":671655,"timestamp":6525221564,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778814497468,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":661994,"timestamp":6525231544,"id":79,"parentId":42,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":670163,"timestamp":6525223413,"id":42,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":668804,"timestamp":6525231567,"id":81,"parentId":44,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":676835,"timestamp":6525223579,"id":44,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":674628,"timestamp":6525231608,"id":85,"parentId":48,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":682344,"timestamp":6525223937,"id":48,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778814497470,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":671433,"timestamp":6525234965,"id":86,"parentId":24,"tags":{},"startTime":1778814497481,"traceId":"410283e0b951e470"},{"name":"check-page","duration":688113,"timestamp":6525218314,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778814497465,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":698666,"timestamp":6525231455,"id":73,"parentId":36,"tags":{},"startTime":1778814497478,"traceId":"410283e0b951e470"},{"name":"check-page","duration":707519,"timestamp":6525222693,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778814497469,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":700222,"timestamp":6525238478,"id":94,"parentId":55,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":712491,"timestamp":6525226355,"id":55,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778814497473,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":708616,"timestamp":6525238490,"id":95,"parentId":56,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":720590,"timestamp":6525226574,"id":56,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778814497473,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":716279,"timestamp":6525238499,"id":96,"parentId":58,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":727680,"timestamp":6525227150,"id":58,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778814497473,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":717062,"timestamp":6525238443,"id":91,"parentId":51,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":730713,"timestamp":6525224841,"id":51,"parentId":19,"tags":{"page":"/messages"},"startTime":1778814497471,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":720668,"timestamp":6525238414,"id":89,"parentId":49,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":734737,"timestamp":6525224392,"id":49,"parentId":19,"tags":{"page":"/login"},"startTime":1778814497471,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":726164,"timestamp":6525238530,"id":98,"parentId":60,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":737365,"timestamp":6525227388,"id":60,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778814497474,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":726396,"timestamp":6525238456,"id":92,"parentId":52,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":739733,"timestamp":6525225148,"id":52,"parentId":19,"tags":{"page":"/node"},"startTime":1778814497471,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":712650,"timestamp":6525252683,"id":99,"parentId":57,"tags":{},"startTime":1778814497499,"traceId":"410283e0b951e470"},{"name":"check-page","duration":738588,"timestamp":6525226793,"id":57,"parentId":19,"tags":{"page":"/settings"},"startTime":1778814497473,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":727015,"timestamp":6525238465,"id":93,"parentId":53,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":740089,"timestamp":6525225418,"id":53,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778814497472,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":731077,"timestamp":6525238513,"id":97,"parentId":59,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":742369,"timestamp":6525227275,"id":59,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778814497474,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":733194,"timestamp":6525238429,"id":90,"parentId":50,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":747053,"timestamp":6525224615,"id":50,"parentId":19,"tags":{"page":"/logs"},"startTime":1778814497471,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":710167,"timestamp":6525262886,"id":100,"parentId":54,"tags":{},"startTime":1778814497509,"traceId":"410283e0b951e470"},{"name":"check-page","duration":747388,"timestamp":6525225709,"id":54,"parentId":19,"tags":{"page":"/"},"startTime":1778814497472,"traceId":"410283e0b951e470"},{"name":"is-page-static","duration":742736,"timestamp":6525238391,"id":88,"parentId":23,"tags":{},"startTime":1778814497485,"traceId":"410283e0b951e470"},{"name":"check-page","duration":763779,"timestamp":6525217387,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778814497464,"traceId":"410283e0b951e470"},{"name":"static-check","duration":766888,"timestamp":6525214349,"id":19,"parentId":1,"tags":{},"startTime":1778814497461,"traceId":"410283e0b951e470"},{"name":"write-routes-manifest","duration":671,"timestamp":6525989358,"id":102,"parentId":1,"tags":{},"startTime":1778814498236,"traceId":"410283e0b951e470"},{"name":"load-dotenv","duration":39,"timestamp":6526001800,"id":105,"parentId":104,"tags":{},"startTime":1778814498248,"traceId":"410283e0b951e470"},{"name":"run-export-path-map","duration":869,"timestamp":6526004673,"id":106,"parentId":104,"tags":{},"startTime":1778814498251,"traceId":"410283e0b951e470"},{"name":"next-export","duration":653805,"timestamp":6526000568,"id":104,"parentId":1,"tags":{},"startTime":1778814498247,"traceId":"410283e0b951e470"},{"name":"move-exported-app-not-found-","duration":604,"timestamp":6526658293,"id":107,"parentId":103,"tags":{},"startTime":1778814498905,"traceId":"410283e0b951e470"},{"name":"move-exported-app-global-error-","duration":444,"timestamp":6526659041,"id":108,"parentId":103,"tags":{},"startTime":1778814498905,"traceId":"410283e0b951e470"}]
|
|
2
|
-
[{"name":"static-generation","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":251,"timestamp":39556673412,"id":4,"parentId":1,"tags":{},"startTime":1778847528920,"traceId":"c48b867502b7fbc0"},{"name":"load-custom-routes","duration":480,"timestamp":39556673802,"id":5,"parentId":1,"tags":{},"startTime":1778847528920,"traceId":"c48b867502b7fbc0"},{"name":"create-dist-dir","duration":575,"timestamp":39556674324,"id":6,"parentId":1,"tags":{},"startTime":1778847528921,"traceId":"c48b867502b7fbc0"},{"name":"clean","duration":433,"timestamp":39556675516,"id":7,"parentId":1,"tags":{},"startTime":1778847528922,"traceId":"c48b867502b7fbc0"},{"name":"discover-routes","duration":9697,"timestamp":39556754438,"id":8,"parentId":1,"tags":{},"startTime":1778847529001,"traceId":"c48b867502b7fbc0"},{"name":"create-root-mapping","duration":104,"timestamp":39556764188,"id":9,"parentId":1,"tags":{},"startTime":1778847529010,"traceId":"c48b867502b7fbc0"},{"name":"generate-route-types","duration":29054,"timestamp":39556766484,"id":10,"parentId":1,"tags":{},"startTime":1778847529013,"traceId":"c48b867502b7fbc0"},{"name":"public-dir-conflict-check","duration":96,"timestamp":39556795723,"id":11,"parentId":1,"tags":{},"startTime":1778847529042,"traceId":"c48b867502b7fbc0"},{"name":"generate-routes-manifest","duration":4579,"timestamp":39556795941,"id":12,"parentId":1,"tags":{},"startTime":1778847529042,"traceId":"c48b867502b7fbc0"},{"name":"run-turbopack","duration":5080659,"timestamp":39556805534,"id":14,"parentId":1,"tags":{},"startTime":1778847529052,"traceId":"c48b867502b7fbc0"},{"name":"turbopack-build-events","duration":74,"timestamp":39557077807,"id":15,"parentId":1,"tags":{},"startTime":1778847529324,"traceId":"c48b867502b7fbc0"},{"name":"run-typescript","duration":8219242,"timestamp":39561894538,"id":16,"parentId":1,"tags":{},"startTime":1778847534141,"traceId":"c48b867502b7fbc0"},{"name":"generate-required-server-files","duration":2967,"timestamp":39570114821,"id":18,"parentId":1,"tags":{},"startTime":1778847542361,"traceId":"c48b867502b7fbc0"},{"name":"check-static-error-page","duration":10367,"timestamp":39570271283,"id":20,"parentId":19,"tags":{},"startTime":1778847542518,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":441125,"timestamp":39570283757,"id":63,"parentId":22,"tags":{},"startTime":1778847542530,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":451611,"timestamp":39570273489,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778847542520,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":525608,"timestamp":39570284331,"id":67,"parentId":28,"tags":{},"startTime":1778847542531,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":534038,"timestamp":39570276043,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778847542522,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":530417,"timestamp":39570283950,"id":65,"parentId":26,"tags":{},"startTime":1778847542530,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":538577,"timestamp":39570275852,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778847542522,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":531156,"timestamp":39570283495,"id":62,"parentId":21,"tags":{},"startTime":1778847542530,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":542315,"timestamp":39570272372,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778847542519,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":530776,"timestamp":39570284068,"id":66,"parentId":27,"tags":{},"startTime":1778847542530,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":538943,"timestamp":39570275937,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778847542522,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":530049,"timestamp":39570286350,"id":70,"parentId":32,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":539930,"timestamp":39570276518,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":548650,"timestamp":39570286655,"id":74,"parentId":36,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":558265,"timestamp":39570277109,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":551127,"timestamp":39570285924,"id":69,"parentId":30,"tags":{},"startTime":1778847542532,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":561175,"timestamp":39570276245,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":553998,"timestamp":39570286692,"id":75,"parentId":37,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":563503,"timestamp":39570277244,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":559847,"timestamp":39570286719,"id":77,"parentId":39,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":569220,"timestamp":39570277397,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":567828,"timestamp":39570286540,"id":73,"parentId":35,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":577656,"timestamp":39570276760,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":568240,"timestamp":39570286426,"id":71,"parentId":33,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":578094,"timestamp":39570276607,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":571025,"timestamp":39570283844,"id":64,"parentId":25,"tags":{},"startTime":1778847542530,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":579231,"timestamp":39570275720,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778847542522,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":577069,"timestamp":39570286743,"id":79,"parentId":41,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":586346,"timestamp":39570277518,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":578226,"timestamp":39570286711,"id":76,"parentId":38,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":587649,"timestamp":39570277334,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":587540,"timestamp":39570286755,"id":80,"parentId":42,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":596762,"timestamp":39570277585,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":590180,"timestamp":39570284480,"id":68,"parentId":29,"tags":{},"startTime":1778847542531,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":598576,"timestamp":39570276144,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778847542522,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":592533,"timestamp":39570286731,"id":78,"parentId":40,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":601848,"timestamp":39570277460,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":596564,"timestamp":39570286798,"id":84,"parentId":46,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":605576,"timestamp":39570277830,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":598280,"timestamp":39570286777,"id":82,"parentId":44,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":607405,"timestamp":39570277702,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":599128,"timestamp":39570286789,"id":83,"parentId":45,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":608194,"timestamp":39570277771,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":599313,"timestamp":39570286826,"id":86,"parentId":48,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":608202,"timestamp":39570277976,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":600670,"timestamp":39570286838,"id":87,"parentId":49,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":608200,"timestamp":39570279355,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":600415,"timestamp":39570291172,"id":89,"parentId":31,"tags":{},"startTime":1778847542537,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":615316,"timestamp":39570276323,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":601737,"timestamp":39570290064,"id":88,"parentId":24,"tags":{},"startTime":1778847542536,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":617973,"timestamp":39570273863,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778847542520,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":611334,"timestamp":39570286814,"id":85,"parentId":47,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":620280,"timestamp":39570277913,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":614133,"timestamp":39570286764,"id":81,"parentId":43,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":623306,"timestamp":39570277647,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778847542524,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":629695,"timestamp":39570286506,"id":72,"parentId":34,"tags":{},"startTime":1778847542533,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":639582,"timestamp":39570276679,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778847542523,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":631595,"timestamp":39570293524,"id":96,"parentId":56,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":644427,"timestamp":39570280749,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778847542527,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":640123,"timestamp":39570293536,"id":97,"parentId":57,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":652826,"timestamp":39570280889,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778847542527,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":647116,"timestamp":39570293548,"id":98,"parentId":59,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":659414,"timestamp":39570281303,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778847542528,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":654720,"timestamp":39570293462,"id":91,"parentId":50,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":668537,"timestamp":39570279696,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":654917,"timestamp":39570293487,"id":93,"parentId":52,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":668557,"timestamp":39570279909,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":658881,"timestamp":39570293432,"id":90,"parentId":23,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":678667,"timestamp":39570273687,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778847542520,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":658929,"timestamp":39570293501,"id":94,"parentId":53,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":672384,"timestamp":39570280064,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":660716,"timestamp":39570293472,"id":92,"parentId":51,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":674414,"timestamp":39570279805,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":660755,"timestamp":39570293576,"id":100,"parentId":61,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":672868,"timestamp":39570281485,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778847542528,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":660901,"timestamp":39570293559,"id":99,"parentId":60,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":673089,"timestamp":39570281397,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778847542528,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":650321,"timestamp":39570304998,"id":101,"parentId":58,"tags":{},"startTime":1778847542551,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":674317,"timestamp":39570281020,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778847542527,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":638092,"timestamp":39570320933,"id":102,"parentId":55,"tags":{},"startTime":1778847542567,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":678665,"timestamp":39570280378,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778847542527,"traceId":"c48b867502b7fbc0"},{"name":"is-page-static","duration":669821,"timestamp":39570293514,"id":95,"parentId":54,"tags":{},"startTime":1778847542540,"traceId":"c48b867502b7fbc0"},{"name":"check-page","duration":683150,"timestamp":39570280219,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778847542526,"traceId":"c48b867502b7fbc0"},{"name":"static-check","duration":692903,"timestamp":39570270503,"id":19,"parentId":1,"tags":{},"startTime":1778847542517,"traceId":"c48b867502b7fbc0"},{"name":"write-routes-manifest","duration":428,"timestamp":39570969546,"id":104,"parentId":1,"tags":{},"startTime":1778847543216,"traceId":"c48b867502b7fbc0"},{"name":"load-dotenv","duration":43,"timestamp":39570981091,"id":107,"parentId":106,"tags":{},"startTime":1778847543227,"traceId":"c48b867502b7fbc0"},{"name":"run-export-path-map","duration":674,"timestamp":39570983640,"id":108,"parentId":106,"tags":{},"startTime":1778847543230,"traceId":"c48b867502b7fbc0"},{"name":"next-export","duration":555084,"timestamp":39570979845,"id":106,"parentId":1,"tags":{},"startTime":1778847543226,"traceId":"c48b867502b7fbc0"}]
|
|
2
|
+
[{"name":"move-exported-app-not-found-","duration":1844,"timestamp":39571538451,"id":109,"parentId":105,"tags":{},"startTime":1778847543785,"traceId":"c48b867502b7fbc0"},{"name":"move-exported-app-global-error-","duration":1310,"timestamp":39571540438,"id":110,"parentId":105,"tags":{},"startTime":1778847543787,"traceId":"c48b867502b7fbc0"},{"name":"static-generation","duration":569536,"timestamp":39570974210,"id":105,"parentId":1,"tags":{},"startTime":1778847543220,"traceId":"c48b867502b7fbc0"},{"name":"write-routes-manifest","duration":411,"timestamp":39571543912,"id":111,"parentId":1,"tags":{},"startTime":1778847543790,"traceId":"c48b867502b7fbc0"},{"name":"print-tree-view","duration":4176,"timestamp":39571561547,"id":112,"parentId":1,"tags":{},"startTime":1778847543808,"traceId":"c48b867502b7fbc0"},{"name":"write-route-bundle-stats","duration":12429,"timestamp":39571565754,"id":113,"parentId":1,"tags":{},"startTime":1778847543812,"traceId":"c48b867502b7fbc0"},{"name":"telemetry-flush","duration":27192,"timestamp":39571578208,"id":114,"parentId":1,"tags":{},"startTime":1778847543824,"traceId":"c48b867502b7fbc0"},{"name":"next-build","duration":14979112,"timestamp":39556626318,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778847528873,"traceId":"c48b867502b7fbc0"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":5080659,"timestamp":39556805534,"id":14,"parentId":1,"tags":{},"startTime":1778847529052,"traceId":"c48b867502b7fbc0"},{"name":"turbopack-build-events","duration":74,"timestamp":39557077807,"id":15,"parentId":1,"tags":{},"startTime":1778847529324,"traceId":"c48b867502b7fbc0"},{"name":"run-typescript","duration":8219242,"timestamp":39561894538,"id":16,"parentId":1,"tags":{},"startTime":1778847534141,"traceId":"c48b867502b7fbc0"},{"name":"static-check","duration":692903,"timestamp":39570270503,"id":19,"parentId":1,"tags":{},"startTime":1778847542517,"traceId":"c48b867502b7fbc0"},{"name":"static-generation","duration":569536,"timestamp":39570974210,"id":105,"parentId":1,"tags":{},"startTime":1778847543220,"traceId":"c48b867502b7fbc0"},{"name":"telemetry-flush","duration":27192,"timestamp":39571578208,"id":114,"parentId":1,"tags":{},"startTime":1778847543824,"traceId":"c48b867502b7fbc0"},{"name":"next-build","duration":14979112,"timestamp":39556626318,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778847528873,"traceId":"c48b867502b7fbc0"}]
|
package/.next/types/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
|
|
4
4
|
type AppRoutes = "/" | "/admin" | "/login" | "/logs" | "/messages" | "/node" | "/nodes" | "/server-logs" | "/settings" | "/settings/networks" | "/settings/tokens" | "/tasks" | "/tasks/[id]"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/anet/config" | "/api/auth/login" | "/api/auth/logout" | "/api/auth/v3" | "/api/hub/audit-log" | "/api/hub/auth" | "/api/hub/broadcast" | "/api/hub/events" | "/api/hub/health" | "/api/hub/inbox" | "/api/hub/license" | "/api/hub/messages" | "/api/hub/networks" | "/api/hub/nodes" | "/api/hub/register" | "/api/hub/send" | "/api/hub/server-logs" | "/api/hub/session" | "/api/hub/stats" | "/api/hub/status" | "/api/hub/task-events" | "/api/hub/tasks" | "/api/hub/tmux" | "/api/hub/tokens"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/anet/config" | "/api/auth/login" | "/api/auth/logout" | "/api/auth/v3" | "/api/hub/audit-log" | "/api/hub/auth" | "/api/hub/broadcast" | "/api/hub/events" | "/api/hub/health" | "/api/hub/inbox" | "/api/hub/license" | "/api/hub/messages" | "/api/hub/networks" | "/api/hub/nodes" | "/api/hub/register" | "/api/hub/send" | "/api/hub/server-logs" | "/api/hub/servers" | "/api/hub/session" | "/api/hub/stats" | "/api/hub/status" | "/api/hub/task-events" | "/api/hub/tasks" | "/api/hub/tmux" | "/api/hub/tokens"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -30,6 +30,7 @@ interface ParamMap {
|
|
|
30
30
|
"/api/hub/register": {}
|
|
31
31
|
"/api/hub/send": {}
|
|
32
32
|
"/api/hub/server-logs": {}
|
|
33
|
+
"/api/hub/servers": {}
|
|
33
34
|
"/api/hub/session": {}
|
|
34
35
|
"/api/hub/stats": {}
|
|
35
36
|
"/api/hub/status": {}
|
package/.next/types/validator.ts
CHANGED
|
@@ -317,6 +317,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
317
317
|
type __Unused = __Check
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
// Validate ../../app/api/hub/servers/route.ts
|
|
321
|
+
{
|
|
322
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/hub/servers">> = Specific
|
|
323
|
+
const handler = {} as typeof import("../../app/api/hub/servers/route.js")
|
|
324
|
+
type __Check = __IsExpected<typeof handler>
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
type __Unused = __Check
|
|
327
|
+
}
|
|
328
|
+
|
|
320
329
|
// Validate ../../app/api/hub/session/route.ts
|
|
321
330
|
{
|
|
322
331
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/hub/session">> = Specific
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { requireDashboardAuth, getV3UserToken } from '@/app/lib/dashboard-auth';
|
|
2
|
+
|
|
3
|
+
const HUB_URL = process.env.COMMHUB_URL || 'http://127.0.0.1:9200';
|
|
4
|
+
|
|
5
|
+
async function hubHeaders(): Promise<Record<string, string>> {
|
|
6
|
+
const userToken = await getV3UserToken();
|
|
7
|
+
const h: Record<string, string> = {};
|
|
8
|
+
if (userToken) h['Authorization'] = `Bearer ${userToken}`;
|
|
9
|
+
return h;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Proxy: GET /api/servers from CommHub. Aggregates host telemetry across
|
|
14
|
+
* sessions and returns one card per server (hostname, ip, cpu/mem load,
|
|
15
|
+
* agent_count, status). Per issue #119; lands in v0.8.1-preview.2 of the
|
|
16
|
+
* commhub-server (通信牛). The dashboard <ServersDrawer> mounts in
|
|
17
|
+
* AppShell and refreshes every 5s when expanded.
|
|
18
|
+
*/
|
|
19
|
+
export async function GET() {
|
|
20
|
+
const authFailure = await requireDashboardAuth();
|
|
21
|
+
if (authFailure) return authFailure;
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const res = await fetch(`${HUB_URL}/api/servers`, {
|
|
25
|
+
headers: await hubHeaders(),
|
|
26
|
+
next: { revalidate: 0 },
|
|
27
|
+
});
|
|
28
|
+
if (!res.ok) {
|
|
29
|
+
// 404 means the upstream hub predates v0.8.1-preview.2 — surface a
|
|
30
|
+
// 'feature unavailable' shape so the drawer can render a friendly
|
|
31
|
+
// empty state instead of an angry error.
|
|
32
|
+
if (res.status === 404) return Response.json({ servers: [], unavailable: true });
|
|
33
|
+
return Response.json({ error: `hub ${res.status}` }, { status: res.status });
|
|
34
|
+
}
|
|
35
|
+
return Response.json(await res.json());
|
|
36
|
+
} catch (e: unknown) {
|
|
37
|
+
return Response.json({ error: 'hub unreachable', detail: e instanceof Error ? e.message : String(e) }, { status: 502 });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -5,6 +5,7 @@ import { Sidebar } from './Sidebar';
|
|
|
5
5
|
import { HealthBanner } from './HealthBanner';
|
|
6
6
|
import { CommandPalette } from './CommandPalette';
|
|
7
7
|
import { HelpOverlay } from './HelpOverlay';
|
|
8
|
+
import { ServersDrawer } from './ServersDrawer';
|
|
8
9
|
|
|
9
10
|
const NO_SHELL_PATHS = ['/login'];
|
|
10
11
|
|
|
@@ -24,6 +25,7 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
|
|
24
25
|
</main>
|
|
25
26
|
<CommandPalette />
|
|
26
27
|
<HelpOverlay />
|
|
28
|
+
<ServersDrawer />
|
|
27
29
|
</div>
|
|
28
30
|
);
|
|
29
31
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { AliasAvatar } from './AliasAvatar';
|
|
5
5
|
import { TaskChatPanel } from './TaskChatPanel';
|
|
6
|
+
import { useSessions } from '../lib/hooks';
|
|
7
|
+
import { relativeAgo } from '../lib/time';
|
|
6
8
|
|
|
7
9
|
interface ChatPopoverProps {
|
|
8
10
|
/** Node alias to chat with. Changing it switches the conversation. */
|
|
@@ -37,6 +39,16 @@ const MOBILE_BP = 640;
|
|
|
37
39
|
* history are already solved there; this component only adds the floating
|
|
38
40
|
* shell + drag/resize behaviour.
|
|
39
41
|
*/
|
|
42
|
+
/** Round 37 / Loop: surface node metadata (cwd + last-seen) inside the
|
|
43
|
+
* ChatPopover header. The SVG <title> tooltip (Rounds 33-34) only shows
|
|
44
|
+
* on hover-over-node, which is lost once the popover is open and
|
|
45
|
+
* potentially dragged away. Lifting cwd and last-seen into the popover
|
|
46
|
+
* header keeps the context where the user actually needs it.
|
|
47
|
+
*
|
|
48
|
+
* Round 38: relativeAgo factored to app/lib/time.ts so this file shares
|
|
49
|
+
* the same TZ-safe parser as TopoGraph (was a duplicated mirror until
|
|
50
|
+
* this round). */
|
|
51
|
+
|
|
40
52
|
export function ChatPopover({ alias, onClose }: ChatPopoverProps) {
|
|
41
53
|
// Position + size are resolved on mount (SSR-safe defaults here).
|
|
42
54
|
const [pos, setPos] = useState({ x: 0, y: 0 });
|
|
@@ -48,6 +60,13 @@ export function ChatPopover({ alias, onClose }: ChatPopoverProps) {
|
|
|
48
60
|
active: false, startX: 0, startY: 0, baseW: 0, baseH: 0,
|
|
49
61
|
});
|
|
50
62
|
|
|
63
|
+
// Round 37 / Loop: pull the target session out of the SWR cache that
|
|
64
|
+
// TopoGraph already populates — same URL, so no extra network fetch.
|
|
65
|
+
const { sessions } = useSessions();
|
|
66
|
+
const session = useMemo(() => sessions.find(s => s.alias === alias), [sessions, alias]);
|
|
67
|
+
const isOnline = !!session && session.status !== 'offline';
|
|
68
|
+
const lastSeenLine = !isOnline ? relativeAgo(session?.last_seen_at) : null;
|
|
69
|
+
|
|
51
70
|
const clamp = useCallback((x: number, y: number, w: number, h: number) => {
|
|
52
71
|
const maxX = Math.max(MARGIN, window.innerWidth - w - MARGIN);
|
|
53
72
|
const maxY = Math.max(MARGIN, window.innerHeight - h - MARGIN);
|
|
@@ -146,7 +165,24 @@ export function ChatPopover({ alias, onClose }: ChatPopoverProps) {
|
|
|
146
165
|
<AliasAvatar alias={alias} size={28} />
|
|
147
166
|
<div className="min-w-0">
|
|
148
167
|
<div className="text-sm font-semibold text-[var(--fg)] truncate">{alias}</div>
|
|
149
|
-
|
|
168
|
+
{/* Round 37: cwd / last-seen lines surface the same metadata
|
|
169
|
+
the SVG <title> tooltip carries (rounds 33-34), but inside
|
|
170
|
+
the popover where it stays accessible after dragging the
|
|
171
|
+
window away from the node. Fall back to the drag-hint
|
|
172
|
+
when no metadata is reported. */}
|
|
173
|
+
{session?.project_dir ? (
|
|
174
|
+
<div className="text-[10px] text-[var(--fg-muted)] truncate font-mono" title={session.project_dir} data-popover-cwd>
|
|
175
|
+
cwd: {session.project_dir}
|
|
176
|
+
</div>
|
|
177
|
+
) : null}
|
|
178
|
+
{lastSeenLine ? (
|
|
179
|
+
<div className="text-[10px] text-[var(--fg-muted)] truncate" data-popover-lastseen>
|
|
180
|
+
last seen: {lastSeenLine}
|
|
181
|
+
</div>
|
|
182
|
+
) : null}
|
|
183
|
+
{!session?.project_dir && !lastSeenLine ? (
|
|
184
|
+
<div className="text-[10px] text-[var(--fg-muted)]">Drag to move · Esc to close</div>
|
|
185
|
+
) : null}
|
|
150
186
|
</div>
|
|
151
187
|
</div>
|
|
152
188
|
<button
|
|
@@ -159,6 +159,73 @@ const COMMANDS: Command[] = [
|
|
|
159
159
|
// Dispatch synthetic `?` keydown so HelpOverlay's global listener opens
|
|
160
160
|
window.dispatchEvent(new KeyboardEvent('keydown', { key: '?' }));
|
|
161
161
|
} },
|
|
162
|
+
|
|
163
|
+
// ── Round 69 / Loop: topology filter actions ────────────────
|
|
164
|
+
// Write the pin directly into sessionStorage (the same key R66
|
|
165
|
+
// hydrates from) and broadcast a `storage`-like custom event
|
|
166
|
+
// so TopoGraph picks it up without a reload. Keyboard-accessible
|
|
167
|
+
// filter trigger from anywhere on the dashboard.
|
|
168
|
+
{ id: 'act-pin-working', title: 'Pin topology filter: working', hint: 'highlight working nodes only', group: 'Actions',
|
|
169
|
+
icon: <NavIcon d="M4 6h16M4 12h8m-8 6h16" />,
|
|
170
|
+
perform: () => {
|
|
171
|
+
try { sessionStorage.setItem('anet-topo-pinned-status', 'working'); } catch {}
|
|
172
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'status', value: 'working' } }));
|
|
173
|
+
} },
|
|
174
|
+
{ id: 'act-pin-idle', title: 'Pin topology filter: idle', hint: 'highlight idle (online) nodes only', group: 'Actions',
|
|
175
|
+
icon: <NavIcon d="M4 6h16M4 12h8m-8 6h16" />,
|
|
176
|
+
perform: () => {
|
|
177
|
+
try { sessionStorage.setItem('anet-topo-pinned-status', 'idle'); } catch {}
|
|
178
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'status', value: 'idle' } }));
|
|
179
|
+
} },
|
|
180
|
+
{ id: 'act-pin-offline', title: 'Pin topology filter: offline', hint: 'highlight offline / no-SSE nodes', group: 'Actions',
|
|
181
|
+
icon: <NavIcon d="M4 6h16M4 12h8m-8 6h16" />,
|
|
182
|
+
perform: () => {
|
|
183
|
+
try { sessionStorage.setItem('anet-topo-pinned-status', 'offline'); } catch {}
|
|
184
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'status', value: 'offline' } }));
|
|
185
|
+
} },
|
|
186
|
+
{ id: 'act-clear-topo-pins', title: 'Clear topology filters', hint: 'release pinned status + group + vendor', group: 'Actions',
|
|
187
|
+
icon: <NavIcon d="M6 18L18 6M6 6l12 12" />,
|
|
188
|
+
perform: () => {
|
|
189
|
+
try {
|
|
190
|
+
sessionStorage.removeItem('anet-topo-pinned-status');
|
|
191
|
+
sessionStorage.removeItem('anet-topo-pinned-group');
|
|
192
|
+
// Round 90 / Loop: R88 added pinnedVendor as the third filter
|
|
193
|
+
// dimension. The clear-all command must clear it too or it
|
|
194
|
+
// silently retains the vendor pin, which a user would read
|
|
195
|
+
// as a stuck filter.
|
|
196
|
+
sessionStorage.removeItem('anet-topo-pinned-vendor');
|
|
197
|
+
} catch {}
|
|
198
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'clear' } }));
|
|
199
|
+
} },
|
|
200
|
+
// Round 90 / Loop: granular vendor-only clear. R88 added per-letter
|
|
201
|
+
// toggle and Esc-clears-all; this fills the keyboard-only middle
|
|
202
|
+
// ground (release the vendor pin without disturbing status/group).
|
|
203
|
+
// Listed only when the user types "vendor" — fuzzy match still
|
|
204
|
+
// surfaces it under broader queries like "clear".
|
|
205
|
+
{ id: 'act-clear-topo-vendor', title: 'Clear topology vendor filter', hint: 'release pinned vendor only', group: 'Actions',
|
|
206
|
+
icon: <NavIcon d="M6 18L18 6M6 6l12 12" />,
|
|
207
|
+
perform: () => {
|
|
208
|
+
try { sessionStorage.removeItem('anet-topo-pinned-vendor'); } catch {}
|
|
209
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'clear-vendor' } }));
|
|
210
|
+
} },
|
|
211
|
+
|
|
212
|
+
// ── Round 74 / Loop: layout + view shortcuts via the palette ──
|
|
213
|
+
// Sister to R69 pin actions. Layout toggle and fit-to-canvas already
|
|
214
|
+
// have keyboard shortcuts (l / f, per R29 R32) but users who forget
|
|
215
|
+
// the keys can search "layout" / "fit" in the palette instead.
|
|
216
|
+
// Layout: write localStorage in lockstep then broadcast — the storage
|
|
217
|
+
// write matters for SSR (init reader uses it) and the event keeps the
|
|
218
|
+
// mounted canvas in sync without a reload.
|
|
219
|
+
{ id: 'act-topo-toggle-layout', title: 'Toggle topology layout', hint: 'ring ↔ grid (or press `l`)', group: 'Actions',
|
|
220
|
+
icon: <NavIcon d="M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z" />,
|
|
221
|
+
perform: () => {
|
|
222
|
+
window.dispatchEvent(new CustomEvent('anet:topo-layout', { detail: { kind: 'toggle' } }));
|
|
223
|
+
} },
|
|
224
|
+
{ id: 'act-topo-fit', title: 'Fit topology to canvas', hint: 'auto-zoom to content (or press `f`)', group: 'Actions',
|
|
225
|
+
icon: <NavIcon d="M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4" />,
|
|
226
|
+
perform: () => {
|
|
227
|
+
window.dispatchEvent(new CustomEvent('anet:topo-view', { detail: { kind: 'fit' } }));
|
|
228
|
+
} },
|
|
162
229
|
];
|
|
163
230
|
|
|
164
231
|
export function CommandPalette() {
|