@sleep2agi/agent-network-dashboard 0.5.7-preview.25 → 0.5.7-preview.26

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.
Files changed (224) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/diagnostics/route-bundle-stats.json +40 -40
  5. package/.next/fallback-build-manifest.json +3 -3
  6. package/.next/prerender-manifest.json +3 -3
  7. package/.next/routes-manifest.json +0 -6
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +2 -2
  18. package/.next/server/app/_not-found.rsc +13 -13
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/server/app/admin/page.js.nft.json +1 -1
  26. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/admin.html +2 -2
  28. package/.next/server/app/admin.rsc +15 -15
  29. package/.next/server/app/admin.segments/_full.segment.rsc +15 -15
  30. package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
  31. package/.next/server/app/admin.segments/_index.segment.rsc +8 -8
  32. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  33. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
  34. package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
  35. package/.next/server/app/index.html +2 -2
  36. package/.next/server/app/index.rsc +15 -15
  37. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  38. package/.next/server/app/index.segments/_full.segment.rsc +15 -15
  39. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  40. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  41. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  42. package/.next/server/app/login/page.js.nft.json +1 -1
  43. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/login.html +2 -2
  45. package/.next/server/app/login.rsc +15 -15
  46. package/.next/server/app/login.segments/_full.segment.rsc +15 -15
  47. package/.next/server/app/login.segments/_head.segment.rsc +4 -4
  48. package/.next/server/app/login.segments/_index.segment.rsc +8 -8
  49. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  50. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  51. package/.next/server/app/login.segments/login.segment.rsc +3 -3
  52. package/.next/server/app/logs/page.js.nft.json +1 -1
  53. package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  54. package/.next/server/app/logs.html +2 -2
  55. package/.next/server/app/logs.rsc +15 -15
  56. package/.next/server/app/logs.segments/_full.segment.rsc +15 -15
  57. package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
  58. package/.next/server/app/logs.segments/_index.segment.rsc +8 -8
  59. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  60. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
  61. package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
  62. package/.next/server/app/messages/page.js.nft.json +1 -1
  63. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/messages.html +2 -2
  65. package/.next/server/app/messages.rsc +15 -15
  66. package/.next/server/app/messages.segments/_full.segment.rsc +15 -15
  67. package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
  68. package/.next/server/app/messages.segments/_index.segment.rsc +8 -8
  69. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  70. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
  71. package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
  72. package/.next/server/app/node/page.js.nft.json +1 -1
  73. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/node.html +2 -2
  75. package/.next/server/app/node.rsc +15 -15
  76. package/.next/server/app/node.segments/_full.segment.rsc +15 -15
  77. package/.next/server/app/node.segments/_head.segment.rsc +4 -4
  78. package/.next/server/app/node.segments/_index.segment.rsc +8 -8
  79. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  80. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
  81. package/.next/server/app/node.segments/node.segment.rsc +3 -3
  82. package/.next/server/app/nodes/page.js.nft.json +1 -1
  83. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/nodes.html +2 -2
  85. package/.next/server/app/nodes.rsc +15 -15
  86. package/.next/server/app/nodes.segments/_full.segment.rsc +15 -15
  87. package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
  88. package/.next/server/app/nodes.segments/_index.segment.rsc +8 -8
  89. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  90. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
  91. package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
  92. package/.next/server/app/page.js.nft.json +1 -1
  93. package/.next/server/app/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/server-logs/page.js.nft.json +1 -1
  95. package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/server-logs.html +2 -2
  97. package/.next/server/app/server-logs.rsc +15 -15
  98. package/.next/server/app/server-logs.segments/_full.segment.rsc +15 -15
  99. package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
  100. package/.next/server/app/server-logs.segments/_index.segment.rsc +8 -8
  101. package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
  102. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
  103. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
  104. package/.next/server/app/servers/page.js.nft.json +1 -1
  105. package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/servers.html +2 -2
  107. package/.next/server/app/servers.rsc +15 -15
  108. package/.next/server/app/servers.segments/_full.segment.rsc +15 -15
  109. package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
  110. package/.next/server/app/servers.segments/_index.segment.rsc +8 -8
  111. package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
  112. package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +4 -4
  113. package/.next/server/app/servers.segments/servers.segment.rsc +3 -3
  114. package/.next/server/app/settings/networks/page.js.nft.json +1 -1
  115. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  116. package/.next/server/app/settings/networks.html +2 -2
  117. package/.next/server/app/settings/networks.rsc +15 -15
  118. package/.next/server/app/settings/networks.segments/_full.segment.rsc +15 -15
  119. package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
  120. package/.next/server/app/settings/networks.segments/_index.segment.rsc +8 -8
  121. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  122. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
  123. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
  124. package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
  125. package/.next/server/app/settings/page.js.nft.json +1 -1
  126. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  127. package/.next/server/app/settings/tokens/page.js.nft.json +1 -1
  128. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  129. package/.next/server/app/settings/tokens.html +2 -2
  130. package/.next/server/app/settings/tokens.rsc +15 -15
  131. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +15 -15
  132. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
  133. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +8 -8
  134. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  135. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
  136. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
  137. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
  138. package/.next/server/app/settings.html +2 -2
  139. package/.next/server/app/settings.rsc +15 -15
  140. package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  141. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  142. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  143. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  144. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  145. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  146. package/.next/server/app/tasks/[id]/page.js.nft.json +1 -1
  147. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  148. package/.next/server/app/tasks/page.js.nft.json +1 -1
  149. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  150. package/.next/server/app/tasks.html +2 -2
  151. package/.next/server/app/tasks.rsc +15 -15
  152. package/.next/server/app/tasks.segments/_full.segment.rsc +15 -15
  153. package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  154. package/.next/server/app/tasks.segments/_index.segment.rsc +8 -8
  155. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  156. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  157. package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  158. package/.next/server/app-paths-manifest.json +0 -1
  159. package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js +1 -1
  160. package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js.map +1 -1
  161. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
  162. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
  163. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
  164. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
  165. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +3 -3
  166. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
  167. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  168. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  169. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  170. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  171. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
  172. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
  173. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
  174. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
  175. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js +9 -0
  176. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js.map +1 -0
  177. package/.next/server/middleware-build-manifest.js +3 -3
  178. package/.next/server/pages/404.html +2 -2
  179. package/.next/server/pages/500.html +1 -1
  180. package/.next/server/server-reference-manifest.js +1 -1
  181. package/.next/server/server-reference-manifest.json +1 -1
  182. package/.next/static/chunks/{0htz_k0~gd-wb.js → 03g.reu.n2vy-.js} +3 -3
  183. package/.next/static/chunks/{0ca8xsuirxtp_.js → 05pb1wngi95jk.js} +1 -1
  184. package/.next/static/chunks/088exwd92o3ko.js +7 -0
  185. package/.next/static/chunks/{11i~5rdecfel1.js → 095wwuz~6dw5_.js} +1 -1
  186. package/.next/static/chunks/0e~5408~ejmgg.css +1 -0
  187. package/.next/static/chunks/0fkd-56.k2ts..js +1 -0
  188. package/.next/static/chunks/0i4a.7j40099_.js +1 -0
  189. package/.next/static/chunks/{05wpkysi1s2zn.js → 0ymogrg8t82.8.js} +1 -1
  190. package/.next/static/chunks/{15yjjo1fv.muz.js → 0~eyvw9.ips4y.js} +1 -1
  191. package/.next/trace +2 -2
  192. package/.next/trace-build +1 -1
  193. package/.next/types/routes.d.ts +1 -2
  194. package/.next/types/validator.ts +0 -9
  195. package/app/components/HelpOverlay.tsx +0 -3
  196. package/app/components/Sidebar.tsx +6 -7
  197. package/app/components/ThemeSwitcher.tsx +10 -79
  198. package/app/lib/hooks.ts +0 -5
  199. package/app/page.tsx +0 -24
  200. package/app/settings/page.tsx +1 -77
  201. package/package.json +1 -1
  202. package/.next/server/app/api/hub/license/route/app-paths-manifest.json +0 -3
  203. package/.next/server/app/api/hub/license/route/build-manifest.json +0 -9
  204. package/.next/server/app/api/hub/license/route/server-reference-manifest.json +0 -4
  205. package/.next/server/app/api/hub/license/route.js +0 -7
  206. package/.next/server/app/api/hub/license/route.js.map +0 -5
  207. package/.next/server/app/api/hub/license/route.js.nft.json +0 -1
  208. package/.next/server/app/api/hub/license/route_client-reference-manifest.js +0 -3
  209. package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js +0 -3
  210. package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js.map +0 -1
  211. package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js +0 -3
  212. package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js.map +0 -1
  213. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js +0 -9
  214. package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js.map +0 -1
  215. package/.next/static/chunks/0f8p97tmyqvm5.js +0 -7
  216. package/.next/static/chunks/0fzfrj9t-fbn_.js +0 -1
  217. package/.next/static/chunks/0qn1xzhihji7a.css +0 -1
  218. package/.next/static/chunks/0usnl7ffq88dg.js +0 -1
  219. package/app/api/hub/license/route.ts +0 -33
  220. package/app/components/BroadcastBar.tsx +0 -84
  221. package/app/components/InboxPanel.tsx +0 -36
  222. /package/.next/static/{z68cVBEzcBzq8iEOD2ChR → J2cIyEDp-g-0yQIgDh6Q3}/_buildManifest.js +0 -0
  223. /package/.next/static/{z68cVBEzcBzq8iEOD2ChR → J2cIyEDp-g-0yQIgDh6Q3}/_clientMiddlewareManifest.js +0 -0
  224. /package/.next/static/{z68cVBEzcBzq8iEOD2ChR → J2cIyEDp-g-0yQIgDh6Q3}/_ssgManifest.js +0 -0
@@ -2,15 +2,12 @@
2
2
 
3
3
  import { useState } from 'react';
4
4
  import Link from 'next/link';
5
- import { useAnetConfig, useHealth, useLicense } from '../lib/hooks';
5
+ import { useAnetConfig, useHealth } from '../lib/hooks';
6
6
  import { DASHBOARD_VERSION } from '../lib/version';
7
7
 
8
8
  export default function SettingsPage() {
9
9
  const { config } = useAnetConfig();
10
10
  const { health } = useHealth();
11
- const { license: licData } = useLicense();
12
- const [licKey, setLicKey] = useState('');
13
- const [licResult, setLicResult] = useState('');
14
11
  const [oldPwd, setOldPwd] = useState('');
15
12
  const [newPwd, setNewPwd] = useState('');
16
13
  const [pwdResult, setPwdResult] = useState('');
@@ -134,79 +131,6 @@ export default function SettingsPage() {
134
131
  <div className="flex-1 h-px bg-[#2a2a4a]" />
135
132
  </div>
136
133
 
137
- {/* License */}
138
- <section className="bg-[#111128] border border-[#2a2a4a] rounded-xl p-5">
139
- <h2 className="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
140
- License
141
- {licData?.license && (
142
- <span
143
- className={`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${
144
- licData.license.type === 'pro'
145
- ? 'text-green-300 bg-green-500/10 border-green-500/30'
146
- : licData.license.days_left <= 7
147
- ? 'text-red-300 bg-red-500/10 border-red-500/30'
148
- : 'text-amber-300 bg-amber-500/10 border-amber-500/30'
149
- }`}
150
- >
151
- <span aria-hidden className="w-1.5 h-1.5 rounded-full bg-current" />
152
- {licData.license.type}{licData.license.days_left ? ` · ${licData.license.days_left}d left` : ''}
153
- </span>
154
- )}
155
- </h2>
156
- {licData?.license ? (
157
- <div className="space-y-3 text-sm">
158
- {/* Type + Days Left are summarized in the inline chip in the
159
- header. Surface "expiring soon" only when relevant. */}
160
- {licData.license.days_left <= 7 && (
161
- <div className={rowClass}>
162
- <span className="text-red-400 font-medium">⚠ Expiring soon</span>
163
- <span className="text-red-400">{licData.license.days_left} days left</span>
164
- </div>
165
- )}
166
- <div className={rowClass}>
167
- <span className="text-gray-500">Expires</span>
168
- <span className={`text-gray-300 ${valueClass}`}>{licData.license.expires_at}</span>
169
- </div>
170
- {licData.limits && (
171
- <>
172
- <div className={rowClass}>
173
- <span className="text-gray-500">Max Agents</span>
174
- <span className={`text-gray-300 ${valueClass}`}>{licData.limits.max_agents}</span>
175
- </div>
176
- <div className={rowClass}>
177
- <span className="text-gray-500">Max Networks</span>
178
- <span className={`text-gray-300 ${valueClass}`}>{licData.limits.max_networks}</span>
179
- </div>
180
- <div className={rowClass}>
181
- <span className="text-gray-500">Tasks/Day</span>
182
- <span className={`text-gray-300 ${valueClass}`}>{licData.limits.max_tasks_day}</span>
183
- </div>
184
- </>
185
- )}
186
- <div className="pt-3 border-t border-[#2a2a4a]">
187
- <div className="flex gap-2">
188
- <input type="text" value={licKey} onChange={e => setLicKey(e.target.value)}
189
- placeholder="anet-XXXX-XXXX-XXXX-XXXX"
190
- className="flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none" />
191
- <button onClick={async () => {
192
- if (!licKey.trim()) return;
193
- const res = await fetch('/api/hub/license', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ key: licKey }) });
194
- const data = await res.json();
195
- setLicResult(data.ok ? `Activated: ${data.type}` : `Failed: ${data.error}`);
196
- if (data.ok) setLicKey('');
197
- setTimeout(() => setLicResult(''), 5000);
198
- }} className="px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors">
199
- Activate
200
- </button>
201
- </div>
202
- {licResult && <div className={`mt-2 text-xs ${licResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{licResult}</div>}
203
- </div>
204
- </div>
205
- ) : (
206
- <div className="text-xs text-gray-600">License info not available</div>
207
- )}
208
- </section>
209
-
210
134
  {/* Change Password */}
211
135
  <section className="bg-[#111128] border border-[#2a2a4a] rounded-xl p-5">
212
136
  <h2 className="text-sm font-semibold text-gray-300 mb-4">Change Password</h2>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network-dashboard",
3
- "version": "0.5.7-preview.25",
3
+ "version": "0.5.7-preview.26",
4
4
  "description": "Agent Network Dashboard — Web UI for managing AI Agent networks",
5
5
  "main": "apps/desktop/electron/main.cjs",
6
6
  "scripts": {
@@ -1,3 +0,0 @@
1
- {
2
- "/api/hub/license/route": "app/api/hub/license/route.js"
3
- }
@@ -1,9 +0,0 @@
1
- {
2
- "devFiles": [],
3
- "ampDevFiles": [],
4
- "polyfillFiles": [],
5
- "lowPriorityFiles": [],
6
- "rootMainFiles": [],
7
- "pages": {},
8
- "ampFirstPages": []
9
- }
@@ -1,4 +0,0 @@
1
- {
2
- "node": {},
3
- "edge": {}
4
- }
@@ -1,7 +0,0 @@
1
- var R=require("../../../../chunks/[turbopack]_runtime.js")("server/app/api/hub/license/route.js")
2
- R.c("server/chunks/[root-of-the-server]__0rovr5-._.js")
3
- R.c("server/chunks/[root-of-the-server]__02y-i-p._.js")
4
- R.c("server/chunks/[root-of-the-server]__0hg3_8r._.js")
5
- R.c("server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js")
6
- R.m(20033)
7
- module.exports=R.m(20033).exports
@@ -1,5 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sections": []
5
- }
@@ -1 +0,0 @@
1
- {"version":1,"files":["../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../node_modules/react/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/package.json","../../../../chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js","../../../../chunks/[root-of-the-server]__02y-i-p._.js","../../../../chunks/[root-of-the-server]__0hg3_8r._.js","../../../../chunks/[root-of-the-server]__0rovr5-._.js","../../../../chunks/[turbopack]_runtime.js","./route_client-reference-manifest.js"]}
@@ -1,3 +0,0 @@
1
- globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
2
- globalThis.__RSC_MANIFEST["/api/hub/license/route"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"rscModuleMapping":{},"edgeRscModuleMapping":{},"entryCSSFiles":{},"entryJSFiles":{}};
3
-
@@ -1,3 +0,0 @@
1
- module.exports=[24689,(e,o,d)=>{}];
2
-
3
- //# sourceMappingURL=0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
@@ -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])},20033,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 f=e.i(56394),g=e.i(76631),w=e.i(98319);async function m(){let e=await (0,g.requireDashboardAuth)();if(e)return e;try{let e=await (0,w.hubFetch)("/api/license"),t=e.headers.get("content-type")||"";if(e.ok&&t.includes("application/json"))return Response.json(await e.json());return Response.json({ok:!1,error:"license endpoint not available"},{status:404})}catch(e){return Response.json({error:"failed",detail:e instanceof Error?e.message:String(e)},{status:502})}}async function y(e){let t=await (0,g.requireDashboardAuth)();if(t)return t;try{let t=await e.json(),r=await (0,w.hubFetch)("/api/license/activate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return Response.json(await r.json())}catch(e){return Response.json({error:"failed",detail:e instanceof Error?e.message:String(e)},{status:502})}}e.s(["GET",0,m,"POST",0,y],33419);var E=e.i(33419);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/hub/license/route",pathname:"/api/hub/license",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/agent-network-dashboard/app/api/hub/license/route.ts",nextConfigOutput:"",userland:E,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:A,serverHooks:T}=b;async function j(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/hub/license/route";g=g.replace(/\/index$/,"")||"/";let w=await b.prepare(e,t,{srcPage:g,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:E,parsedUrl:C,isDraftMode:A,prerenderManifest:T,routerServerContext:j,isOnDemandRevalidate:q,revalidateOnlyGenerated:S,resolvedPathname:N,clientReferenceManifest:P,serverActionsManifest:k}=w,O=(0,o.normalizeAppPath)(g),_=!!(T.dynamicRoutes[O]||T.routes[N]),U=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!A){let e=!!T.routes[N],t=T.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await U();throw new v.NoFallbackError}}let H=null;!_||b.isDev||A||(H="/index"===(H=N)?"/":H);let M=!0===b.isDev||!_,I=_&&!M;k&&P&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:P,serverActionsManifest:k});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),B=!!(null==j?void 0:j.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,T,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:y,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:M,incrementalCache:L,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,j)},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=>b.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} ${g}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&q&&S&&!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(!_)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:f.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:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:q})},!1,j),t}},u=await b.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:S,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!_)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.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",q?"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&&_||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} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:q})},!1,j),_)throw t;return await (0,c.sendResponse)(V,z,new Response(null,{status:500})),null}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:A})},"routeModule",0,b,"serverHooks",0,T,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,A],20033)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0rovr5-._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../agent-network-dashboard/app/lib/hub.ts","../../../../agent-network-dashboard/app/api/hub/license/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() {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n try {\n const res = await hubFetch('/api/license');\n const ct = res.headers.get('content-type') || '';\n if (res.ok && ct.includes('application/json')) return Response.json(await res.json());\n return Response.json({ ok: false, error: 'license endpoint not available' }, { status: 404 });\n } catch (e: unknown) {\n return Response.json({ error: 'failed', detail: e instanceof Error ? e.message : String(e) }, { status: 502 });\n }\n}\n\nexport async function POST(req: Request) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n try {\n const body = await req.json();\n const res = await hubFetch('/api/license/activate', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n });\n return Response.json(await res.json());\n } catch (e: unknown) {\n return Response.json({ error: 'failed', 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/license/route\",\n pathname: \"/api/hub/license\",\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/license/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/license/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","authFailure","res","ct","get","ok","includes","Response","json","error","status","e","detail","Error","message","String","POST","req","body","method","JSON","stringify"],"mappings":"wjCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,SAASA,IACP,OAAOC,QAAQC,GAAG,CAACC,WAAW,EAA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},{id:"light",label:"Light",emoji:"☀️",desc:"浅色简洁"},{id:"mint",label:"Mint",emoji:"🌿",desc:"薄荷绿"},{id:"sunset",label:"Sunset",emoji:"🌅",desc:"暖色橙紫"}],e="anet-theme";function f(a){"u">typeof document&&document.documentElement.setAttribute("data-theme",a)}a.s(["ThemeProvider",0,function({children:a}){return(0,c.useEffect)(()=>{f(localStorage.getItem(e)||"cyber")},[]),(0,b.jsx)(b.Fragment,{children:a})},"ThemeSwitcher",0,function({compact:a=!1}){let[g,h]=(0,c.useState)("cyber"),[i,j]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let a=localStorage.getItem(e)||"cyber";h(a),f(a)},[]);let k=d.find(a=>a.id===g)||d[0];return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsxs)("button",{"aria-label":"切换主题",onClick:()=>j(!i),className:"px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity",style:{background:"var(--bg-elevated)",color:"var(--fg)",border:"1px solid var(--border)"},children:[(0,b.jsx)("span",{"aria-hidden":!0,children:k.emoji}),!a&&(0,b.jsx)("span",{children:k.label})]}),i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>j(!1)}),(0,b.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:d.map(a=>(0,b.jsxs)("button",{onClick:()=>{var b;h(b=a.id),localStorage.setItem(e,b),f(b),j(!1)},className:"w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80",style:{background:a.id===g?"var(--bg-elevated)":"transparent",color:"var(--fg)"},children:[(0,b.jsx)("span",{"aria-hidden":!0,children:a.emoji}),(0,b.jsx)("span",{className:"flex-1",children:a.label}),(0,b.jsx)("span",{style:{color:"var(--fg-dim)"},className:"text-[10px]",children:a.desc}),a.id===g&&(0,b.jsx)("span",{style:{color:"var(--accent)"},children:"•"})]},a.id))})]})]})}])},37671,a=>{"use strict";var b=a.i(64247),c=a.i(99309),d=a.i(88534),e=a.i(54413),f=a.i(57389),g=a.i(59202),h=a.i(97207);let i=a=>fetch(a).then(a=>a.ok?a.json():{networks:[]}),j=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Nodes",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/servers",label:"Servers",icon:"M4 6.5A2.5 2.5 0 016.5 4h11A2.5 2.5 0 0120 6.5v1A2.5 2.5 0 0117.5 10h-11A2.5 2.5 0 014 7.5v-1zM4 16.5A2.5 2.5 0 016.5 14h11a2.5 2.5 0 012.5 2.5v1a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5v-1zM7 7h.01M7 17h.01"},{href:"/messages",label:"Messages",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"},{href:"/settings/networks",label:"Networks",icon:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{href:"/logs",label:"Audit Log",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:"/server-logs",label:"Server Logs",icon:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{href:"/admin",label:"Admin",icon:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"},{href:"/settings",label:"Settings",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}],k={owner:"⭐",admin:"🔧",member:"👤",viewer:"👁"};function l(){let a=(0,c.usePathname)(),[l,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),{networkId:r,setNetworkId:s}=(0,g.useNetworkId)(),{data:t}=(0,f.default)("/api/hub/networks",i,{refreshInterval:15e3,dedupingInterval:1e4}),{data:u}=(0,f.default)("/api/hub/status",m,{refreshInterval:15e3,dedupingInterval:1e4}),v=t?.networks||[],w=(()=>{let a=new Map;for(let b of u?.sessions||[])b.network_id&&a.set(b.network_id,(a.get(b.network_id)||0)+1);let b=new Set(v.map(a=>a.network_id));return[...v,...[...a.keys()].filter(a=>!b.has(a)).map(a=>({network_id:a,network_name:a}))].map(b=>({...b,agentCount:a.get(b.network_id)||0}))})(),x=(0,b.jsx)("nav",{className:"flex flex-col gap-1 px-2 py-4",children:j.map(c=>{var e;return(0,b.jsxs)(d.default,{href:c.href,prefetch:!1,onClick:()=>q(!1),title:l?c.label:void 0,className:`relative flex items-center gap-3 px-3 py-3 rounded-lg text-sm transition-colors active:bg-[#1a1a3a] ${("/"===(e=c.href)?"/"===a:"/settings"===e?"/settings"===a:a.startsWith(e))?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20 anet-nav-active":"text-gray-400 hover:text-gray-200 hover:bg-[#1a1a2a]"} ${l?"justify-center px-0":""}`,children:[(0,b.jsx)("svg",{className:"w-5 h-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:c.icon})}),!l&&(0,b.jsx)("span",{children:c.label})]},c.href)})});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>q(!p),className:"fixed top-3 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-3 min-h-[44px] min-w-[44px] inline-flex items-center justify-center text-gray-400 hover:text-white active:bg-[#1a1a3a]","aria-label":"Toggle menu",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:p?(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),p&&(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 z-30 lg:hidden anet-fade-in",onClick:()=>q(!1)}),(0,b.jsxs)("aside",{"data-anet-sidebar":"true",className:`
2
- fixed top-0 left-0 h-full z-40 bg-[#0d0d1a] border-r border-[#2a2a4a]
3
- transition-transform duration-200 ease-out
4
- ${l?"w-16":"w-52"}
5
- ${p?"translate-x-0 shadow-2xl shadow-black/40 lg:shadow-none":"-translate-x-full"}
6
- lg:translate-x-0 lg:static lg:shrink-0 lg:shadow-none
7
- `,children:[(0,b.jsx)(n,{collapsed:l}),(0,b.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!l&&w.length>0&&(0,b.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,b.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,b.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:w.map(a=>(0,b.jsxs)("button",{onClick:()=>{s(a.network_id),q(!1)},title:a.network_id,className:`w-full flex items-center gap-2 px-3 py-2.5 lg:py-1.5 rounded-md text-xs transition-colors text-left ${r===a.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,b.jsx)("span",{children:k[a.role||"member"]||"👤"}),(0,b.jsx)("span",{className:"truncate flex-1",children:a.network_name}),a.agentCount?(0,b.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:a.agentCount}):null]},a.network_id))})]}),(0,b.jsx)("div",{className:"pb-20",children:x}),(0,b.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,b.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:l?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${l?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-3 lg:py-2"}`,"aria-label":"Open command palette",children:[(0,b.jsxs)("span",{className:`flex items-center ${l?"":"gap-2"}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!l&&"Quick search"]}),!l&&(0,b.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,b.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:l?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${l?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!l&&"Sign out"]}),(0,b.jsxs)("div",{className:`flex items-center gap-2 ${l?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,b.jsx)(h.ThemeSwitcher,{compact:l}),(0,b.jsx)("button",{onClick:()=>o(!l),title:l?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":l?"Expand sidebar":"Collapse sidebar",children:(0,b.jsx)("svg",{className:`w-4 h-4 transition-transform ${l?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let m=a=>fetch(a).then(a=>a.ok?a.json():{sessions:[]});function n({collapsed:a}){let{data:c}=(0,f.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),e=c?.sessions||[],g=e.filter(a=>a.status&&"offline"!==a.status).length,h=e.length;return a?(0,b.jsx)(d.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,b.jsx)(o,{size:32})}):(0,b.jsxs)(d.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,b.jsx)(o,{size:32}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,b.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,b.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${g>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===h?(0,b.jsx)("span",{children:"waiting for agents"}):(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:g}),(0,b.jsxs)("span",{className:"text-gray-600",children:["/",h]})," online"]})]})]})]})}function o({size:a}){return(0,b.jsxs)("svg",{width:a,height:a,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,b.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,b.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,b.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,b.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,b.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,b.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,b.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let p=async a=>{let b=await fetch(a);if(!b.ok)throw Error(String(b.status));return b.json()};function q(){let a,c,{data:g,error:h}=(0,f.default)("/api/hub/stats",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:j}=(0,f.default)("/api/hub/health",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[k,l]=(0,e.useState)(()=>!1);if(k)return null;let m=h&&j||i&&!1===i.ok,n=g?.tasks?.by_status?.find(a=>"failed"===a.status)?.count||0,o=g?.nodes?.total===0,q=null;if(m?(a="red",c="CommHub unreachable — agents may be offline",q={label:"Open Settings",href:"/settings"}):n>0?(a="amber",c=`${n} task${n>1?"s":""} failed recently`,q={label:"Review failures",href:"/tasks?status=failed"}):(o?(a="green",c="Waiting for first agent"):(a="green",c="All systems go"),q=null),"green"===a&&!g)return null;let r={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[a],s={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[a];return(0,b.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${r} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${s}`,"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:c})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[q&&(0,b.jsxs)(d.default,{href:q.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[q.label," →"]}),q&&(0,b.jsx)(d.default,{href:q.href,"aria-label":q.label,className:"sm:hidden text-[13px] font-medium opacity-90 hover:opacity-100 relative leading-none px-1.5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']",children:"→"}),(0,b.jsx)("button",{onClick:()=>{l(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-60 hover:opacity-100 leading-none px-1.5 text-base relative rounded-md hover:bg-white/5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']",children:"×"})]})]})}function r(a){try{let b=[].filter(b=>b!==a);b.unshift(a),sessionStorage.setItem("anet-cmdk-recents",JSON.stringify(b.slice(0,4)))}catch{}}function s(a,b){if(!b)return{score:0,indices:[]};let c=a.toLowerCase(),d=b.toLowerCase(),e=0,f=0,g=0,h=0,i=[];for(;e<c.length&&f<d.length;)c[e]===d[f]?(g+=2+h,h++,i.push(e),(0===e||/[\s·:_/-]/.test(c[e-1]))&&(g+=4),f++):h=0,e++;return f<d.length?{score:-1,indices:[]}:{score:g-.05*Math.max(0,c.length-d.length),indices:i}}function t({text:a,indices:c}){if(!c.length)return(0,b.jsx)(b.Fragment,{children:a});let d=new Set(c),e=Array.from(a);return(0,b.jsx)(b.Fragment,{children:e.map((a,c)=>d.has(c)?(0,b.jsx)("mark",{className:"anet-cmdk-mark",children:a},c):(0,b.jsx)("span",{children:a},c))})}function u({d:a}){return(0,b.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a})})}let v=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,b.jsx)(u,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:a=>a.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,b.jsx)(u,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:a=>a.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,b.jsx)(u,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:a=>a.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,b.jsx)(u,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:a=>a.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,b.jsx)(u,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:a=>a.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,b.jsx)(u,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:a=>a.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,b.jsx)(u,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:a=>a.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,b.jsx)(u,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:a=>a.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,b.jsx)(u,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:a=>a.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,b.jsx)(u,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:a=>a.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,b.jsx)(u,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let a=document.documentElement.getAttribute("data-theme")||"cyber",b="light"===a||"mint"===a?"cyber":"light";document.documentElement.setAttribute("data-theme",b);try{localStorage.setItem("anet-theme",b)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,b.jsx)(u,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,b.jsx)(u,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,b.jsx)(u,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}},{id:"act-pin-working",title:"Pin topology filter: working",hint:"highlight working nodes only",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","working")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"working"}}))}},{id:"act-pin-idle",title:"Pin topology filter: idle",hint:"highlight idle (online) nodes only",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","idle")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"idle"}}))}},{id:"act-pin-offline",title:"Pin topology filter: offline",hint:"highlight offline / no-SSE nodes",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","offline")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"offline"}}))}},{id:"act-pin-vendor-A",title:"Pin topology filter: Anthropic",hint:"highlight A vendor only",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","A")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"A"}}))}},{id:"act-pin-vendor-O",title:"Pin topology filter: OpenAI",hint:"highlight O vendor only",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","O")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"O"}}))}},{id:"act-pin-vendor-S",title:"Pin topology filter: 书生",hint:"highlight 书 vendor only",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-vendor","书")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"vendor",value:"书"}}))}},{id:"act-clear-topo-pins",title:"Clear topology filters",hint:"release pinned status + group + vendor + edge",group:"Actions",icon:(0,b.jsx)(u,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-status"),sessionStorage.removeItem("anet-topo-pinned-group"),sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear"}}))}},{id:"act-clear-topo-edge",title:"Clear topology edge pin",hint:"release pinned recent-signal row only",group:"Actions",icon:(0,b.jsx)(u,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear-edge"}}))}},{id:"act-clear-topo-vendor",title:"Clear topology vendor filter",hint:"release pinned vendor only",group:"Actions",icon:(0,b.jsx)(u,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-vendor")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear-vendor"}}))}},{id:"act-topo-toggle-layout",title:"Toggle topology layout",hint:"ring ↔ grid (or press `l`)",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-layout",{detail:{kind:"toggle"}}))}},{id:"act-topo-fit",title:"Fit topology to canvas",hint:"auto-zoom to content (or press `f`)",group:"Actions",icon:(0,b.jsx)(u,{d:"M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-view",{detail:{kind:"fit"}}))}}];function w(){let a=(0,c.useRouter)(),[d,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)(""),[i,j]=(0,e.useState)(0),k=(0,e.useRef)(null);(0,e.useEffect)(()=>{let a=a=>{if((a.metaKey||a.ctrlKey)&&"k"===a.key.toLowerCase()){a.preventDefault(),f(a=>!a);return}if("/"===a.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!d){a.preventDefault(),f(!0);return}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),(0,e.useEffect)(()=>{d&&(h(""),j(0),setTimeout(()=>k.current?.focus(),50))},[d]);let[l,m]=(0,e.useState)([]);(0,e.useEffect)(()=>{d&&m([])},[d]);let[n,o]=(0,e.useState)([]);(0,e.useEffect)(()=>{if(!d)return;let a=!1;return(async()=>{try{let[c,d]=await Promise.all([fetch("/api/hub/status").then(a=>a.ok?a.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(a=>a.ok?a.json():{tasks:[]})]);if(a)return;let e=(c.sessions||[]).filter(a=>a.alias).slice(0,20).map(a=>({id:`agent-${a.alias}`,title:`Go to agent ${a.alias}`,hint:`${a.agent||"agent"} \xb7 ${a.status||"unknown"}`,group:"Agents",icon:(0,b.jsx)(u,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:b=>b.push(`/node?alias=${encodeURIComponent(a.alias)}`)})),f=(d.tasks||[]).filter(a=>a.task_id).slice(0,15).map(a=>({id:`task-${a.task_id}`,title:`Open task: ${(a.content||a.task_id||"").slice(0,50)}`,hint:`${a.from_name||"?"} → ${a.to_name||"?"} \xb7 ${a.status||""}`,group:"Tasks",icon:(0,b.jsx)(u,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:b=>b.push(`/tasks/${encodeURIComponent(a.task_id)}`)}));o([...e,...f])}catch{}})(),()=>{a=!0}},[d]);let p=(0,e.useMemo)(()=>{let a=[...v,...n];if(!g.trim()){let b=l.map(b=>a.find(a=>a.id===b)).filter(a=>!!a).map(a=>({...a,group:"Recents"})),c=new Set(l);return[...b,...v.filter(a=>!c.has(a.id))]}let b=a.map(a=>{let b=s(a.title,g),c=a.hint?s(a.hint,g):{score:-1,indices:[]},d=s(a.id,g);return{c:a,score:Math.max(b.score>=0?+b.score:-1/0,c.score>=0?.6*c.score:-1/0,d.score>=0?.3*d.score:-1/0),_titleHi:b.score>=0?b.indices:[],_hintHi:c.score>=0?c.indices:[]}}).filter(a=>a.score>-1/0);return b.sort((a,b)=>b.score-a.score),b.map(a=>({...a.c,_titleHi:a._titleHi,_hintHi:a._hintHi}))},[g,l,n]);if((0,e.useEffect)(()=>{i>=p.length&&j(0)},[p.length,i]),!d)return null;let q={};for(let a of p)(q[a.group]||=[]).push(a);let w=0;return(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>f(!1),onKeyDown:b=>{if("Escape"===b.key)return void f(!1);if("ArrowDown"===b.key){b.preventDefault(),j(a=>Math.min(a+1,p.length-1));return}if("ArrowUp"===b.key){b.preventDefault(),j(a=>Math.max(a-1,0));return}if("Enter"===b.key){b.preventDefault();let c=p[i];c&&(r(c.id),c.perform(a),f(!1))}},children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,b.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,b.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,b.jsx)("input",{ref:k,value:g,onChange:a=>{h(a.target.value),j(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-base sm:text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,b.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,b.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===p.length?(0,b.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',g,'"']}):Object.entries(q).map(([c,d])=>(0,b.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:c}),d.map(c=>{let d=w++,e=d===i;return(0,b.jsxs)("button",{onMouseEnter:()=>j(d),onClick:()=>{r(c.id),c.perform(a),f(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${e?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,b.jsx)("span",{className:e?"text-cyan-400":"text-gray-500",children:c.icon}),(0,b.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,b.jsx)("span",{className:"block truncate",children:(0,b.jsx)(t,{text:c.title,indices:c._titleHi||[]})}),c.hint&&(0,b.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,b.jsx)(t,{text:c.hint,indices:c._hintHi||[]})})]}),e&&(0,b.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},c.id)})]},c))}),(0,b.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,b.jsxs)("span",{className:"flex items-center gap-3",children:[(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let x=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan (empty canvas only)"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"},{keys:["click hub"],label:"Fit topology to canvas (R52)"},{keys:["hover legend"],label:"Highlight nodes of a status (R55)"},{keys:["hover signal"],label:"Highlight one flow edge (R56)"},{keys:["click chip"],label:"Pin a status filter (R60/R61)"},{keys:["Esc"],label:"Clear pinned filter (R62) — or close chat"},{keys:["click group"],label:"Pin a team focus (R63)"},{keys:["click ×"],label:"Clear one filter (R64) — Esc clears all"},{keys:["⌘","K"],label:'Pin / clear filters via palette → "Pin topology filter…" (R69)'},{keys:["⌘","K"],label:"Toggle layout / Fit canvas via palette (R74)"},{keys:["click pill"],label:"Clear filter — click anywhere on the pill body (R73)"},{keys:["hover chip"],label:'Brighten all active flows — hover "N active links" (R77)'},{keys:["hover N working"],label:"Highlight working nodes — chip-row sibling of legend (R79)"},{keys:["hover vendor"],label:"Highlight one vendor — hover A/O/书/? in the chip row (R80)"},{keys:["hover seg"],label:"Preview a status filter — hover a pressure-bar segment (R83)"},{keys:["hover group"],label:"Preview a team focus — hover a group label (R86)"},{keys:["click vendor"],label:"Pin a vendor filter — click A/O/书/? in the chip row (R88)"},{keys:["⌘","K"],label:'Clear vendor pin only via palette → "Clear topology vendor filter" (R90)'},{keys:["⌘","K"],label:'Pin vendor: Anthropic/OpenAI/书生 via palette → "Pin topology filter…" (R108)'},{keys:["click row"],label:"Pin a flow filter — click a recent-signal row to lock the edge (R116)"},{keys:["⌘","K"],label:'Clear edge pin only via palette → "Clear topology edge pin" (R117)'},{keys:["click badge"],label:"Pin a flow filter from the canvas — click an edge midpoint count badge (R121)"},{keys:["click footer"],label:'See all flows — click "+ N more flows" in the recent-signal panel (R133)'},{keys:["click chip"],label:'See all flows — click the "N active links" chip in the chip row (R136)'},{keys:["click chip"],label:'Pin "working" status — click "N working" in the chip row (R139)'},{keys:["click chip"],label:'Open the agent list — click "N online" in the chip row (R140)'},{keys:["Tab","Enter"],label:"Open chat on a focused node (also Space) — keyboard parallel of click-to-chat (R151)"}]}],y={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function z(){let[a,d]=(0,e.useState)(!1),f=(0,c.useRouter)(),g=(0,e.useRef)(0);return((0,e.useEffect)(()=>{let b=b=>{let c=document.activeElement?.tagName,e="INPUT"===c||"TEXTAREA"===c||document.activeElement?.isContentEditable;if("?"===b.key&&!e){b.preventDefault(),d(a=>!a);return}if("Escape"===b.key&&a&&d(!1),!e&&!b.metaKey&&!b.ctrlKey&&!b.altKey){if("g"===b.key){g.current=Date.now();return}if(Date.now()-g.current<1500){let a=y[b.key.toLowerCase()];a&&(b.preventDefault(),g.current=0,f.push(a))}}};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,f]),a)?(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>d(!1),children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,b.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,b.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,b.jsx)("button",{onClick:()=>d(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,b.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:x.map(a=>(0,b.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:a.group}),(0,b.jsx)("ul",{className:"space-y-1.5",children:a.items.map((a,c)=>(0,b.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,b.jsx)("span",{className:"flex items-center gap-1",children:a.keys.map((a,c)=>(0,b.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:a},c))}),(0,b.jsx)("span",{className:"text-gray-400 flex-1",children:a.label})]},c))})]},a.group))}),(0,b.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,b.jsxs)("span",{children:["Press ",(0,b.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,b.jsxs)("span",{children:["or ",(0,b.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}var A=a.i(62749);let B=[{href:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"},{href:"/tasks",label:"Tasks",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},{href:"/nodes",label:"Agents",icon:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"},{href:"/messages",label:"Chats",icon:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}];function C(){let a=(0,c.usePathname)();return(0,b.jsx)("nav",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-[#2a2a4a] bg-[#0d0d1a]/95 px-1 pb-[calc(env(safe-area-inset-bottom)+0.35rem)] pt-1.5 backdrop-blur lg:hidden",children:(0,b.jsxs)("div",{className:"mx-auto grid max-w-md grid-cols-5 gap-1",children:[B.map(c=>{let e,f="/"===(e=c.href)?"/"===a:a.startsWith(e);return(0,b.jsxs)(d.default,{href:c.href,prefetch:!1,"aria-current":f?"page":void 0,className:`relative flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${f?"bg-cyan-500/12 text-cyan-300 before:absolute before:top-0 before:left-3 before:right-3 before:h-0.5 before:rounded-full before:bg-cyan-400":"text-gray-500 active:bg-[#1a1a3a] active:text-gray-200"}`,children:[(0,b.jsx)("svg",{className:"h-5 w-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:c.icon})}),(0,b.jsx)("span",{className:"max-w-full truncate",children:c.label})]},c.href)}),(0,b.jsxs)("button",{type:"button",onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},className:"flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] text-gray-500 transition-colors active:bg-[#1a1a3a] active:text-gray-200","aria-label":"Open command palette",children:[(0,b.jsx)("svg",{className:"h-5 w-5 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v3m0 12v3m9-9h-3M6 12H3m15.364-6.364l-2.121 2.121M7.757 16.243l-2.121 2.121m12.728 0l-2.121-2.121M7.757 7.757L5.636 5.636M12 8.5A3.5 3.5 0 1112 15.5 3.5 3.5 0 0112 8.5z"})}),(0,b.jsx)("span",{className:"max-w-full truncate",children:"Command"})]})]})})}let D=["/login"];a.s(["AppShell",0,function({children:a}){let d=(0,c.usePathname)();return D.includes(d)?(0,b.jsx)(b.Fragment,{children:a}):(0,b.jsxs)("div",{className:"flex min-h-[100dvh] max-w-full overflow-x-hidden",children:[(0,b.jsx)(l,{}),(0,b.jsxs)("main",{className:"flex-1 min-w-0 max-w-full overflow-x-hidden flex flex-col pt-[env(safe-area-inset-top)]",children:[(0,b.jsx)(q,{}),(0,b.jsx)("div",{className:"flex-1 min-w-0 max-w-full overflow-x-hidden pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-0",children:a})]}),(0,b.jsx)(C,{}),(0,b.jsx)(w,{}),(0,b.jsx)(z,{}),(0,b.jsx)(A.ServersDrawer,{})]})}],37671)},93599,a=>{"use strict";var b=a.i(54413);a.s(["PwaInstaller",0,function(){return(0,b.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(()=>{})},[]),null}])}];
8
-
9
- //# sourceMappingURL=agent-network-dashboard_app_components_0s5uqlp._.js.map