@sleep2agi/agent-network-dashboard 0.4.5-preview.4 → 0.4.5-preview.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +50 -50
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +4 -4
- 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/index.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +4 -4
- 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 +4 -4
- 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 +4 -4
- 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.js.nft.json +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +4 -4
- 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/chunks/ssr/[root-of-the-server]__02ee4km._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__02ee4km._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jjqrcf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jjqrcf._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0o8yj3c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0o8yj3c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js.map +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js +3 -0
- package/.next/server/chunks/ssr/_0nne7mz._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0.zbtn5._.js +9 -0
- package/.next/server/chunks/ssr/app_0.zbtn5._.js.map +1 -0
- package/.next/server/chunks/ssr/app_04n78pr._.js +3 -0
- package/.next/server/chunks/ssr/app_04n78pr._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0_agk0r._.js +3 -0
- package/.next/server/chunks/ssr/app_0_agk0r._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0dk5wao._.js +1 -1
- package/.next/server/chunks/ssr/app_0dk5wao._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0izi28j._.js +1 -1
- package/.next/server/chunks/ssr/app_0izi28j._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0tncr1_._.js +3 -0
- package/.next/server/chunks/ssr/app_0tncr1_._.js.map +1 -0
- package/.next/server/chunks/ssr/app_components_08ys5y3._.js +5 -5
- package/.next/server/chunks/ssr/app_components_08ys5y3._.js.map +1 -1
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js +3 -0
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js.map +1 -0
- package/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
- package/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js.map +1 -1
- package/.next/server/chunks/ssr/app_server-logs_page_tsx_0_kpp1p._.js +1 -1
- package/.next/server/chunks/ssr/app_server-logs_page_tsx_0_kpp1p._.js.map +1 -1
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js +1 -1
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +4 -4
- 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/02oje7pf-g1v5.js +1 -0
- package/.next/static/chunks/06x7w8nwggx~~.js +1 -0
- package/.next/static/chunks/0943n0t.9c-o2.js +1 -0
- package/.next/static/chunks/{07okhs5561y5y.js → 0c1bp~g7.8ru..js} +1 -1
- package/.next/static/chunks/0csmku~3y472t.js +1 -0
- package/.next/static/chunks/0df0py1glk9xm.js +1 -0
- package/.next/static/chunks/0edt_z0rlxgfk.js +1 -0
- package/.next/static/chunks/0g394kqz_d5.x.js +1 -0
- package/.next/static/chunks/0irkayokwc1fm.js +1 -0
- package/.next/static/chunks/0j8ee64jv6zb7.js +7 -0
- package/.next/static/chunks/0qe_pfeioih-5.css +2 -0
- package/.next/static/chunks/0qnpc7rbxn12u.js +1 -0
- package/.next/static/chunks/0xdl435t_mf1c.js +1 -0
- package/.next/static/chunks/0~n.cadw9_e8s.js +7 -0
- package/.next/static/chunks/11_n-vjzf735y.js +1 -0
- package/.next/static/chunks/15c9pv6gxir.5.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/admin/page.tsx +77 -25
- package/app/components/AgentCard.tsx +19 -5
- package/app/components/AliasAvatar.tsx +51 -0
- package/app/components/BroadcastBar.tsx +22 -4
- package/app/components/DispatchPanel.tsx +9 -5
- package/app/components/EmptyState.tsx +77 -4
- package/app/components/HealthBanner.tsx +1 -1
- package/app/components/HelpOverlay.tsx +50 -10
- package/app/components/InboxPanel.tsx +6 -3
- package/app/components/Sidebar.tsx +49 -41
- package/app/components/TaskChatPanel.tsx +8 -10
- package/app/components/TaskDrawer.tsx +72 -28
- package/app/components/TopoGraph.tsx +118 -24
- package/app/globals.css +90 -0
- package/app/lib/version.ts +7 -0
- package/app/login/page.tsx +37 -7
- package/app/logs/page.tsx +72 -21
- package/app/messages/page.tsx +85 -51
- package/app/node/page.tsx +32 -15
- package/app/nodes/page.tsx +21 -23
- package/app/page.tsx +71 -13
- package/app/server-logs/page.tsx +37 -3
- package/app/settings/networks/page.tsx +37 -13
- package/app/settings/page.tsx +38 -10
- package/app/tasks/page.tsx +77 -41
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jnflc._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jnflc._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js.map +0 -1
- package/.next/server/chunks/ssr/_0d-fuox._.js +0 -3
- package/.next/server/chunks/ssr/_0d-fuox._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0.0wpa~._.js +0 -3
- package/.next/server/chunks/ssr/app_0.0wpa~._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0ap_oiq._.js +0 -3
- package/.next/server/chunks/ssr/app_0ap_oiq._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0et5yua._.js +0 -3
- package/.next/server/chunks/ssr/app_0et5yua._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0ff~kjj._.js +0 -9
- package/.next/server/chunks/ssr/app_0ff~kjj._.js.map +0 -1
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +0 -3
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js.map +0 -1
- package/.next/static/chunks/02flrewxlf_m_.js +0 -1
- package/.next/static/chunks/03sm_xa792mxv.css +0 -2
- package/.next/static/chunks/051gslfjka1kj.js +0 -1
- package/.next/static/chunks/06t_vzei8s9_h.js +0 -1
- package/.next/static/chunks/07oobuohrpigy.js +0 -1
- package/.next/static/chunks/0e7c40p~wq665.js +0 -1
- package/.next/static/chunks/0g7m7zk.v7g6h.js +0 -1
- package/.next/static/chunks/0khpyxpdrp~ty.js +0 -1
- package/.next/static/chunks/0lo_g.q1fm-hr.js +0 -7
- package/.next/static/chunks/0m328uz90rp81.js +0 -1
- package/.next/static/chunks/0ogeals5ufhho.js +0 -1
- package/.next/static/chunks/1031v6nw33ud3.js +0 -1
- package/.next/static/chunks/10ir.g.n~hre0.js +0 -7
- package/.next/static/chunks/10njj7kn9ylkf.js +0 -1
- package/.next/static/chunks/13.dst7liziwo.js +0 -1
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_buildManifest.js +0 -0
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_ssgManifest.js +0 -0
|
@@ -4,6 +4,7 @@ import { useEffect, useState, useCallback } from 'react';
|
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { timeAgo } from '../../components/utils';
|
|
6
6
|
import { EmptyState } from '../../components/EmptyState';
|
|
7
|
+
import { AliasAvatar } from '../../components/AliasAvatar';
|
|
7
8
|
import useSWR from 'swr';
|
|
8
9
|
|
|
9
10
|
const fetcher = (url: string) => fetch(url).then(r => r.json());
|
|
@@ -123,7 +124,12 @@ export default function NetworksPage() {
|
|
|
123
124
|
|
|
124
125
|
{/* List */}
|
|
125
126
|
<section className="bg-[#111128] border border-[#2a2a4a] rounded-xl p-5">
|
|
126
|
-
<
|
|
127
|
+
<div className="flex items-center justify-between mb-3">
|
|
128
|
+
<h2 className="text-sm font-semibold text-gray-300">My Networks</h2>
|
|
129
|
+
{networks.length > 0 && (
|
|
130
|
+
<span className="text-[10px] text-gray-600 uppercase tracking-wide">{networks.length} total</span>
|
|
131
|
+
)}
|
|
132
|
+
</div>
|
|
127
133
|
{loading ? (
|
|
128
134
|
<div className="animate-pulse space-y-2">{[1,2].map(i => <div key={i} className="h-14 bg-gray-800/20 rounded" />)}</div>
|
|
129
135
|
) : networks.length === 0 ? (
|
|
@@ -136,11 +142,14 @@ export default function NetworksPage() {
|
|
|
136
142
|
<div className="space-y-3">
|
|
137
143
|
{networks.map(n => (
|
|
138
144
|
<div key={n.network_id} className="bg-[#0a0a15] rounded-lg px-4 py-3 border border-[#1a1a2a]">
|
|
139
|
-
<div className="flex items-
|
|
140
|
-
<div className="min-w-0">
|
|
141
|
-
<
|
|
142
|
-
<div className="
|
|
143
|
-
|
|
145
|
+
<div className="flex items-start justify-between gap-3">
|
|
146
|
+
<div className="flex items-start gap-3 min-w-0">
|
|
147
|
+
<AliasAvatar alias={n.network_name} size={28} />
|
|
148
|
+
<div className="min-w-0">
|
|
149
|
+
<div className="text-sm text-white font-medium truncate">{n.network_name}</div>
|
|
150
|
+
<div className="text-[10px] text-gray-500 font-mono truncate" title={n.network_id}>{n.network_id} · {timeAgo(n.created_at)}</div>
|
|
151
|
+
{n.description && <div className="text-xs text-gray-400 mt-1">{n.description}</div>}
|
|
152
|
+
</div>
|
|
144
153
|
</div>
|
|
145
154
|
<div className="flex gap-2 shrink-0">
|
|
146
155
|
<button onClick={() => {
|
|
@@ -169,14 +178,20 @@ export default function NetworksPage() {
|
|
|
169
178
|
{(members[n.network_id] || []).length === 0 ? (
|
|
170
179
|
<div className="text-[10px] text-gray-600">No members or V3 auth required</div>
|
|
171
180
|
) : (
|
|
172
|
-
(members[n.network_id] || []).map(m =>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
181
|
+
(members[n.network_id] || []).map(m => {
|
|
182
|
+
const name = m.username || m.display_name || '?';
|
|
183
|
+
return (
|
|
184
|
+
<div key={m.user_id} className="flex items-center gap-2 justify-between text-xs py-1">
|
|
185
|
+
<div className="flex items-center gap-2 min-w-0">
|
|
186
|
+
<AliasAvatar alias={name} size={16} />
|
|
187
|
+
<span className="text-gray-300 truncate">{name}</span>
|
|
188
|
+
</div>
|
|
189
|
+
<span className={`px-1.5 py-0.5 rounded border text-[10px] shrink-0 ${
|
|
176
190
|
m.role === 'owner' ? 'text-yellow-300 border-yellow-500/20' : 'text-gray-400 border-gray-600/20'
|
|
177
191
|
}`}>{m.role}</span>
|
|
178
192
|
</div>
|
|
179
|
-
|
|
193
|
+
);
|
|
194
|
+
})
|
|
180
195
|
)}
|
|
181
196
|
|
|
182
197
|
{/* Invite */}
|
|
@@ -196,8 +211,17 @@ export default function NetworksPage() {
|
|
|
196
211
|
</div>
|
|
197
212
|
{inviteCode && (
|
|
198
213
|
<div className="mt-2 bg-green-500/5 border border-green-500/20 rounded px-3 py-2">
|
|
199
|
-
<div className="
|
|
200
|
-
|
|
214
|
+
<div className="flex items-center justify-between mb-1">
|
|
215
|
+
<div className="text-[10px] text-green-400 uppercase tracking-wide">Invite code</div>
|
|
216
|
+
<button
|
|
217
|
+
type="button"
|
|
218
|
+
onClick={() => { navigator.clipboard?.writeText(inviteCode).catch(() => {}); }}
|
|
219
|
+
className="text-[10px] text-green-300 hover:text-green-200 px-1.5 py-0.5 rounded border border-green-500/20 hover:bg-green-500/10"
|
|
220
|
+
>
|
|
221
|
+
Copy
|
|
222
|
+
</button>
|
|
223
|
+
</div>
|
|
224
|
+
<code className="text-xs text-green-300 select-all break-all">{inviteCode}</code>
|
|
201
225
|
</div>
|
|
202
226
|
)}
|
|
203
227
|
</div>
|
package/app/settings/page.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { useAnetConfig, useHealth, useLicense } from '../lib/hooks';
|
|
6
|
+
import { DASHBOARD_VERSION } from '../lib/version';
|
|
6
7
|
|
|
7
8
|
export default function SettingsPage() {
|
|
8
9
|
const { config } = useAnetConfig();
|
|
@@ -18,12 +19,31 @@ export default function SettingsPage() {
|
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
<div className="min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono">
|
|
21
|
-
<h1 className="text-2xl font-bold text-white mb-
|
|
22
|
+
<h1 className="text-2xl font-bold text-white mb-3 lg:ml-0 ml-10">Settings</h1>
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
{/* Section anchor nav (round 28) — jump to a group instead of scrolling
|
|
25
|
+
through the whole page. Mirrors the section headers below; pages
|
|
26
|
+
with 7+ cards benefit from a visible table-of-contents. */}
|
|
27
|
+
<nav className="mb-8 flex flex-wrap gap-1 text-xs">
|
|
28
|
+
{[
|
|
29
|
+
{ href: '#connection', label: 'Connection' },
|
|
30
|
+
{ href: '#account', label: 'Account' },
|
|
31
|
+
{ href: '#resources', label: 'Resources' },
|
|
32
|
+
].map(a => (
|
|
33
|
+
<a key={a.href} href={a.href}
|
|
34
|
+
className="rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors">
|
|
35
|
+
{a.label}
|
|
36
|
+
</a>
|
|
37
|
+
))}
|
|
38
|
+
</nav>
|
|
39
|
+
|
|
40
|
+
<div className="max-w-2xl space-y-10">
|
|
24
41
|
{/* ── Group: Connection ─────────────────────────────────── */}
|
|
25
|
-
<div className="space-y-4">
|
|
26
|
-
<div className="
|
|
42
|
+
<div id="connection" className="space-y-4 scroll-mt-6">
|
|
43
|
+
<div className="flex items-center gap-2 px-1">
|
|
44
|
+
<div className="text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold">Connection</div>
|
|
45
|
+
<div className="flex-1 h-px bg-[#2a2a4a]" />
|
|
46
|
+
</div>
|
|
27
47
|
|
|
28
48
|
{/* CommHub Connection */}
|
|
29
49
|
<section className="bg-[#111128] border border-[#2a2a4a] rounded-xl p-5">
|
|
@@ -88,7 +108,9 @@ export default function SettingsPage() {
|
|
|
88
108
|
<div className="space-y-3 text-sm">
|
|
89
109
|
<div className={rowClass}>
|
|
90
110
|
<span className="text-gray-500">Version</span>
|
|
91
|
-
<span className={`text-gray-300 ${valueClass}`}
|
|
111
|
+
<span className={`text-gray-300 font-mono ${valueClass}`} title="From package.json @sleep2agi/agent-network-dashboard">
|
|
112
|
+
{DASHBOARD_VERSION}
|
|
113
|
+
</span>
|
|
92
114
|
</div>
|
|
93
115
|
<div className={rowClass}>
|
|
94
116
|
<span className="text-gray-500">Data Layer</span>
|
|
@@ -96,15 +118,18 @@ export default function SettingsPage() {
|
|
|
96
118
|
</div>
|
|
97
119
|
<div className={rowClass}>
|
|
98
120
|
<span className="text-gray-500">Pages</span>
|
|
99
|
-
<span className={`text-gray-300 ${valueClass}`}>Overview, Tasks, Nodes, Messages, Settings</span>
|
|
121
|
+
<span className={`text-gray-300 ${valueClass}`}>Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings</span>
|
|
100
122
|
</div>
|
|
101
123
|
</div>
|
|
102
124
|
</section>
|
|
103
125
|
</div>
|
|
104
126
|
|
|
105
127
|
{/* ── Group: Account ────────────────────────────────────── */}
|
|
106
|
-
<div className="space-y-4">
|
|
107
|
-
<div className="
|
|
128
|
+
<div id="account" className="space-y-4 scroll-mt-6">
|
|
129
|
+
<div className="flex items-center gap-2 px-1">
|
|
130
|
+
<div className="text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold">Account</div>
|
|
131
|
+
<div className="flex-1 h-px bg-[#2a2a4a]" />
|
|
132
|
+
</div>
|
|
108
133
|
|
|
109
134
|
{/* License */}
|
|
110
135
|
<section className="bg-[#111128] border border-[#2a2a4a] rounded-xl p-5">
|
|
@@ -232,8 +257,11 @@ export default function SettingsPage() {
|
|
|
232
257
|
</div>
|
|
233
258
|
|
|
234
259
|
{/* ── Group: Resources ──────────────────────────────────── */}
|
|
235
|
-
<div className="space-y-4">
|
|
236
|
-
<div className="
|
|
260
|
+
<div id="resources" className="space-y-4 scroll-mt-6">
|
|
261
|
+
<div className="flex items-center gap-2 px-1">
|
|
262
|
+
<div className="text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold">Resources</div>
|
|
263
|
+
<div className="flex-1 h-px bg-[#2a2a4a]" />
|
|
264
|
+
</div>
|
|
237
265
|
|
|
238
266
|
{/* API Tokens + Networks */}
|
|
239
267
|
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
package/app/tasks/page.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import Link from 'next/link';
|
|
|
6
6
|
import { useNetworkId } from '../lib/network-context';
|
|
7
7
|
import { TaskDrawer } from '../components/TaskDrawer';
|
|
8
8
|
import { EmptyState } from '../components/EmptyState';
|
|
9
|
+
import { AliasAvatar } from '../components/AliasAvatar';
|
|
9
10
|
|
|
10
11
|
interface Task {
|
|
11
12
|
task_id: string;
|
|
@@ -158,42 +159,73 @@ function TasksContent() {
|
|
|
158
159
|
elements) hinting more content. */}
|
|
159
160
|
<div className="anet-tabstrip-wrap mb-4">
|
|
160
161
|
<div className="anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin">
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
162
|
+
{(() => {
|
|
163
|
+
// Round 56: compute per-status counts so the tab strip doubles as a
|
|
164
|
+
// status distribution dashboard. Matches Audit Log (r43) + Overview
|
|
165
|
+
// agent filter (r34) chip-with-count pattern.
|
|
166
|
+
const counts: Record<string, number> = {};
|
|
167
|
+
tasks.forEach(t => { counts[t.status] = (counts[t.status] || 0) + 1; });
|
|
168
|
+
return ['', ...STATUS_OPTIONS.filter(Boolean)].map(s => {
|
|
169
|
+
const count = s === '' ? tasks.length : counts[s] || 0;
|
|
170
|
+
const isActive = filterStatus === s;
|
|
171
|
+
return (
|
|
172
|
+
<button
|
|
173
|
+
key={s}
|
|
174
|
+
onClick={() => setFilterStatus(s)}
|
|
175
|
+
disabled={count === 0 && s !== '' && !isActive}
|
|
176
|
+
className={`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap disabled:opacity-30 disabled:cursor-not-allowed ${
|
|
177
|
+
isActive
|
|
178
|
+
? `${STATUS_COLORS[s] || 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20'} border`
|
|
179
|
+
: 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40'
|
|
180
|
+
}`}
|
|
181
|
+
>
|
|
182
|
+
{s && (
|
|
183
|
+
<span
|
|
184
|
+
aria-hidden
|
|
185
|
+
className="inline-block w-1.5 h-1.5 rounded-full shrink-0"
|
|
186
|
+
style={{ backgroundColor: STATUS_DOTS[s] || '#6b7280' }}
|
|
187
|
+
/>
|
|
188
|
+
)}
|
|
189
|
+
<span>{s || 'All'}</span>
|
|
190
|
+
<span className={`text-[10px] tabular-nums ${isActive ? 'opacity-80' : 'text-gray-600'}`}>{count}</span>
|
|
191
|
+
</button>
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
})()}
|
|
178
195
|
</div>
|
|
179
196
|
</div>
|
|
180
197
|
|
|
181
|
-
{/* From/To Filters */}
|
|
182
|
-
<div className="flex flex-wrap gap-
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
{/* From/To Filters — same visual block as the status tabs above. */}
|
|
199
|
+
<div className="flex flex-wrap items-center gap-2 mb-6">
|
|
200
|
+
<div className="flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40">
|
|
201
|
+
<span className="text-[10px] uppercase tracking-wide text-gray-600">From</span>
|
|
202
|
+
<input
|
|
203
|
+
type="text"
|
|
204
|
+
value={filterFrom}
|
|
205
|
+
onChange={e => setFilterFrom(e.target.value)}
|
|
206
|
+
placeholder="any node"
|
|
207
|
+
className="w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"
|
|
208
|
+
/>
|
|
209
|
+
</div>
|
|
210
|
+
<div className="flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40">
|
|
211
|
+
<span className="text-[10px] uppercase tracking-wide text-gray-600">To</span>
|
|
212
|
+
<input
|
|
213
|
+
type="text"
|
|
214
|
+
value={filterTo}
|
|
215
|
+
onChange={e => setFilterTo(e.target.value)}
|
|
216
|
+
placeholder="any node"
|
|
217
|
+
className="w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"
|
|
218
|
+
/>
|
|
219
|
+
</div>
|
|
220
|
+
{(filterStatus || filterFrom || filterTo) && (
|
|
221
|
+
<button
|
|
222
|
+
type="button"
|
|
223
|
+
onClick={() => { setFilterStatus(''); setFilterFrom(''); setFilterTo(''); }}
|
|
224
|
+
className="rounded-lg border border-gray-700 px-2.5 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:border-gray-600"
|
|
225
|
+
>
|
|
226
|
+
Clear filters
|
|
227
|
+
</button>
|
|
228
|
+
)}
|
|
197
229
|
</div>
|
|
198
230
|
|
|
199
231
|
{/* Status distribution */}
|
|
@@ -276,11 +308,13 @@ function TasksContent() {
|
|
|
276
308
|
<div className="col-span-1">
|
|
277
309
|
<span className={statusBadge(t.status)}>{t.status}</span>
|
|
278
310
|
</div>
|
|
279
|
-
<div className="col-span-2
|
|
280
|
-
{t.from_name
|
|
311
|
+
<div className="col-span-2 flex items-center gap-1.5 min-w-0" title={t.from_name}>
|
|
312
|
+
{t.from_name && <AliasAvatar alias={t.from_name} size={18} />}
|
|
313
|
+
<span className="truncate text-sm text-gray-200">{t.from_name || '--'}</span>
|
|
281
314
|
</div>
|
|
282
|
-
<div className="col-span-2
|
|
283
|
-
{t.to_name
|
|
315
|
+
<div className="col-span-2 flex items-center gap-1.5 min-w-0" title={t.to_name}>
|
|
316
|
+
{t.to_name && <AliasAvatar alias={t.to_name} size={18} />}
|
|
317
|
+
<span className="truncate text-sm text-gray-200">{t.to_name || '--'}</span>
|
|
284
318
|
</div>
|
|
285
319
|
<div className="col-span-4 text-xs text-gray-400 truncate" title={t.content}>
|
|
286
320
|
{t.content || '--'}
|
|
@@ -315,10 +349,12 @@ function TasksContent() {
|
|
|
315
349
|
</svg>
|
|
316
350
|
</div>
|
|
317
351
|
</div>
|
|
318
|
-
<div className="text-xs text-gray-
|
|
319
|
-
<
|
|
320
|
-
<span className="
|
|
321
|
-
<span className="text-
|
|
352
|
+
<div className="flex items-center gap-1.5 text-xs text-gray-300 min-w-0">
|
|
353
|
+
{t.from_name && <AliasAvatar alias={t.from_name} size={16} />}
|
|
354
|
+
<span className="truncate max-w-[40%]">{t.from_name || '--'}</span>
|
|
355
|
+
<span className="text-gray-600">→</span>
|
|
356
|
+
{t.to_name && <AliasAvatar alias={t.to_name} size={16} />}
|
|
357
|
+
<span className="truncate max-w-[40%]">{t.to_name || '--'}</span>
|
|
322
358
|
</div>
|
|
323
359
|
<div className="text-xs text-gray-400 line-clamp-1">{t.content || '--'}</div>
|
|
324
360
|
<div className="text-xs text-gray-600">{timeAgo(t.created_at)}</div>
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},43515,a=>{"use strict";a.s(["formatUptime",0,function(a){let b=Math.floor(a/3600),c=Math.floor(a%3600/60);return b>0?`${b}h ${c}m`:`${c}m`},"timeAgo",0,function(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}])},53142,a=>{"use strict";var b=a.i(87924),c=a.i(38246);let d={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 e({variant:a,size:c}){let d={width:c,height:c},f={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(a){case"nodes":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,b.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,b.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,b.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,b.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,b.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,b.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,b.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,b.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,b.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,b.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,b.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,b.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,b.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,b.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,b.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,b.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,b.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,b.jsx)("svg",{viewBox:"0 0 64 64",...d,children:(0,b.jsxs)("g",{...f,children:[(0,b.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,b.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function f({variant:a="generic",title:g,sub:h,cta:i,compact:j=!1}){let k=d[a],l=g??k.title,m=h??k.sub;return(0,b.jsxs)("div",{className:`text-center ${j?"py-8":"py-16"} px-4`,role:"status",children:[(0,b.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,b.jsx)(e,{variant:a,size:j?40:56})}),(0,b.jsx)("h3",{className:`font-medium text-gray-300 ${j?"text-sm":"text-base"}`,children:l}),m&&(0,b.jsx)("p",{className:`text-gray-500 ${j?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:m}),i&&(0,b.jsx)("div",{className:"mt-4",children:i.href?(0,b.jsxs)(c.default,{href:i.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[i.label,(0,b.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,b.jsxs)("button",{onClick:i.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[i.label,(0,b.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}a.s(["EmptyState",0,f,"NodesEmptyState",0,function({hint:a}){return a?.global_count?(0,b.jsx)(f,{variant:"nodes",title:"No agents in this network",sub:`Server has ${a.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}):(0,b.jsx)(f,{variant:"nodes",cta:{label:"Run anet quickstart",href:"https://anet.sh"}})}])},44332,a=>{"use strict";var b=a.i(72596),c=a.i(22397);let d=async a=>{let b=await fetch(a);if(401===b.status)throw window.location.assign("/login"),Error("unauthorized");return b.json()},e={refreshInterval:5e3,dedupingInterval:3e3};function f(a,b){if(!b)return a;let c=a.includes("?")?"&":"?";return`${a}${c}network_id=${encodeURIComponent(b)}`}a.s(["useAnetConfig",0,function(){let{data:a}=(0,b.default)("/api/anet/config",d,{refreshInterval:3e4});return{config:a||null}},"useHealth",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/health",d,e);return{health:a||null,error:c}},"useLicense",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/license",d,{refreshInterval:6e4});return{license:a?.ok?a:null,error:c}},"useMessages",0,function(a=100){let{networkId:g}=(0,c.useNetworkId)(),{data:h,error:i,isLoading:j}=(0,b.default)(f(`/api/hub/messages?limit=${a}`,g),d,e);return{messages:h?.messages||[],error:i,isLoading:j}},"useSessions",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h,isLoading:i}=(0,b.default)(f("/api/hub/status",a),d,e);return{sessions:g?.sessions||[],hint:g?._hint,error:h,isLoading:i}},"useStats",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/stats",a),d,e);return{stats:g?.ok?g:null,error:h}},"useTasks",0,function(a){let{networkId:g}=(0,c.useNetworkId)(),h=new URLSearchParams({limit:"100",...a}).toString(),{data:i,error:j,isLoading:k}=(0,b.default)(f(`/api/hub/tasks?${h}`,g),d,e);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:j,isLoading:k}}])},54826,(a,b,c)=>{},15299,(a,b,c)=>{a.r(54826);var d=a.r(72131),e=d&&"object"==typeof d&&"default"in d?d:{default:d},f="u">typeof process&&process.env&&!0,g=function(a){return"[object String]"===Object.prototype.toString.call(a)},h=function(){function a(a){var b=void 0===a?{}:a,c=b.name,d=void 0===c?"stylesheet":c,e=b.optimizeForSpeed,h=void 0===e?f:e;i(g(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",i("boolean"==typeof h,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=h,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var b,c=a.prototype;return c.setOptimizeForSpeed=function(a){i("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),i(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},c.isOptimizeForSpeed=function(){return this._optimizeForSpeed},c.inject=function(){var a=this;i(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(b,c){return"number"==typeof c?a._serverSheet.cssRules[c]={cssText:b}:a._serverSheet.cssRules.push({cssText:b}),c},deleteRule:function(b){a._serverSheet.cssRules[b]=null}}},c.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].ownerNode===a)return document.styleSheets[b]},c.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},c.insertRule=function(a,b){return i(g(a),"`insertRule` accepts only strings"),"number"!=typeof b&&(b=this._serverSheet.cssRules.length),this._serverSheet.insertRule(a,b),this._rulesCount++},c.replaceRule=function(a,b){this._optimizeForSpeed;var c=this._serverSheet;if(b.trim()||(b=this._deletedRulePlaceholder),!c.cssRules[a])return a;c.deleteRule(a);try{c.insertRule(b,a)}catch(d){f||console.warn("StyleSheet: illegal rule: \n\n"+b+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),c.insertRule(this._deletedRulePlaceholder,a)}return a},c.deleteRule=function(a){this._serverSheet.deleteRule(a)},c.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},c.cssRules=function(){return this._serverSheet.cssRules},c.makeStyleTag=function(a,b,c){b&&i(g(b),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),b&&d.appendChild(document.createTextNode(b));var e=document.head||document.getElementsByTagName("head")[0];return c?e.insertBefore(d,c):e.appendChild(d),d},b=[{key:"length",get:function(){return this._rulesCount}}],function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}(a.prototype,b),a}();function i(a,b){if(!a)throw Error("StyleSheet: "+b+".")}var j=function(a){for(var b=5381,c=a.length;c;)b=33*b^a.charCodeAt(--c);return b>>>0},k={};function l(a,b){if(!b)return"jsx-"+a;var c=String(b),d=a+c;return k[d]||(k[d]="jsx-"+j(a+"-"+c)),k[d]}function m(a,b){var c=a+(b=b.replace(/\/style/gi,"\\/style"));return k[c]||(k[c]=b.replace(/__jsx-style-dynamic-selector/g,a)),k[c]}var n=function(){function a(a){var b=void 0===a?{}:a,c=b.styleSheet,d=void 0===c?null:c,e=b.optimizeForSpeed,f=void 0!==e&&e;this._sheet=d||new h({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var b=a.prototype;return b.add=function(a){var b=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var c=this.getIdAndRules(a),d=c.styleId,e=c.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=e.map(function(a){return b._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},b.remove=function(a){var b=this,c=this.getIdAndRules(a).styleId;if(function(a,b){if(!a)throw Error("StyleSheetRegistry: "+b+".")}(c in this._instancesCounts,"styleId: `"+c+"` not found"),this._instancesCounts[c]-=1,this._instancesCounts[c]<1){var d=this._fromServer&&this._fromServer[c];d?(d.parentNode.removeChild(d),delete this._fromServer[c]):(this._indices[c].forEach(function(a){return b._sheet.deleteRule(a)}),delete this._indices[c]),delete this._instancesCounts[c]}},b.update=function(a,b){this.add(b),this.remove(a)},b.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},b.cssRules=function(){var a=this,b=this._fromServer?Object.keys(this._fromServer).map(function(b){return[b,a._fromServer[b]]}):[],c=this._sheet.cssRules();return b.concat(Object.keys(this._indices).map(function(b){return[b,a._indices[b].map(function(a){return c[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},b.styles=function(a){var b,c;return b=this.cssRules(),void 0===(c=a)&&(c={}),b.map(function(a){var b=a[0],d=a[1];return e.default.createElement("style",{id:"__"+b,key:"__"+b,nonce:c.nonce?c.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},b.getIdAndRules=function(a){var b=a.children,c=a.dynamic,d=a.id;if(c){var e=l(d,c);return{styleId:e,rules:Array.isArray(b)?b.map(function(a){return m(e,a)}):[m(e,b)]}}return{styleId:l(d),rules:Array.isArray(b)?b:[b]}},b.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,b){return a[b.id.slice(2)]=b,a},{})},a}(),o=d.createContext(null);function p(){return new n}function q(){return d.useContext(o)}function r(a){var b=q();return b&&b.add(a),null}o.displayName="StyleSheetContext",e.default.useInsertionEffect||e.default.useLayoutEffect,r.dynamic=function(a){return a.map(function(a){return l(a[0],a[1])}).join(" ")},c.StyleRegistry=function(a){var b=a.registry,c=a.children,f=d.useContext(o),g=d.useState(function(){return f||b||p()})[0];return e.default.createElement(o.Provider,{value:g},c)},c.createStyleRegistry=p,c.style=r,c.useStyleRegistry=q},31626,(a,b,c)=>{b.exports=a.r(15299).style}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0_jnflc._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../app/components/utils.ts","../../../../app/components/EmptyState.tsx","../../../../app/lib/hooks.ts","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/style.js"],"sourcesContent":["export function timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n\nexport function formatUptime(seconds: number): string {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n if (h > 0) return `${h}h ${m}m`;\n return `${m}m`;\n}\n","'use client';\n\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Overview-specific variant with a hint about cross-network global count.\n * Kept here so /app/page.tsx can drop in without ceremony.\n */\nexport function NodesEmptyState({ hint }: { hint?: { global_count?: number; filtered_network?: string } }) {\n if (hint?.global_count) {\n return (\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n );\n }\n return (\n <EmptyState\n variant=\"nodes\"\n cta={{ label: 'Run anet quickstart', href: 'https://anet.sh' }}\n />\n );\n}\n","import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useLicense() {\n const { data, error } = useSWR('/api/hub/license', fetcher, { refreshInterval: 60000 });\n return { license: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n\nexport function useNodeSession(alias: string) {\n const { data, error, isLoading } = useSWR(\n alias ? `/api/hub/session?alias=${encodeURIComponent(alias)}` : null,\n fetcher,\n SWR_OPTIONS,\n );\n return {\n session: data?.session || null,\n inbox: data?.inbox || [],\n sse: data?.sse || 0,\n error,\n isLoading,\n };\n}\n","require('client-only');\nvar React = require('react');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n/*\nBased on Glamor's sheet\nhttps://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js\n*/ function _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nvar isProd = typeof process !== \"undefined\" && process.env && process.env.NODE_ENV === \"production\";\nvar isString = function(o) {\n return Object.prototype.toString.call(o) === \"[object String]\";\n};\nvar StyleSheet = /*#__PURE__*/ function() {\n function StyleSheet(param) {\n var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? \"stylesheet\" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;\n invariant$1(isString(name), \"`name` must be a string\");\n this._name = name;\n this._deletedRulePlaceholder = \"#\" + name + \"-deleted-rule____{}\";\n invariant$1(typeof optimizeForSpeed === \"boolean\", \"`optimizeForSpeed` must be a boolean\");\n this._optimizeForSpeed = optimizeForSpeed;\n this._serverSheet = undefined;\n this._tags = [];\n this._injected = false;\n this._rulesCount = 0;\n var node = typeof window !== \"undefined\" && document.querySelector('meta[property=\"csp-nonce\"]');\n this._nonce = node ? node.getAttribute(\"content\") : null;\n }\n var _proto = StyleSheet.prototype;\n _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {\n invariant$1(typeof bool === \"boolean\", \"`setOptimizeForSpeed` accepts a boolean\");\n invariant$1(this._rulesCount === 0, \"optimizeForSpeed cannot be when rules have already been inserted\");\n this.flush();\n this._optimizeForSpeed = bool;\n this.inject();\n };\n _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {\n return this._optimizeForSpeed;\n };\n _proto.inject = function inject() {\n var _this = this;\n invariant$1(!this._injected, \"sheet already injected\");\n this._injected = true;\n if (typeof window !== \"undefined\" && this._optimizeForSpeed) {\n this._tags[0] = this.makeStyleTag(this._name);\n this._optimizeForSpeed = \"insertRule\" in this.getSheet();\n if (!this._optimizeForSpeed) {\n if (!isProd) {\n console.warn(\"StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.\");\n }\n this.flush();\n this._injected = true;\n }\n return;\n }\n this._serverSheet = {\n cssRules: [],\n insertRule: function(rule, index) {\n if (typeof index === \"number\") {\n _this._serverSheet.cssRules[index] = {\n cssText: rule\n };\n } else {\n _this._serverSheet.cssRules.push({\n cssText: rule\n });\n }\n return index;\n },\n deleteRule: function(index) {\n _this._serverSheet.cssRules[index] = null;\n }\n };\n };\n _proto.getSheetForTag = function getSheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n }\n // this weirdness brought to you by firefox\n for(var i = 0; i < document.styleSheets.length; i++){\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n };\n _proto.getSheet = function getSheet() {\n return this.getSheetForTag(this._tags[this._tags.length - 1]);\n };\n _proto.insertRule = function insertRule(rule, index) {\n invariant$1(isString(rule), \"`insertRule` accepts only strings\");\n if (typeof window === \"undefined\") {\n if (typeof index !== \"number\") {\n index = this._serverSheet.cssRules.length;\n }\n this._serverSheet.insertRule(rule, index);\n return this._rulesCount++;\n }\n if (this._optimizeForSpeed) {\n var sheet = this.getSheet();\n if (typeof index !== \"number\") {\n index = sheet.cssRules.length;\n }\n // this weirdness for perf, and chrome's weird bug\n // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n return -1;\n }\n } else {\n var insertionPoint = this._tags[index];\n this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));\n }\n return this._rulesCount++;\n };\n _proto.replaceRule = function replaceRule(index, rule) {\n if (this._optimizeForSpeed || typeof window === \"undefined\") {\n var sheet = typeof window !== \"undefined\" ? this.getSheet() : this._serverSheet;\n if (!rule.trim()) {\n rule = this._deletedRulePlaceholder;\n }\n if (!sheet.cssRules[index]) {\n // @TBD Should we throw an error?\n return index;\n }\n sheet.deleteRule(index);\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n // In order to preserve the indices we insert a deleteRulePlaceholder\n sheet.insertRule(this._deletedRulePlaceholder, index);\n }\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"old rule at index `\" + index + \"` not found\");\n tag.textContent = rule;\n }\n return index;\n };\n _proto.deleteRule = function deleteRule(index) {\n if (typeof window === \"undefined\") {\n this._serverSheet.deleteRule(index);\n return;\n }\n if (this._optimizeForSpeed) {\n this.replaceRule(index, \"\");\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"rule at index `\" + index + \"` not found\");\n tag.parentNode.removeChild(tag);\n this._tags[index] = null;\n }\n };\n _proto.flush = function flush() {\n this._injected = false;\n this._rulesCount = 0;\n if (typeof window !== \"undefined\") {\n this._tags.forEach(function(tag) {\n return tag && tag.parentNode.removeChild(tag);\n });\n this._tags = [];\n } else {\n // simpler on server\n this._serverSheet.cssRules = [];\n }\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n if (typeof window === \"undefined\") {\n return this._serverSheet.cssRules;\n }\n return this._tags.reduce(function(rules, tag) {\n if (tag) {\n rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {\n return rule.cssText === _this._deletedRulePlaceholder ? null : rule;\n }));\n } else {\n rules.push(null);\n }\n return rules;\n }, []);\n };\n _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {\n if (cssString) {\n invariant$1(isString(cssString), \"makeStyleTag accepts only strings as second parameter\");\n }\n var tag = document.createElement(\"style\");\n if (this._nonce) tag.setAttribute(\"nonce\", this._nonce);\n tag.type = \"text/css\";\n tag.setAttribute(\"data-\" + name, \"\");\n if (cssString) {\n tag.appendChild(document.createTextNode(cssString));\n }\n var head = document.head || document.getElementsByTagName(\"head\")[0];\n if (relativeToTag) {\n head.insertBefore(tag, relativeToTag);\n } else {\n head.appendChild(tag);\n }\n return tag;\n };\n _createClass(StyleSheet, [\n {\n key: \"length\",\n get: function get() {\n return this._rulesCount;\n }\n }\n ]);\n return StyleSheet;\n}();\nfunction invariant$1(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheet: \" + message + \".\");\n }\n}\n\nfunction hash(str) {\n var _$hash = 5381, i = str.length;\n while(i){\n _$hash = _$hash * 33 ^ str.charCodeAt(--i);\n }\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;\n}\nvar stringHash = hash;\n\nvar sanitize = function(rule) {\n return rule.replace(/\\/style/gi, \"\\\\/style\");\n};\nvar cache = {};\n/**\n * computeId\n *\n * Compute and memoize a jsx id from a basedId and optionally props.\n */ function computeId(baseId, props) {\n if (!props) {\n return \"jsx-\" + baseId;\n }\n var propsToString = String(props);\n var key = baseId + propsToString;\n if (!cache[key]) {\n cache[key] = \"jsx-\" + stringHash(baseId + \"-\" + propsToString);\n }\n return cache[key];\n}\n/**\n * computeSelector\n *\n * Compute and memoize dynamic selectors.\n */ function computeSelector(id, css) {\n var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;\n // Sanitize SSR-ed CSS.\n // Client side code doesn't need to be sanitized since we use\n // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).\n if (typeof window === \"undefined\") {\n css = sanitize(css);\n }\n var idcss = id + css;\n if (!cache[idcss]) {\n cache[idcss] = css.replace(selectoPlaceholderRegexp, id);\n }\n return cache[idcss];\n}\n\nfunction mapRulesToStyle(cssRules, options) {\n if (options === void 0) options = {};\n return cssRules.map(function(args) {\n var id = args[0];\n var css = args[1];\n return /*#__PURE__*/ React__default[\"default\"].createElement(\"style\", {\n id: \"__\" + id,\n // Avoid warnings upon render with a key\n key: \"__\" + id,\n nonce: options.nonce ? options.nonce : undefined,\n dangerouslySetInnerHTML: {\n __html: css\n }\n });\n });\n}\nvar StyleSheetRegistry = /*#__PURE__*/ function() {\n function StyleSheetRegistry(param) {\n var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;\n this._sheet = styleSheet || new StyleSheet({\n name: \"styled-jsx\",\n optimizeForSpeed: optimizeForSpeed\n });\n this._sheet.inject();\n if (styleSheet && typeof optimizeForSpeed === \"boolean\") {\n this._sheet.setOptimizeForSpeed(optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n }\n var _proto = StyleSheetRegistry.prototype;\n _proto.add = function add(props) {\n var _this = this;\n if (undefined === this._optimizeForSpeed) {\n this._optimizeForSpeed = Array.isArray(props.children);\n this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n if (typeof window !== \"undefined\" && !this._fromServer) {\n this._fromServer = this.selectFromServer();\n this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {\n acc[tagName] = 0;\n return acc;\n }, {});\n }\n var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;\n // Deduping: just increase the instances count.\n if (styleId in this._instancesCounts) {\n this._instancesCounts[styleId] += 1;\n return;\n }\n var indices = rules.map(function(rule) {\n return _this._sheet.insertRule(rule);\n })// Filter out invalid rules\n .filter(function(index) {\n return index !== -1;\n });\n this._indices[styleId] = indices;\n this._instancesCounts[styleId] = 1;\n };\n _proto.remove = function remove(props) {\n var _this = this;\n var styleId = this.getIdAndRules(props).styleId;\n invariant(styleId in this._instancesCounts, \"styleId: `\" + styleId + \"` not found\");\n this._instancesCounts[styleId] -= 1;\n if (this._instancesCounts[styleId] < 1) {\n var tagFromServer = this._fromServer && this._fromServer[styleId];\n if (tagFromServer) {\n tagFromServer.parentNode.removeChild(tagFromServer);\n delete this._fromServer[styleId];\n } else {\n this._indices[styleId].forEach(function(index) {\n return _this._sheet.deleteRule(index);\n });\n delete this._indices[styleId];\n }\n delete this._instancesCounts[styleId];\n }\n };\n _proto.update = function update(props, nextProps) {\n this.add(nextProps);\n this.remove(props);\n };\n _proto.flush = function flush() {\n this._sheet.flush();\n this._sheet.inject();\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {\n return [\n styleId,\n _this._fromServer[styleId]\n ];\n }) : [];\n var cssRules = this._sheet.cssRules();\n return fromServer.concat(Object.keys(this._indices).map(function(styleId) {\n return [\n styleId,\n _this._indices[styleId].map(function(index) {\n return cssRules[index].cssText;\n }).join(_this._optimizeForSpeed ? \"\" : \"\\n\")\n ];\n })// filter out empty rules\n .filter(function(rule) {\n return Boolean(rule[1]);\n }));\n };\n _proto.styles = function styles(options) {\n return mapRulesToStyle(this.cssRules(), options);\n };\n _proto.getIdAndRules = function getIdAndRules(props) {\n var css = props.children, dynamic = props.dynamic, id = props.id;\n if (dynamic) {\n var styleId = computeId(id, dynamic);\n return {\n styleId: styleId,\n rules: Array.isArray(css) ? css.map(function(rule) {\n return computeSelector(styleId, rule);\n }) : [\n computeSelector(styleId, css)\n ]\n };\n }\n return {\n styleId: computeId(id),\n rules: Array.isArray(css) ? css : [\n css\n ]\n };\n };\n /**\n * selectFromServer\n *\n * Collects style tags from the document with id __jsx-XXX\n */ _proto.selectFromServer = function selectFromServer() {\n var elements = Array.prototype.slice.call(document.querySelectorAll('[id^=\"__jsx-\"]'));\n return elements.reduce(function(acc, element) {\n var id = element.id.slice(2);\n acc[id] = element;\n return acc;\n }, {});\n };\n return StyleSheetRegistry;\n}();\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheetRegistry: \" + message + \".\");\n }\n}\nvar StyleSheetContext = /*#__PURE__*/ React.createContext(null);\nStyleSheetContext.displayName = \"StyleSheetContext\";\nfunction createStyleRegistry() {\n return new StyleSheetRegistry();\n}\nfunction StyleRegistry(param) {\n var configuredRegistry = param.registry, children = param.children;\n var rootRegistry = React.useContext(StyleSheetContext);\n var ref = React.useState(function() {\n return rootRegistry || configuredRegistry || createStyleRegistry();\n }), registry = ref[0];\n return /*#__PURE__*/ React__default[\"default\"].createElement(StyleSheetContext.Provider, {\n value: registry\n }, children);\n}\nfunction useStyleRegistry() {\n return React.useContext(StyleSheetContext);\n}\n\n// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.\n// https://github.com/reactwg/react-18/discussions/110\nvar useInsertionEffect = React__default[\"default\"].useInsertionEffect || React__default[\"default\"].useLayoutEffect;\nvar defaultRegistry = typeof window !== \"undefined\" ? createStyleRegistry() : undefined;\nfunction JSXStyle(props) {\n var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();\n // If `registry` does not exist, we do nothing here.\n if (!registry) {\n return null;\n }\n if (typeof window === \"undefined\") {\n registry.add(props);\n return null;\n }\n useInsertionEffect(function() {\n registry.add(props);\n return function() {\n registry.remove(props);\n };\n // props.children can be string[], will be striped since id is identical\n }, [\n props.id,\n String(props.dynamic)\n ]);\n return null;\n}\nJSXStyle.dynamic = function(info) {\n return info.map(function(tagInfo) {\n var baseId = tagInfo[0];\n var props = tagInfo[1];\n return computeId(baseId, props);\n }).join(\" \");\n};\n\nexports.StyleRegistry = StyleRegistry;\nexports.createStyleRegistry = createStyleRegistry;\nexports.style = JSXStyle;\nexports.useStyleRegistry = useStyleRegistry;\n","module.exports = require('./dist/index').style\n"],"names":["timeAgo","dateStr","diff","Date","now","replace","getTime","s","Math","floor","statusColor","status","hasSse","formatUptime","seconds","h","m","DEFAULTS","nodes","title","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","size","width","height","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","className","role","href","label","onClick","NodesEmptyState","hint","global_count","fetcher","url","res","fetch","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","count","source","useStats","stats","ok","useLicense","license","useMessages","useNodeSession","alias","session","inbox","sse","React","_interopDefaultLegacy","e","React__default","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","isProd","process","env","isString","o","call","StyleSheet","param","ref","_name","name","_optimizeForSpeed","optimizeForSpeed","invariant$1","_deletedRulePlaceholder","_serverSheet","undefined","_tags","_injected","_rulesCount","node","document","querySelector","_nonce","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","_this","cssRules","insertRule","rule","index","cssText","push","deleteRule","getSheetForTag","tag","sheet","styleSheets","ownerNode","getSheet","insertionPoint","replaceRule","trim","console","warn","makeStyleTag","cssString","relativeToTag","createElement","setAttribute","type","appendChild","createTextNode","head","getElementsByTagName","insertBefore","get","condition","message","hash","str","_$hash","charCodeAt","stringHash","sanitize","cache","computeId","baseId","propsToString","String","computeSelector","id","css","selectoPlaceholderRegexp","idcss","mapRulesToStyle","options","map","args","nonce","dangerouslySetInnerHTML","__html","StyleSheetRegistry","_styleSheet","styleSheet","_sheet","_fromServer","_indices","_instancesCounts","add","Array","isArray","children","getIdAndRules","styleId","rules","indices","filter","remove","invariant","tagFromServer","parentNode","removeChild","forEach","update","nextProps","fromServer","keys","concat","join","Boolean","styles","dynamic","selectFromServer","elements","slice","querySelectorAll","reduce","acc","element","StyleSheetContext","createContext","displayName","createStyleRegistry","StyleRegistry","configuredRegistry","registry","rootRegistry","useContext","useState","Provider","value","useStyleRegistry","useInsertionEffect","useLayoutEffect","defaultRegistry","JSXStyle","info","tagInfo","exports","style","module"],"mappings":"kIAkBO,SAASa,AAAaC,CAAe,EAC1C,IAAMC,EAAIP,KAAKC,KAAK,CAACK,EAAU,MACzBE,EAAIR,KAAKC,KAAK,CAAEK,EAAU,KAAQ,WAC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AEA8J,EAAQf,aAAa,CAhDrB,EAgDwBA,OAhDDzH,AAAdyH,CAAmB,EACxB,IAAIC,EAAqB1H,EAAM2H,QAAQ,CAAElC,EAAWzF,EAAMyF,QAAQ,CAC9DmC,EAAexJ,EAAMyJ,UAAU,CAACR,GAGhCM,EAAW1H,AAFL7B,EAAM0J,QAAQ,CAAC,WACrB,OAAOF,GAAgBF,GAAsBF,GACjD,EAAkB,CAAC,EAAE,CACrB,OAAqBjJ,AAAd,EAA6B,OAAU,CAACsE,CAA7B,GAAiB,SAAyB,CAACwE,EAAkBU,QAAQ,CAAE,CACrFC,MAAOL,CACX,EAAGlC,EACP,EAwCA+C,EAAQhB,mBAAmB,CAAGA,EAC9BgB,EAAQC,KAAK,CAAGJ,EAChBG,EAAQP,gBAAgB,CAAGA,mBClf3BS,EAAOF,OAAO,CAAG,EAAA,CAAA,CAAA,OAAwBC,KAAK","ignoreList":[3,4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},43515,a=>{"use strict";a.s(["formatUptime",0,function(a){let b=Math.floor(a/3600),c=Math.floor(a%3600/60);return b>0?`${b}h ${c}m`:`${c}m`},"timeAgo",0,function(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}])},54826,(a,b,c)=>{},15299,(a,b,c)=>{a.r(54826);var d=a.r(72131),e=d&&"object"==typeof d&&"default"in d?d:{default:d},f="u">typeof process&&process.env&&!0,g=function(a){return"[object String]"===Object.prototype.toString.call(a)},h=function(){function a(a){var b=void 0===a?{}:a,c=b.name,d=void 0===c?"stylesheet":c,e=b.optimizeForSpeed,h=void 0===e?f:e;i(g(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",i("boolean"==typeof h,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=h,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var b,c=a.prototype;return c.setOptimizeForSpeed=function(a){i("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),i(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},c.isOptimizeForSpeed=function(){return this._optimizeForSpeed},c.inject=function(){var a=this;i(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(b,c){return"number"==typeof c?a._serverSheet.cssRules[c]={cssText:b}:a._serverSheet.cssRules.push({cssText:b}),c},deleteRule:function(b){a._serverSheet.cssRules[b]=null}}},c.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].ownerNode===a)return document.styleSheets[b]},c.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},c.insertRule=function(a,b){return i(g(a),"`insertRule` accepts only strings"),"number"!=typeof b&&(b=this._serverSheet.cssRules.length),this._serverSheet.insertRule(a,b),this._rulesCount++},c.replaceRule=function(a,b){this._optimizeForSpeed;var c=this._serverSheet;if(b.trim()||(b=this._deletedRulePlaceholder),!c.cssRules[a])return a;c.deleteRule(a);try{c.insertRule(b,a)}catch(d){f||console.warn("StyleSheet: illegal rule: \n\n"+b+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),c.insertRule(this._deletedRulePlaceholder,a)}return a},c.deleteRule=function(a){this._serverSheet.deleteRule(a)},c.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},c.cssRules=function(){return this._serverSheet.cssRules},c.makeStyleTag=function(a,b,c){b&&i(g(b),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),b&&d.appendChild(document.createTextNode(b));var e=document.head||document.getElementsByTagName("head")[0];return c?e.insertBefore(d,c):e.appendChild(d),d},b=[{key:"length",get:function(){return this._rulesCount}}],function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}(a.prototype,b),a}();function i(a,b){if(!a)throw Error("StyleSheet: "+b+".")}var j=function(a){for(var b=5381,c=a.length;c;)b=33*b^a.charCodeAt(--c);return b>>>0},k={};function l(a,b){if(!b)return"jsx-"+a;var c=String(b),d=a+c;return k[d]||(k[d]="jsx-"+j(a+"-"+c)),k[d]}function m(a,b){var c=a+(b=b.replace(/\/style/gi,"\\/style"));return k[c]||(k[c]=b.replace(/__jsx-style-dynamic-selector/g,a)),k[c]}var n=function(){function a(a){var b=void 0===a?{}:a,c=b.styleSheet,d=void 0===c?null:c,e=b.optimizeForSpeed,f=void 0!==e&&e;this._sheet=d||new h({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var b=a.prototype;return b.add=function(a){var b=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var c=this.getIdAndRules(a),d=c.styleId,e=c.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=e.map(function(a){return b._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},b.remove=function(a){var b=this,c=this.getIdAndRules(a).styleId;if(function(a,b){if(!a)throw Error("StyleSheetRegistry: "+b+".")}(c in this._instancesCounts,"styleId: `"+c+"` not found"),this._instancesCounts[c]-=1,this._instancesCounts[c]<1){var d=this._fromServer&&this._fromServer[c];d?(d.parentNode.removeChild(d),delete this._fromServer[c]):(this._indices[c].forEach(function(a){return b._sheet.deleteRule(a)}),delete this._indices[c]),delete this._instancesCounts[c]}},b.update=function(a,b){this.add(b),this.remove(a)},b.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},b.cssRules=function(){var a=this,b=this._fromServer?Object.keys(this._fromServer).map(function(b){return[b,a._fromServer[b]]}):[],c=this._sheet.cssRules();return b.concat(Object.keys(this._indices).map(function(b){return[b,a._indices[b].map(function(a){return c[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},b.styles=function(a){var b,c;return b=this.cssRules(),void 0===(c=a)&&(c={}),b.map(function(a){var b=a[0],d=a[1];return e.default.createElement("style",{id:"__"+b,key:"__"+b,nonce:c.nonce?c.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},b.getIdAndRules=function(a){var b=a.children,c=a.dynamic,d=a.id;if(c){var e=l(d,c);return{styleId:e,rules:Array.isArray(b)?b.map(function(a){return m(e,a)}):[m(e,b)]}}return{styleId:l(d),rules:Array.isArray(b)?b:[b]}},b.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,b){return a[b.id.slice(2)]=b,a},{})},a}(),o=d.createContext(null);function p(){return new n}function q(){return d.useContext(o)}function r(a){var b=q();return b&&b.add(a),null}o.displayName="StyleSheetContext",e.default.useInsertionEffect||e.default.useLayoutEffect,r.dynamic=function(a){return a.map(function(a){return l(a[0],a[1])}).join(" ")},c.StyleRegistry=function(a){var b=a.registry,c=a.children,f=d.useContext(o),g=d.useState(function(){return f||b||p()})[0];return e.default.createElement(o.Provider,{value:g},c)},c.createStyleRegistry=p,c.style=r,c.useStyleRegistry=q},31626,(a,b,c)=>{b.exports=a.r(15299).style},35131,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(15261),g=a.i(43515);function h({tmuxName:a}){let[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),k=async()=>{g(!0);try{let b=await fetch(`/api/hub/tmux?name=${encodeURIComponent(a)}`),c=await b.json();e(c.output||c.error||"No output")}catch{e("Failed to fetch")}g(!1)};return(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-gray-300",children:["Terminal (",a,")"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{onClick:k,disabled:f,className:"text-xs text-cyan-400 hover:text-cyan-300 disabled:text-gray-600",children:f?"Loading...":"Capture"}),d&&(0,b.jsx)("button",{onClick:()=>j(!i),className:"text-xs text-gray-500 hover:text-gray-300",children:i?"Collapse":"Expand"})]})]}),d&&(0,b.jsx)("pre",{className:`text-[11px] text-green-300 bg-[#050510] rounded-lg px-3 py-2 border border-[#1a1a2a] overflow-x-auto whitespace-pre font-mono ${i?"max-h-96":"max-h-32"} overflow-y-auto`,children:d}),!d&&(0,b.jsx)("p",{className:"text-xs text-gray-600",children:"Click Capture to view terminal output"})]})}function i(){let a=(0,d.useSearchParams)().get("alias")||"",[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)([]),[k,l]=(0,c.useState)(0),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(!1),s=(0,c.useCallback)(async()=>{if(a)try{let b=await fetch(`/api/hub/session?alias=${encodeURIComponent(a)}`),c=await b.json();c.session&&g(c.session),c.inbox&&i(c.inbox),l(c.sse||0),n("")}catch(a){n(a instanceof Error?a.message:"fetch failed")}},[a]);(0,c.useEffect)(()=>{s();let a=setInterval(s,5e3);return()=>clearInterval(a)},[s]);let[t,u]=(0,c.useState)(""),v=async()=>{if(o.trim()&&a){r(!0),u("");try{let b=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:a,task:o})}),c=await b.json();c.ok?(p(""),setTimeout(s,2e3)):u(c.error||"Send failed")}catch(a){u(a instanceof Error?a.message:"Send failed")}r(!1)}};if(!a)return(0,b.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono flex items-center justify-center",children:(0,b.jsxs)("p",{className:"text-gray-500",children:["No alias specified. ",(0,b.jsx)(e.default,{href:"/",className:"text-blue-400 hover:underline",children:"Back to dashboard"})]})});let w=f?.status==="working"?"text-green-400":f?.status==="idle"?"text-blue-400":"text-gray-500";return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,b.jsx)(e.default,{href:"/nodes",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Nodes"}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("span",{className:`inline-block w-3 h-3 rounded-full ${k>0?f?.status==="working"?"bg-green-500 animate-pulse":"bg-emerald-400":"bg-gray-500"}`}),(0,b.jsx)("h1",{className:"text-2xl font-bold text-white",children:a}),(0,b.jsx)("span",{className:`text-sm ${w}`,children:f?.status||"unknown"})]})]}),m&&(0,b.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:m}),(0,b.jsx)(j,{alias:a,session:f,sse:k,sendMsg:o,setSendMsg:p,sending:q,sendTask:v,sendError:t})]})}function j({alias:a,session:d,sse:e,sendMsg:g,setSendMsg:i,sending:k,sendTask:m,sendError:n}){let[o,p]=(0,c.useState)("chat"),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{"events"!==o||s||fetch("/api/hub/task-events?limit=50").then(a=>a.json()).then(a=>{r(a.events||[]),t(!0)}).catch(()=>t(!0))},[o,s]),(0,b.jsxs)("div",{className:"bg-[#0d0d1a] border border-[#2a2a4a] rounded-xl overflow-hidden h-[calc(100vh-140px)] flex flex-col",children:[(0,b.jsx)("div",{className:"flex border-b border-[#2a2a4a] bg-[#0a0a15] shrink-0",children:["chat","events","info"].map(a=>(0,b.jsx)("button",{onClick:()=>p(a),className:`px-5 py-3 text-sm font-medium border-b-2 transition-colors ${o===a?"border-cyan-400 text-cyan-300":"border-transparent text-gray-500 hover:text-gray-300"}`,children:"chat"===a?"💬 Chat":"events"===a?"📋 Events":"📊 Info"},a))}),(0,b.jsxs)("div",{className:"flex-1 overflow-hidden",children:["chat"===o&&(0,b.jsx)(f.TaskChatPanel,{alias:a,onClose:()=>{},inline:!0}),"events"===o&&(0,b.jsx)(l,{events:q,loading:!s}),"info"===o&&(0,b.jsxs)("div",{className:"p-4 overflow-y-auto h-full space-y-4 max-w-2xl",children:[(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Node Info"}),(0,b.jsx)("div",{className:"space-y-2 text-xs",children:[{label:"Node ID",value:d?.node_id,alwaysShow:!0},{label:"Session ID",value:d?.session_id,alwaysShow:!0},{label:"Resume ID",value:d?.resume_id,alwaysShow:!0},{label:"Alias",value:d?.alias,alwaysShow:!0},{label:"Agent",value:d?.agent,alwaysShow:!0},{label:"Model",value:d?.model,alwaysShow:!0},{label:"Version",value:d?.version},{label:"Server",value:d?.server,alwaysShow:!0},{label:"Hostname",value:d?.hostname,alwaysShow:!0},{label:"IP",value:d?.ip,alwaysShow:!0},{label:"Project",value:d?.project_dir},{label:"Config",value:d?.config_path,alwaysShow:!0},{label:"Channels",value:d?.channels?.length?Array.isArray(d.channels)?d.channels.join(", "):d.channels:null,alwaysShow:!0},{label:"Tmux",value:d?.tmux_name},{label:"SSE",value:e>0?`Connected (${e})`:"Disconnected",alwaysShow:!0},{label:"Progress",value:d?.progress?`${d.progress}%`:null},{label:"Score",value:d?.score},{label:"Last Seen",value:d?.last_seen_at,alwaysShow:!0},{label:"Registered",value:d?.registered_at,alwaysShow:!0},{label:"Updated",value:d?.updated_at,alwaysShow:!0}].map(({label:a,value:c,alwaysShow:d})=>c||d?(0,b.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,b.jsx)("span",{className:"text-gray-500 shrink-0",children:a}),(0,b.jsx)("span",{className:"text-gray-300 truncate max-w-[200px]",title:c?String(c):"--",children:c?String(c):"--"})]},a):null)})]}),d?.task&&(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Current Task"}),(0,b.jsx)("p",{className:"text-xs text-gray-400 whitespace-pre-wrap",children:d.task})]}),d?.output&&(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Last Output"}),(0,b.jsx)("p",{className:"text-xs text-gray-400 whitespace-pre-wrap max-h-48 overflow-y-auto",children:d.output})]}),(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-2",children:"Send Task"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:g,onChange:a=>i(a.target.value),onKeyDown:a=>"Enter"===a.key&&m(),placeholder:`Send task to ${a}...`,className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-blue-500 focus:outline-none"}),(0,b.jsx)("button",{onClick:m,disabled:k||!g.trim(),className:"px-3 py-2 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-700 text-white text-xs rounded transition-colors",children:k?"...":"Send"})]}),n&&(0,b.jsx)("div",{className:"mt-2 text-xs text-red-400",children:n})]}),d?.tmux_name&&(0,b.jsx)(h,{tmuxName:d.tmux_name})]})]})]})}let k={delivered:{dot:"bg-blue-400",line:"bg-blue-500/30",icon:"📬"},acked:{dot:"bg-yellow-400",line:"bg-yellow-500/30",icon:"✅"},running:{dot:"bg-green-400",line:"bg-green-500/30",icon:"⚡"},replied:{dot:"bg-purple-400",line:"bg-purple-500/30",icon:"💬"},failed:{dot:"bg-red-400",line:"bg-red-500/30",icon:"❌"},created:{dot:"bg-gray-400",line:"bg-gray-500/30",icon:"📝"}};function l({events:a,loading:c}){if(c)return(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)("div",{className:"w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})});if(0===a.length)return(0,b.jsx)("div",{className:"text-center py-12 text-gray-600 text-xs",children:"No task events yet"});let d=new Map;return a.forEach(a=>{let b=a.task_id||`ungrouped-${a.id}`,c=d.get(b)||[];c.push(a),d.set(b,c)}),(0,b.jsx)("div",{className:"p-4 overflow-y-auto h-full space-y-4",children:[...d.entries()].map(([a,c])=>(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsxs)("div",{className:"text-[10px] text-gray-600 mb-3 truncate",children:["Task: ",a.slice(0,20),"..."]}),(0,b.jsxs)("div",{className:"relative pl-6",children:[(0,b.jsx)("div",{className:"absolute left-[9px] top-2 bottom-2 w-0.5 bg-[#1a1a2a]"}),c.map((a,c)=>{let d=k[a.to_status]||k.created;return(0,b.jsxs)("div",{className:"relative pb-4 last:pb-0",children:[(0,b.jsx)("div",{className:`absolute -left-6 top-0.5 w-[18px] h-[18px] rounded-full ${d.dot} flex items-center justify-center text-[9px] z-10 border-2 border-[#111128]`,children:d.icon.length<=2?d.icon:""}),(0,b.jsxs)("div",{className:"ml-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:`text-xs font-medium ${"failed"===a.to_status?"text-red-400":"replied"===a.to_status?"text-purple-400":"text-gray-300"}`,children:a.event_type}),a.from_status&&(0,b.jsxs)("span",{className:"text-[10px] text-gray-600",children:[a.from_status," → ",a.to_status]}),(0,b.jsx)("span",{className:"text-[10px] text-gray-600 ml-auto",children:(0,g.timeAgo)(a.created_at)})]}),a.detail&&(0,b.jsxs)("div",{className:"text-[11px] text-gray-500 mt-0.5 truncate",children:[a.detail.slice(0,50),a.detail.length>50?"...":""]})]})]},a.id)})]})]},a))})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading..."}),children:(0,b.jsx)(i,{})})}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0nrckjd._.js.map
|