@sleep2agi/agent-network-dashboard 0.5.7-preview.1 → 0.5.7-preview.2
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 +59 -44
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +15 -15
- package/.next/server/app/admin.segments/_full.segment.rsc +15 -15
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +8 -8
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
- package/.next/server/app/api/hub/session/route.js +1 -1
- package/.next/server/app/api/hub/session/route.js.nft.json +1 -1
- package/.next/server/app/api/hub/status/route.js +1 -1
- package/.next/server/app/api/hub/status/route.js.nft.json +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +15 -15
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- 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 +15 -15
- package/.next/server/app/login.segments/_full.segment.rsc +15 -15
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +8 -8
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +15 -15
- package/.next/server/app/logs.segments/_full.segment.rsc +15 -15
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +8 -8
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +15 -15
- package/.next/server/app/messages.segments/_full.segment.rsc +15 -15
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +8 -8
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +15 -15
- package/.next/server/app/node.segments/_full.segment.rsc +15 -15
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +8 -8
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/node.segments/node.segment.rsc +3 -3
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +15 -15
- package/.next/server/app/nodes.segments/_full.segment.rsc +15 -15
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +8 -8
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +15 -15
- package/.next/server/app/server-logs.segments/_full.segment.rsc +15 -15
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +8 -8
- 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/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +2 -2
- package/.next/server/app/servers.rsc +15 -15
- package/.next/server/app/servers.segments/_full.segment.rsc +15 -15
- package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
- package/.next/server/app/servers.segments/_index.segment.rsc +8 -8
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/servers.segments/servers.segment.rsc +3 -3
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +15 -15
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +15 -15
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +15 -15
- package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +15 -15
- package/.next/server/app/tasks.segments/_full.segment.rsc +15 -15
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +8 -8
- 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/[root-of-the-server]__0-29ynz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0-29ynz._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0lhq4ha._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lhq4ha._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +3 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/0561vp5-q5.zp.js +1 -0
- package/.next/static/chunks/08sos26.n11bq.js +1 -0
- package/.next/static/chunks/0a.9~-nf0gpec.js +1 -0
- package/.next/static/chunks/0hxvojbn.tprh.css +1 -0
- package/.next/static/chunks/0im751o4n61c7.js +1 -0
- package/.next/static/chunks/0inql3s9ldyx5.js +1 -0
- package/.next/static/chunks/0jp~cs9-zkmqa.js +4 -0
- package/.next/static/chunks/0ku0fjqlm9mca.js +1 -0
- package/.next/static/chunks/0nqm.7w9_inwd.js +7 -0
- package/.next/static/chunks/0u240x6paxno2.js +1 -0
- package/.next/static/chunks/{0~dcueyvq.4ra.js → 0yyx7754lietg.js} +1 -1
- package/.next/static/chunks/{0oo6ou1f1vfaj.js → 11xnnivocgef4.js} +1 -1
- package/.next/static/chunks/12-6xsdci5.9v.js +1 -0
- package/.next/static/chunks/15qxef.ilfysw.js +4 -0
- package/.next/static/chunks/181u38qblp8lz.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/api/hub/session/route.ts +3 -1
- package/app/api/hub/status/route.ts +3 -0
- package/app/components/AliasAvatar.tsx +22 -0
- package/app/components/TaskChatPanel.tsx +8 -0
- package/app/components/TopoGraph.tsx +23 -0
- package/app/globals.css +24 -0
- package/app/lib/chat-unread.ts +158 -0
- package/app/lib/session-normalize.ts +17 -0
- package/app/lib/vendorIdentity.ts +23 -3
- package/app/node/page.tsx +9 -1
- package/app/nodes/page.tsx +22 -4
- package/package.json +1 -1
- package/public/vendors/grok.svg +5 -0
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/config.json +0 -7
- package/.next/server/chunks/[root-of-the-server]__0-g~15e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0-g~15e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0hcnyp.._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0hcnyp.._.js.map +0 -1
- package/.next/static/chunks/0-g7_e.uxknwf.css +0 -1
- package/.next/static/chunks/08kf-.bgs10ze.js +0 -1
- package/.next/static/chunks/0glmrdj9112tc.js +0 -7
- package/.next/static/chunks/0milchnxu3pma.js +0 -1
- package/.next/static/chunks/0ps~rywjn70v6.js +0 -4
- package/.next/static/chunks/0qwqp6ulyj3o6.js +0 -1
- package/.next/static/chunks/0rxrez_cjn.eh.js +0 -1
- package/.next/static/chunks/0uzchut_f9a6m.js +0 -1
- package/.next/static/chunks/0wyjrc0bekhiz.js +0 -1
- package/.next/static/chunks/0x8x.29hkju5a.js +0 -1
- package/.next/static/chunks/174re5ar~kxne.js +0 -1
- package/.next/static/chunks/17r9h6cx1w6q-.js +0 -4
- /package/.next/static/{TvIJHvMV6_ETYDMkMySqd → D1tOdIVZJAhZcHTEAKrHD}/_buildManifest.js +0 -0
- /package/.next/static/{TvIJHvMV6_ETYDMkMySqd → D1tOdIVZJAhZcHTEAKrHD}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{TvIJHvMV6_ETYDMkMySqd → D1tOdIVZJAhZcHTEAKrHD}/_ssgManifest.js +0 -0
|
@@ -70,6 +70,15 @@ const OPENAI_VENDOR: VendorIdentity = {
|
|
|
70
70
|
// badge. Vincent-authorized 2026-05-21 to use real vendor marks.
|
|
71
71
|
logo: '/vendors/openai.svg',
|
|
72
72
|
};
|
|
73
|
+
const GROK_VENDOR: VendorIdentity = {
|
|
74
|
+
id: 'grok',
|
|
75
|
+
label: 'Grok Build',
|
|
76
|
+
mono: { bg: 'hsl(150 14% 16%)', ring: 'hsl(150 48% 42%)', text: 'hsl(150 54% 82%)' },
|
|
77
|
+
initial: 'G',
|
|
78
|
+
// Local Grok Build mark for network graph avatars; keeps grok-build-acp
|
|
79
|
+
// nodes out of the generic unknown-vendor fallback.
|
|
80
|
+
logo: '/vendors/grok.svg',
|
|
81
|
+
};
|
|
73
82
|
|
|
74
83
|
// Ordered prefix rules — first match wins. `test` runs against a lowercased
|
|
75
84
|
// model id. Keep the most specific prefixes first.
|
|
@@ -77,6 +86,7 @@ const VENDOR_RULES: Array<{ test: (m: string) => boolean; vendor: VendorIdentity
|
|
|
77
86
|
{ test: (m) => m.startsWith('intern'), vendor: INTERN_VENDOR },
|
|
78
87
|
{ test: (m) => m.startsWith('minimax'), vendor: MINIMAX_VENDOR },
|
|
79
88
|
{ test: (m) => m.startsWith('claude'), vendor: ANTHROPIC_VENDOR },
|
|
89
|
+
{ test: (m) => m.startsWith('grok') || m.startsWith('xai'), vendor: GROK_VENDOR },
|
|
80
90
|
{
|
|
81
91
|
test: (m) => m.startsWith('gpt') || m.startsWith('codex') || m.startsWith('o1') || m.startsWith('o3') || m.startsWith('o4'),
|
|
82
92
|
vendor: OPENAI_VENDOR,
|
|
@@ -99,6 +109,9 @@ const RUNTIME_VENDOR: Record<string, VendorIdentity> = {
|
|
|
99
109
|
'claude-code-cli': ANTHROPIC_VENDOR,
|
|
100
110
|
'claude-agent-sdk': ANTHROPIC_VENDOR,
|
|
101
111
|
'codex-sdk': OPENAI_VENDOR,
|
|
112
|
+
'grok-build-acp': GROK_VENDOR,
|
|
113
|
+
'grok-build': GROK_VENDOR,
|
|
114
|
+
grok: GROK_VENDOR,
|
|
102
115
|
};
|
|
103
116
|
|
|
104
117
|
/** Resolve a node's vendor identity. Model id wins; when the model is
|
|
@@ -114,11 +127,12 @@ export function vendorForModel(
|
|
|
114
127
|
if (rule.test(m)) return rule.vendor;
|
|
115
128
|
}
|
|
116
129
|
}
|
|
117
|
-
|
|
130
|
+
const rt = runtime?.toLowerCase();
|
|
131
|
+
if (rt && RUNTIME_VENDOR[rt]) return RUNTIME_VENDOR[rt];
|
|
118
132
|
return UNKNOWN_VENDOR;
|
|
119
133
|
}
|
|
120
134
|
|
|
121
|
-
export type Runtime = 'claude-code-cli' | 'codex-sdk' | 'claude-agent-sdk' | 'http-api';
|
|
135
|
+
export type Runtime = 'claude-code-cli' | 'codex-sdk' | 'claude-agent-sdk' | 'grok-build-acp' | 'http-api';
|
|
122
136
|
|
|
123
137
|
export interface RuntimeIdentity {
|
|
124
138
|
label: string;
|
|
@@ -147,6 +161,12 @@ const RUNTIME_MAP: Record<Runtime, RuntimeIdentity> = {
|
|
|
147
161
|
iconPath: 'M4 7h16v10H4z M8 11h8 M8 14h5',
|
|
148
162
|
color: '#34d399',
|
|
149
163
|
},
|
|
164
|
+
// Grok Build ACP bridge
|
|
165
|
+
'grok-build-acp': {
|
|
166
|
+
label: 'Grok Build ACP',
|
|
167
|
+
iconPath: 'M12 3l2.1 6.2H21l-5.5 4 2.1 6.8L12 15.9 6.4 20l2.1-6.8L3 9.2h6.9L12 3z',
|
|
168
|
+
color: '#22c55e',
|
|
169
|
+
},
|
|
150
170
|
// cloud / API — non-resident process
|
|
151
171
|
'http-api': {
|
|
152
172
|
label: 'HTTP API',
|
|
@@ -158,7 +178,7 @@ const RUNTIME_MAP: Record<Runtime, RuntimeIdentity> = {
|
|
|
158
178
|
/** Resolve a server runtime string to badge identity. Unknown → null. */
|
|
159
179
|
export function runtimeIdentity(runtime: string | null | undefined): RuntimeIdentity | null {
|
|
160
180
|
if (!runtime) return null;
|
|
161
|
-
return RUNTIME_MAP[runtime as Runtime] ?? null;
|
|
181
|
+
return RUNTIME_MAP[runtime.toLowerCase() as Runtime] ?? null;
|
|
162
182
|
}
|
|
163
183
|
|
|
164
184
|
/** Compact one-line identity for hover / detail surfaces:
|
package/app/node/page.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import { TaskChatPanel } from '../components/TaskChatPanel';
|
|
|
8
8
|
import { timeAgo } from '../components/utils';
|
|
9
9
|
import { AliasAvatar } from '../components/AliasAvatar';
|
|
10
10
|
import { SESSION_STATUS_TEXT_CLASS } from '../lib/status';
|
|
11
|
+
import { useChatUnread } from '../lib/chat-unread';
|
|
11
12
|
|
|
12
13
|
interface SessionDetail {
|
|
13
14
|
resume_id: string;
|
|
@@ -187,8 +188,10 @@ function NodeFullPanel({ alias, session, sse, sendMsg, setSendMsg, sending, send
|
|
|
187
188
|
alias: string; session: any; sse: number; sendMsg: string; setSendMsg: (v: string) => void; sending: boolean; sendTask: () => void; sendError: string;
|
|
188
189
|
}) {
|
|
189
190
|
const [tab, setTab] = useState<'chat' | 'events' | 'info'>('chat');
|
|
191
|
+
const { hasUnread } = useChatUnread();
|
|
190
192
|
const [events, setEvents] = useState<Array<{ id: number; event_type: string; from_status: string; to_status: string; detail: string; created_at: string }>>([]);
|
|
191
193
|
const [eventsLoaded, setEventsLoaded] = useState(false);
|
|
194
|
+
const chatUnread = hasUnread(alias);
|
|
192
195
|
|
|
193
196
|
useEffect(() => {
|
|
194
197
|
if (tab === 'events' && !eventsLoaded) {
|
|
@@ -216,7 +219,12 @@ function NodeFullPanel({ alias, session, sse, sendMsg, setSendMsg, sending, send
|
|
|
216
219
|
<svg className="w-4 h-4 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
|
217
220
|
<path d={t.icon} />
|
|
218
221
|
</svg>
|
|
219
|
-
<span>
|
|
222
|
+
<span className="relative inline-flex items-center gap-2">
|
|
223
|
+
{t.label}
|
|
224
|
+
{t.id === 'chat' && chatUnread && tab !== 'chat' && (
|
|
225
|
+
<span className="inline-block h-2.5 w-2.5 rounded-full bg-red-500" aria-label="Unread chat messages" />
|
|
226
|
+
)}
|
|
227
|
+
</span>
|
|
220
228
|
</button>
|
|
221
229
|
))}
|
|
222
230
|
</div>
|
package/app/nodes/page.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import { EmptyState, NodesEmptyState } from '../components/EmptyState';
|
|
|
8
8
|
import { AliasAvatar } from '../components/AliasAvatar';
|
|
9
9
|
import type { Session } from '../components/types';
|
|
10
10
|
import { SESSION_STATUS_CHIP_CLASS as STATUS_COLORS } from '../lib/status';
|
|
11
|
+
import { useChatUnread } from '../lib/chat-unread';
|
|
11
12
|
|
|
12
13
|
/** Round 81: shorten long server hostnames (Alibaba `iZ…oyZ` style)
|
|
13
14
|
* for table display. Returns the original string unchanged when ≤12
|
|
@@ -23,6 +24,7 @@ type SessionRow = Session & { online: boolean };
|
|
|
23
24
|
export default function NodesPage() {
|
|
24
25
|
const { sessions, isLoading: loading } = useSessions();
|
|
25
26
|
const { health } = useHealth();
|
|
27
|
+
const { hasUnread } = useChatUnread();
|
|
26
28
|
const sseMap = health?.sse_sessions || {};
|
|
27
29
|
// SSE keys are `network_id:alias` since server v0.7+. Look up with the
|
|
28
30
|
// composite key first, fall back to alias-only for legacy hubs.
|
|
@@ -154,6 +156,7 @@ export default function NodesPage() {
|
|
|
154
156
|
{filtered.map(s => {
|
|
155
157
|
const statusKey = s.online ? s.status : 'offline';
|
|
156
158
|
const progress = typeof s.progress === 'number' ? s.progress : 0;
|
|
159
|
+
const unread = hasUnread(s.alias);
|
|
157
160
|
|
|
158
161
|
return (
|
|
159
162
|
<div
|
|
@@ -172,10 +175,14 @@ export default function NodesPage() {
|
|
|
172
175
|
</div>
|
|
173
176
|
)}
|
|
174
177
|
<div className="flex items-start gap-3">
|
|
175
|
-
<
|
|
178
|
+
<div className="relative shrink-0">
|
|
179
|
+
<AliasAvatar alias={s.alias} size={36} />
|
|
180
|
+
{unread && <span className="absolute -right-1 -top-1 h-3 w-3 rounded-full border-2 border-[#111128] bg-red-500" />}
|
|
181
|
+
</div>
|
|
176
182
|
<div className="min-w-0 flex-1">
|
|
177
183
|
<div className="flex items-center gap-2">
|
|
178
184
|
<span className="truncate text-base font-semibold text-white">{s.alias}</span>
|
|
185
|
+
{unread && <span className="shrink-0 rounded-full bg-red-500/15 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-red-300">New</span>}
|
|
179
186
|
<span className={`shrink-0 rounded-md border px-2 py-0.5 text-[10px] uppercase tracking-wide ${STATUS_COLORS[statusKey] || STATUS_COLORS.offline}`}>
|
|
180
187
|
{statusKey}
|
|
181
188
|
</span>
|
|
@@ -221,6 +228,7 @@ export default function NodesPage() {
|
|
|
221
228
|
</div>
|
|
222
229
|
{filtered.map(s => {
|
|
223
230
|
const statusKey = s.online ? s.status : 'offline';
|
|
231
|
+
const unread = hasUnread(s.alias);
|
|
224
232
|
|
|
225
233
|
return (
|
|
226
234
|
<div
|
|
@@ -239,8 +247,12 @@ export default function NodesPage() {
|
|
|
239
247
|
</div>
|
|
240
248
|
<div className="col-span-2 min-w-0">
|
|
241
249
|
<div className="flex items-center gap-2 min-w-0">
|
|
242
|
-
<
|
|
250
|
+
<div className="relative shrink-0">
|
|
251
|
+
<AliasAvatar alias={s.alias} size={20} />
|
|
252
|
+
{unread && <span className="absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full border border-[#111128] bg-red-500" />}
|
|
253
|
+
</div>
|
|
243
254
|
<span className="truncate text-sm font-medium text-white">{s.alias}</span>
|
|
255
|
+
{unread && <span className="shrink-0 rounded-full bg-red-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-red-300">New</span>}
|
|
244
256
|
</div>
|
|
245
257
|
</div>
|
|
246
258
|
<div className="col-span-2 truncate text-xs text-gray-400" title={s.server || ''}>
|
|
@@ -251,9 +263,15 @@ export default function NodesPage() {
|
|
|
251
263
|
</div>
|
|
252
264
|
<div className="sm:hidden space-y-2">
|
|
253
265
|
<div className="flex items-center gap-2.5">
|
|
254
|
-
<
|
|
266
|
+
<div className="relative shrink-0">
|
|
267
|
+
<AliasAvatar alias={s.alias} size={28} />
|
|
268
|
+
{unread && <span className="absolute -right-1 -top-1 h-3 w-3 rounded-full border-2 border-[#111128] bg-red-500" />}
|
|
269
|
+
</div>
|
|
255
270
|
<div className="min-w-0 flex-1">
|
|
256
|
-
<div className="
|
|
271
|
+
<div className="flex items-center gap-2 min-w-0">
|
|
272
|
+
<div className="truncate text-sm font-medium text-white">{s.alias}</div>
|
|
273
|
+
{unread && <span className="shrink-0 rounded-full bg-red-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-red-300">New</span>}
|
|
274
|
+
</div>
|
|
257
275
|
<div className="truncate text-[10px] text-gray-500">{s.agent || '—'} · {timeAgo(s.last_seen_at || s.updated_at)}</div>
|
|
258
276
|
</div>
|
|
259
277
|
<span className={`shrink-0 text-xs px-2 py-0.5 rounded-md border ${STATUS_COLORS[statusKey] || STATUS_COLORS.offline}`}>
|
package/package.json
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Grok Build">
|
|
2
|
+
<rect width="64" height="64" rx="16" fill="#0f1411"/>
|
|
3
|
+
<path d="M46 19.5A22 22 0 1 0 48.5 38h-9.8a12.4 12.4 0 1 1-3-12.8l-9.2 9.2H50V10.9l-4 4z" fill="none" stroke="#35d07f" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M26.5 34.4h23.1" stroke="#e7fff1" stroke-width="5" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
package/.next/cache/.previewinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"previewModeId":"2491ce1f1a20ec70fed7b8e1f82fd16b","previewModeSigningKey":"ac49b9198ce20c2829b5c50998dd1ed21bab0f85ce6200b8efc180c7e1d6fca3","previewModeEncryptionKey":"6241e627345279fcdfaa8a2040a2e17eae48e03328b8f194651562643edf1923","expireAt":1780180987023}
|
package/.next/cache/.rscinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"encryption.key":"MxhnG7zA4gBkur3v+gMXrKkcGVMxOxOSp/oB1oZN+fY=","encryption.expire_at":1780180986942}
|
package/.next/cache/config.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},98319,e=>{"use strict";var t=e.i(76631);function r(){return process.env.COMMHUB_URL||"http://127.0.0.1:9200"}async function a(e,a){let n=`${r()}${e}`,s={},i=a?.headers;if(!i?.Authorization)try{let e=await (0,t.getV3UserToken)();e&&(s={Authorization:`Bearer ${e}`})}catch{}return fetch(n,{...a,headers:{...s,...a?.headers},next:{revalidate:0}})}r(),e.s(["hubFetch",0,a])},15397,e=>{"use strict";var t=e.i(29124),r=e.i(96565),a=e.i(29718),n=e.i(23850),s=e.i(47878),i=e.i(19885),o=e.i(86384),l=e.i(90127),u=e.i(89548),d=e.i(23489),p=e.i(53565),c=e.i(25859),h=e.i(37031),x=e.i(34816),v=e.i(37020),R=e.i(93695);e.i(69409);var g=e.i(56394),f=e.i(76631),m=e.i(98319);async function w(e){let t=await (0,f.requireDashboardAuth)();if(t)return t;let{searchParams:r}=new URL(e.url),a=r.get("alias");if(!a)return Response.json({error:"alias required"},{status:400});try{let e=await (0,m.hubFetch)("/api/status"),t=((await e.json()).sessions||[]).find(e=>e.alias===a),r=await (0,m.hubFetch)("/mcp",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify({jsonrpc:"2.0",id:Date.now(),method:"tools/call",params:{name:"get_inbox",arguments:{alias:a,limit:50}}})}),n=await r.text(),s=n.match(/data:\s*(\{.*\})/),i=s?JSON.parse(s[1]):JSON.parse(n),o=i?.result?.content?.[0]?.text,l=o?JSON.parse(o):{messages:[]},u=await (0,m.hubFetch)("/health"),d=(await u.json()).sse_sessions||{},p=t?.network_id,c=(p?d[`${p}:${a}`]:void 0)??d[a]??0;return Response.json({session:t||null,inbox:l.messages||[],sse:c})}catch(e){return Response.json({error:"failed",detail:e instanceof Error?e.message:String(e)},{status:502})}}e.s(["GET",0,w],45296);var E=e.i(45296);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/hub/session/route",pathname:"/api/hub/session",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/agent-network-dashboard/app/api/hub/session/route.ts",nextConfigOutput:"",userland:E,...{}}),{workAsyncStorage:y,workUnitAsyncStorage:C,serverHooks:A}=b;async function N(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/hub/session/route";f=f.replace(/\/index$/,"")||"/";let m=await b.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:y,parsedUrl:C,isDraftMode:A,prerenderManifest:N,routerServerContext:T,isOnDemandRevalidate:S,revalidateOnlyGenerated:q,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:j}=m,P=(0,o.normalizeAppPath)(f),k=!!(N.dynamicRoutes[P]||N.routes[O]),U=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(k&&!A){let e=!!N.routes[O],t=N.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await U();throw new R.NoFallbackError}}let H=null;!k||b.isDev||A||(H="/index"===(H=O)?"/":H);let M=!0===b.isDev||!k,I=k&&!M;j&&_&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:_,serverActionsManifest:j});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),B=!!(null==T?void 0:T.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,y,N,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:E,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:M,incrementalCache:L,cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,T)},sharedContext:{buildId:w}},J=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(J,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>b.handle(z,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${f}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&S&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(J,V,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[v.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:S})},!1,T),t}},u=await b.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!k)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&k||d.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(J,V,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};B&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof R.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:S})},!1,T),k)throw t;return await (0,c.sendResponse)(J,V,new Response(null,{status:500})),null}}e.s(["handler",0,N,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:C})},"routeModule",0,b,"serverHooks",0,A,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,C],15397)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0-g~15e._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../agent-network-dashboard/app/lib/hub.ts","../../../../agent-network-dashboard/node_modules/next/dist/esm/build/templates/app-route.js","../../../../agent-network-dashboard/app/api/hub/session/route.ts"],"sourcesContent":["import { getV3UserToken } from './dashboard-auth';\n\nfunction getHubUrl() {\n return process.env.COMMHUB_URL || 'http://127.0.0.1:9200';\n}\n\nexport const HUB_URL = getHubUrl();\n\nexport function hubHeaders(): Record<string, string> {\n return {};\n}\n\n/**\n * Fetch from CommHub. Uses the browser session's V3 user token when available.\n * Dashboard is a thin proxy and does not fall back to a service/master token.\n */\nexport async function hubFetch(path: string, init?: RequestInit): Promise<Response> {\n const url = `${getHubUrl()}${path}`;\n\n // Build auth: prefer V3 token cookie unless caller supplied Authorization.\n let authHeader: Record<string, string> = {};\n\n // Only try V3 token if no Authorization already in init.headers\n const initHeaders = init?.headers as Record<string, string> | undefined;\n if (!initHeaders?.['Authorization']) {\n try {\n const userToken = await getV3UserToken();\n if (userToken) {\n authHeader = { 'Authorization': `Bearer ${userToken}` };\n }\n } catch {\n // cookies() not available in this context, ignore\n }\n\n }\n\n return fetch(url, {\n ...init,\n headers: { ...authHeader, ...init?.headers },\n next: { revalidate: 0 },\n } as RequestInit);\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/session/route\",\n pathname: \"/api/hub/session\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/agent-network-dashboard/app/api/hub/session/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/hub/session/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { requireDashboardAuth } from '@/app/lib/dashboard-auth';\nimport { hubFetch } from '@/app/lib/hub';\n\nexport async function GET(req: Request) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { searchParams } = new URL(req.url);\n const alias = searchParams.get('alias');\n if (!alias) return Response.json({ error: 'alias required' }, { status: 400 });\n\n try {\n // Get session status\n const statusRes = await hubFetch('/api/status');\n const statusData = await statusRes.json();\n const session = (statusData.sessions || []).find((s: { alias: string }) => s.alias === alias);\n\n // Get inbox messages for this session (sent TO this session)\n const inboxRes = await hubFetch('/mcp', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', 'Accept': 'application/json, text/event-stream' },\n body: JSON.stringify({\n jsonrpc: '2.0', id: Date.now(),\n method: 'tools/call',\n params: { name: 'get_inbox', arguments: { alias, limit: 50 } }\n }),\n });\n const inboxRaw = await inboxRes.text();\n const inboxMatch = inboxRaw.match(/data:\\s*(\\{.*\\})/);\n const inboxData = inboxMatch ? JSON.parse(inboxMatch[1]) : JSON.parse(inboxRaw);\n const inboxContent = inboxData?.result?.content?.[0]?.text;\n const inboxParsed = inboxContent ? JSON.parse(inboxContent) : { messages: [] };\n\n // Get health for SSE info\n const healthRes = await hubFetch('/health');\n const healthData = await healthRes.json();\n // SSE keys are `network_id:alias` since server v0.7+; fall back to alias.\n const sseSessions = healthData.sse_sessions || {};\n const sessionNetworkId = session?.network_id;\n const sseCount = (sessionNetworkId ? sseSessions[`${sessionNetworkId}:${alias}`] : undefined) ?? sseSessions[alias] ?? 0;\n\n return Response.json({\n session: session || null,\n inbox: inboxParsed.messages || [],\n sse: sseCount,\n });\n } catch (e: unknown) {\n return Response.json({ error: 'failed', detail: e instanceof Error ? e.message : String(e) }, { status: 502 });\n }\n}\n"],"names":["getHubUrl","process","env","COMMHUB_URL","HUB_URL","hubHeaders","hubFetch","path","init","url","authHeader","initHeaders","headers","userToken","fetch","next","revalidate","GET","req","authFailure","searchParams","URL","alias","get","Response","json","error","status","statusRes","statusData","content","session","sessions","find","s","inboxRes","method","body","JSON","stringify","jsonrpc","id","Date","now","params","name","arguments","limit","undefined","inboxRaw","text","inboxMatch","match","inboxData","parse","inboxContent","result","inboxParsed","messages","message","healthRes","healthData","sseSessions","sse_sessions","sessionNetworkId","network_id","sseCount","inbox","sse","e","detail","Error","String"],"mappings":"wjCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,SAASA,IACP,OAAOC,QAAQC,GAAG,CAACC,WAAW,EAAI,uBACpC,CAYO,eAAeG,EAASC,CAAY,CAAEC,CAAkB,EAC7D,IAAMC,EAAM,CAAA,EAAGT,IAAAA,EAAcO,EAAAA,CAAM,CAG/BG,EAAqC,CAAC,EAGpCC,EAAcH,GAAMI,QAC1B,GAAI,CAACD,GAAc,UAAD,IAChB,EADiC,CAC7B,CAD+B,AAEjC,IAAME,EAAY,MAAM,CAAA,EAAA,EAAA,cAAA,AAAc,IAClCA,IACFH,EAAa,CAAE,IADF,UACmB,CAAC,OAAO,EAAEG,EAAAA,CAAW,AAAC,EAE1D,CAAE,KAAM,CAER,CAIF,OAAOC,MAAML,EAAK,CAChB,GAAGD,CAAI,CACPI,QAAS,CAAE,GAAGF,CAAU,CAAE,GAAGF,GAAMI,OAAO,AAAC,EAC3CG,KAAM,CAAEC,WAAY,CAAE,CACxB,EACF,CAnCuBhB,kDCNvB,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAA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YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[1]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},98319,e=>{"use strict";var t=e.i(76631);function r(){return process.env.COMMHUB_URL||"http://127.0.0.1:9200"}async function a(e,a){let n=`${r()}${e}`,s={},i=a?.headers;if(!i?.Authorization)try{let e=await (0,t.getV3UserToken)();e&&(s={Authorization:`Bearer ${e}`})}catch{}return fetch(n,{...a,headers:{...s,...a?.headers},next:{revalidate:0}})}r(),e.s(["hubFetch",0,a])},75337,e=>{"use strict";var t=e.i(29124),r=e.i(96565),a=e.i(29718),n=e.i(23850),s=e.i(47878),i=e.i(19885),o=e.i(86384),l=e.i(90127),u=e.i(89548),d=e.i(23489),p=e.i(53565),c=e.i(25859),h=e.i(37031),x=e.i(34816),R=e.i(37020),v=e.i(93695);e.i(69409);var g=e.i(56394),f=e.i(76631),w=e.i(98319);async function m(e){let t=await (0,f.requireDashboardAuth)();if(t)return t;let{searchParams:r}=new URL(e.url),a=r.get("network_id")||"",n=a&&"all"!==a,s=n?`?network_id=${encodeURIComponent(a)}`:"";try{let e=await (0,w.hubFetch)(`/api/status${s}`),t=await e.json();if(n&&Array.isArray(t.sessions)&&0===t.sessions.length)try{let e=await (0,w.hubFetch)("/api/status"),r=await e.json(),n=Array.isArray(r.sessions)?r.sessions.length:0;if(n>0)return Response.json({...t,_hint:{global_count:n,filtered_network:a}})}catch{}return Response.json(t)}catch(e){return Response.json({error:"CommHub unreachable",detail:e instanceof Error?e.message:String(e)},{status:502})}}e.s(["GET",0,m],10800);var y=e.i(10800);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/hub/status/route",pathname:"/api/hub/status",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/agent-network-dashboard/app/api/hub/status/route.ts",nextConfigOutput:"",userland:y,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:C,serverHooks:A}=E;async function _(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/hub/status/route";f=f.replace(/\/index$/,"")||"/";let w=await E.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:b,parsedUrl:C,isDraftMode:A,prerenderManifest:_,routerServerContext:T,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,resolvedPathname:N,clientReferenceManifest:P,serverActionsManifest:S}=w,j=(0,o.normalizeAppPath)(f),O=!!(_.dynamicRoutes[j]||_.routes[N]),U=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(O&&!A){let e=!!_.routes[N],t=_.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await U();throw new v.NoFallbackError}}let H=null;!O||E.isDev||A||(H="/index"===(H=N)?"/":H);let I=!0===E.isDev||!O,M=O&&!I;S&&P&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:P,serverActionsManifest:S});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),B=!!(null==T?void 0:T.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,b,_,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:y,previewProps:_.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:I,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,T)},sharedContext:{buildId:m}},V=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>E.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${f}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&k&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(V,z,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:k})},!1,T),t}},u=await E.handleResponse({req:e,nextConfig:b,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!O)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&O||d.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(V,z,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};B&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:k})},!1,T),O)throw t;return await (0,c.sendResponse)(V,z,new Response(null,{status:500})),null}}e.s(["handler",0,_,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:C})},"routeModule",0,E,"serverHooks",0,A,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,C],75337)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0hcnyp.._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../agent-network-dashboard/app/lib/hub.ts","../../../../agent-network-dashboard/app/api/hub/status/route.ts","../../../../agent-network-dashboard/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { getV3UserToken } from './dashboard-auth';\n\nfunction getHubUrl() {\n return process.env.COMMHUB_URL || 'http://127.0.0.1:9200';\n}\n\nexport const HUB_URL = getHubUrl();\n\nexport function hubHeaders(): Record<string, string> {\n return {};\n}\n\n/**\n * Fetch from CommHub. Uses the browser session's V3 user token when available.\n * Dashboard is a thin proxy and does not fall back to a service/master token.\n */\nexport async function hubFetch(path: string, init?: RequestInit): Promise<Response> {\n const url = `${getHubUrl()}${path}`;\n\n // Build auth: prefer V3 token cookie unless caller supplied Authorization.\n let authHeader: Record<string, string> = {};\n\n // Only try V3 token if no Authorization already in init.headers\n const initHeaders = init?.headers as Record<string, string> | undefined;\n if (!initHeaders?.['Authorization']) {\n try {\n const userToken = await getV3UserToken();\n if (userToken) {\n authHeader = { 'Authorization': `Bearer ${userToken}` };\n }\n } catch {\n // cookies() not available in this context, ignore\n }\n\n }\n\n return fetch(url, {\n ...init,\n headers: { ...authHeader, ...init?.headers },\n next: { revalidate: 0 },\n } as RequestInit);\n}\n","import { requireDashboardAuth } from '@/app/lib/dashboard-auth';\nimport { hubFetch } from '@/app/lib/hub';\n\nexport async function GET(req: Request) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { searchParams } = new URL(req.url);\n const networkId = searchParams.get('network_id') || '';\n // \"all\" or \"\" → no network_id filter (admin sees all)\n const includeFilter = networkId && networkId !== 'all';\n const qs = includeFilter ? `?network_id=${encodeURIComponent(networkId)}` : '';\n\n try {\n const res = await hubFetch(`/api/status${qs}`);\n const data = await res.json();\n\n // If filtered result is empty, fetch global count for empty-state hint\n if (includeFilter && Array.isArray(data.sessions) && data.sessions.length === 0) {\n try {\n const globalRes = await hubFetch('/api/status');\n const globalData = await globalRes.json();\n const globalCount = Array.isArray(globalData.sessions) ? globalData.sessions.length : 0;\n if (globalCount > 0) {\n return Response.json({ ...data, _hint: { global_count: globalCount, filtered_network: networkId } });\n }\n } catch {}\n }\n\n return Response.json(data);\n } catch (e: unknown) {\n return Response.json({ error: 'CommHub unreachable', detail: e instanceof Error ? e.message : String(e) }, { status: 502 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/status/route\",\n pathname: \"/api/hub/status\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/agent-network-dashboard/app/api/hub/status/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/hub/status/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["getHubUrl","process","env","COMMHUB_URL","HUB_URL","hubHeaders","hubFetch","path","init","url","authHeader","initHeaders","headers","userToken","fetch","next","revalidate","GET","req","authFailure","searchParams","URL","networkId","get","includeFilter","qs","encodeURIComponent","res","data","json","Array","isArray","sessions","length","globalRes","globalData","globalCount","Response","_hint","global_count","filtered_network","e","error","detail","Error","message","String","status"],"mappings":"wjCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,SAASA,IACP,OAAOC,QAAQC,GAAG,CAACC,WAAW,EAAI,uBACpC,CAYO,eAAeG,EAASC,CAAY,CAAEC,CAAkB,EAC7D,IAAMC,EAAM,CAAA,EAAGT,IAAAA,EAAcO,EAAAA,CAAM,CAG/BG,EAAqC,CAAC,EAGpCC,EAAcH,GAAMI,QAC1B,GAAI,CAACD,GAAc,UAAD,IAChB,EADiC,CAC7B,CAD+B,AAEjC,IAAME,EAAY,MAAM,CAAA,EAAA,EAAA,cAAc,AAAd,IACpBA,IACFH,EAAa,CAAE,IADF,UACmB,CAAC,OAAO,EAAEG,EAAAA,CAAW,CAAC,CAE1D,CAAE,KAAM,CAER,CAIF,OAAOC,MAAML,EAAK,CAChB,GAAGD,CAAI,CACPI,QAAS,CAAE,GAAGF,CAAU,CAAE,GAAGF,GAAMI,OAAO,AAAC,EAC3CG,KAAM,CAAEC,WAAY,CAAE,CACxB,EACF,CAnCuBhB,kDENvB,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAC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