@sleep2agi/agent-network-dashboard 0.5.7-preview.11 → 0.5.7-preview.13

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 (188) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +21 -21
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found.html +1 -1
  14. package/.next/server/app/_not-found.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/admin.html +2 -2
  23. package/.next/server/app/admin.rsc +2 -2
  24. package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
  25. package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  26. package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
  27. package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  28. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +2 -2
  29. package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
  30. package/.next/server/app/index.html +2 -2
  31. package/.next/server/app/index.rsc +2 -2
  32. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  33. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  34. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  35. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  36. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  37. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/login.html +2 -2
  39. package/.next/server/app/login.rsc +2 -2
  40. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  41. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  43. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  44. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  45. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  46. package/.next/server/app/logs.html +1 -1
  47. package/.next/server/app/logs.rsc +1 -1
  48. package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
  49. package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
  50. package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
  51. package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
  52. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
  53. package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
  54. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/messages.html +2 -2
  56. package/.next/server/app/messages.rsc +2 -2
  57. package/.next/server/app/messages.segments/_full.segment.rsc +2 -2
  58. package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
  59. package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
  60. package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
  61. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
  62. package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
  63. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/node.html +2 -2
  65. package/.next/server/app/node.rsc +2 -2
  66. package/.next/server/app/node.segments/_full.segment.rsc +2 -2
  67. package/.next/server/app/node.segments/_head.segment.rsc +1 -1
  68. package/.next/server/app/node.segments/_index.segment.rsc +1 -1
  69. package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
  70. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +2 -2
  71. package/.next/server/app/node.segments/node.segment.rsc +1 -1
  72. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/nodes.html +2 -2
  74. package/.next/server/app/nodes.rsc +2 -2
  75. package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
  76. package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
  77. package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
  78. package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
  79. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
  80. package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
  81. package/.next/server/app/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/server-logs.html +1 -1
  83. package/.next/server/app/server-logs.rsc +1 -1
  84. package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
  85. package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
  86. package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
  87. package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
  88. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
  89. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
  90. package/.next/server/app/servers.html +1 -1
  91. package/.next/server/app/servers.rsc +1 -1
  92. package/.next/server/app/servers.segments/_full.segment.rsc +1 -1
  93. package/.next/server/app/servers.segments/_head.segment.rsc +1 -1
  94. package/.next/server/app/servers.segments/_index.segment.rsc +1 -1
  95. package/.next/server/app/servers.segments/_tree.segment.rsc +1 -1
  96. package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +1 -1
  97. package/.next/server/app/servers.segments/servers.segment.rsc +1 -1
  98. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  99. package/.next/server/app/settings/networks.html +2 -2
  100. package/.next/server/app/settings/networks.rsc +2 -2
  101. package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
  102. package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
  103. package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
  104. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
  105. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +2 -2
  106. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
  107. package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
  108. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  109. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/settings/tokens.html +2 -2
  111. package/.next/server/app/settings/tokens.rsc +2 -2
  112. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
  113. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
  114. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
  115. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
  116. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +2 -2
  117. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
  118. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
  119. package/.next/server/app/settings.html +2 -2
  120. package/.next/server/app/settings.rsc +2 -2
  121. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  122. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  123. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  124. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  125. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  126. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  127. package/.next/server/app/tasks.html +1 -1
  128. package/.next/server/app/tasks.rsc +1 -1
  129. package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
  130. package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
  131. package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
  132. package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
  133. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
  134. package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
  135. package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js +1 -1
  136. package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js.map +1 -1
  137. package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
  138. package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
  139. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
  140. package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
  141. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
  142. package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
  143. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +1 -1
  144. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
  145. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  146. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  147. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  148. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  149. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
  150. package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
  151. package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
  152. package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
  153. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
  154. package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
  155. package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
  156. package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
  157. package/.next/server/middleware-build-manifest.js +3 -3
  158. package/.next/server/pages/404.html +1 -1
  159. package/.next/server/pages/500.html +1 -1
  160. package/.next/server/server-reference-manifest.js +1 -1
  161. package/.next/server/server-reference-manifest.json +1 -1
  162. package/.next/static/chunks/{181u38qblp8lz.js → 00b-ysl~m~dr~.js} +1 -1
  163. package/.next/static/chunks/{082m-ou~6nopx.js → 05wpkysi1s2zn.js} +1 -1
  164. package/.next/static/chunks/{0dq~~c79pqq8g.js → 05~pc4d7ucq2m.js} +1 -1
  165. package/.next/static/chunks/{0im751o4n61c7.js → 063dy3uum1lns.js} +1 -1
  166. package/.next/static/chunks/{03~5pxwbxxw-b.js → 0fzfrj9t-fbn_.js} +1 -1
  167. package/.next/static/chunks/{00hpbc4_15cxb.js → 0iwcnbsbx1-v9.js} +1 -1
  168. package/.next/static/chunks/{0cmfkyuf7x3ip.js → 0qvnj6.7m4thb.js} +3 -3
  169. package/.next/static/chunks/{04koh~08gofyy.js → 0tfmi~tv.s~1v.js} +1 -1
  170. package/.next/static/chunks/{05uk96gc~9mni.js → 0ti3v67ixu43p.js} +1 -1
  171. package/.next/static/chunks/{0jp~cs9-zkmqa.js → 0w39f5_vtdn4g.js} +1 -1
  172. package/.next/static/chunks/{14q8_9i5izcwj.js → 15yjjo1fv.muz.js} +1 -1
  173. package/.next/trace +2 -2
  174. package/.next/trace-build +1 -1
  175. package/app/admin/page.tsx +1 -1
  176. package/app/components/DispatchPanel.tsx +1 -1
  177. package/app/components/TaskChatPanel.tsx +9 -2
  178. package/app/components/UserBar.tsx +3 -3
  179. package/app/messages/page.tsx +1 -1
  180. package/app/node/page.tsx +1 -1
  181. package/app/nodes/page.tsx +1 -1
  182. package/app/settings/networks/page.tsx +3 -3
  183. package/app/settings/page.tsx +2 -2
  184. package/app/settings/tokens/page.tsx +1 -1
  185. package/package.json +1 -1
  186. /package/.next/static/{fBBOqrPbHswdz_woUXk6R → 6uvBPCkdDwXnefcWYkQL2}/_buildManifest.js +0 -0
  187. /package/.next/static/{fBBOqrPbHswdz_woUXk6R → 6uvBPCkdDwXnefcWYkQL2}/_clientMiddlewareManifest.js +0 -0
  188. /package/.next/static/{fBBOqrPbHswdz_woUXk6R → 6uvBPCkdDwXnefcWYkQL2}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.11"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.13"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,59746,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e.includes("T")?e:e.replace(" ","T")+"Z");return Number.isFinite(t)?t:null}function s(e){let s=t(e);if(null===s)return null;let r=Math.floor((Date.now()-s)/1e3);return r<0?"just now":r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}e.s(["parseHubTime",0,t,"relativeAgo",0,s],59746),e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){return s(e)??"--"}],3479)},76161,e=>{"use strict";var t=e.i(22381),s=e.i(23910),r=e.i(56839);let a={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let r={width:s,height:s},a={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:o,cta:l,compact:c=!1}){let x=a[e],d=s??x.title,h=o??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),l&&(0,t.jsx)("div",{className:"mt-4",children:l.href?(0,t.jsxs)(r.default,{href:l.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:l.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function o({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function l({cmd:e}){let[r,a]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":r?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:r?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(o,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):s>0?(0,t.jsx)(o,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(o,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(l,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},21743,e=>{"use strict";var t=e.i(22381),s=e.i(23910),r=e.i(56839),a=e.i(3479),n=e.i(76161);e.s(["default",0,function(){let[e,i]=(0,s.useState)([]),[o,l]=(0,s.useState)(!0),[c,x]=(0,s.useState)(""),[d,h]=(0,s.useState)({}),m=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();i(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let y=async()=>{if(c.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),s=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:c})}),r=await s.json();r.ok?(h({token:r.token}),x(""),m()):h({error:r.error})}catch{h({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:s}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:s,token_id:e})}),m()}catch{}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(r.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:y,disabled:!c.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)(n.EmptyState,{variant:"tokens",compact:!0,sub:"Tokens authenticate CLI tools and external integrations. Sign in with V3 auth, then create one above."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,a.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,59746,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e.includes("T")?e:e.replace(" ","T")+"Z");return Number.isFinite(t)?t:null}function s(e){let s=t(e);if(null===s)return null;let r=Math.floor((Date.now()-s)/1e3);return r<0?"just now":r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}e.s(["parseHubTime",0,t,"relativeAgo",0,s],59746),e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){return s(e)??"--"}],3479)},76161,e=>{"use strict";var t=e.i(22381),s=e.i(23910),r=e.i(56839);let a={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let r={width:s,height:s},a={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...r,children:(0,t.jsxs)("g",{...a,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:o,cta:l,compact:c=!1}){let x=a[e],d=s??x.title,h=o??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),l&&(0,t.jsx)("div",{className:"mt-4",children:l.href?(0,t.jsxs)(r.default,{href:l.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:l.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[l.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function o({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function l({cmd:e}){let[r,a]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":r?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:r?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(o,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):s>0?(0,t.jsx)(o,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(o,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(l,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},21743,e=>{"use strict";var t=e.i(22381),s=e.i(23910),r=e.i(56839),a=e.i(3479),n=e.i(76161);e.s(["default",0,function(){let[e,i]=(0,s.useState)([]),[o,l]=(0,s.useState)(!0),[c,x]=(0,s.useState)(""),[d,h]=(0,s.useState)({}),m=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/hub/tokens"),t=await e.json();i(t.tokens||[])}catch{}finally{l(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let y=async()=>{if(c.trim())try{let e=sessionStorage.getItem("anet_v3_auth");if(!e)return;let{token:t}=JSON.parse(e),s=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create_token",token:t,name:c})}),r=await s.json();r.ok?(h({token:r.token}),x(""),m()):h({error:r.error})}catch{h({error:"Failed"})}},g=async e=>{try{let t=sessionStorage.getItem("anet_v3_auth");if(!t)return;let{token:s}=JSON.parse(t);await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"revoke_token",token:s,token_id:e})}),m()}catch{}};return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,t.jsx)(r.default,{href:"/settings",className:"text-gray-500 hover:text-gray-300 text-sm lg:ml-0 ml-10",children:"← Settings"}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:"API Tokens"})]}),(0,t.jsxs)("div",{className:"max-w-2xl space-y-6",children:[(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Create Token"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"Token name (e.g. my-cli)",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,t.jsx)("button",{onClick:y,disabled:!c.trim(),className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 text-white text-sm rounded-lg transition-colors",children:"Create"})]}),d.token&&(0,t.jsxs)("div",{className:"mt-3 bg-green-500/5 border border-green-500/20 rounded-lg px-3 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-green-400 mb-1",children:"Token created (copy now, shown only once):"}),(0,t.jsx)("code",{className:"text-sm text-green-300 break-all select-all",children:d.token})]}),d.error&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400",children:d.error})]}),(0,t.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-3",children:["Active Tokens (",e.length,")"]}),o?(0,t.jsx)("div",{className:"animate-pulse space-y-2",children:[1,2].map(e=>(0,t.jsx)("div",{className:"h-12 bg-gray-800/20 rounded"},e))}):0===e.length?(0,t.jsx)(n.EmptyState,{variant:"tokens",compact:!0,sub:"Tokens authenticate CLI tools and external integrations. Sign in with V3 auth, then create one above."}):(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-white font-medium",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${"full"===e.scope?"text-cyan-300 border-cyan-500/20 bg-cyan-500/5":"text-gray-400 border-gray-600/20"}`,children:e.scope})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[e.token_id," · network: ",e.network_id?.slice(0,12)||"--"," · used ",(0,a.timeAgo)(e.last_used_at)]})]}),(0,t.jsx)("button",{onClick:()=>g(e.token_id),className:"text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-800/30 hover:bg-red-500/10 transition-colors",children:"Revoke"})]},e.token_id))})]})]})]})}])}]);