@sleep2agi/agent-network-dashboard 0.6.1-preview.3 → 0.6.2-preview.0

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 (145) 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 +3 -3
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  20. package/.next/server/app/admin.html +1 -1
  21. package/.next/server/app/admin.rsc +1 -1
  22. package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
  23. package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
  25. package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  26. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
  28. package/.next/server/app/index.html +2 -2
  29. package/.next/server/app/index.rsc +2 -2
  30. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  31. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  32. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  33. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  35. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/login.html +2 -2
  37. package/.next/server/app/login.rsc +2 -2
  38. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  39. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  40. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  41. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  43. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  44. package/.next/server/app/logs.html +1 -1
  45. package/.next/server/app/logs.rsc +1 -1
  46. package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
  47. package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
  48. package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
  49. package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
  50. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
  51. package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
  52. package/.next/server/app/messages.html +1 -1
  53. package/.next/server/app/messages.rsc +1 -1
  54. package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
  55. package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
  56. package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
  57. package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
  58. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
  59. package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
  60. package/.next/server/app/node.html +1 -1
  61. package/.next/server/app/node.rsc +1 -1
  62. package/.next/server/app/node.segments/_full.segment.rsc +1 -1
  63. package/.next/server/app/node.segments/_head.segment.rsc +1 -1
  64. package/.next/server/app/node.segments/_index.segment.rsc +1 -1
  65. package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
  66. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
  67. package/.next/server/app/node.segments/node.segment.rsc +1 -1
  68. package/.next/server/app/nodes.html +1 -1
  69. package/.next/server/app/nodes.rsc +1 -1
  70. package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
  71. package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
  72. package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
  73. package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
  74. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
  75. package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
  76. package/.next/server/app/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/server-logs.html +1 -1
  78. package/.next/server/app/server-logs.rsc +1 -1
  79. package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
  80. package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
  81. package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
  82. package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
  83. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
  84. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
  85. package/.next/server/app/servers.html +1 -1
  86. package/.next/server/app/servers.rsc +1 -1
  87. package/.next/server/app/servers.segments/_full.segment.rsc +1 -1
  88. package/.next/server/app/servers.segments/_head.segment.rsc +1 -1
  89. package/.next/server/app/servers.segments/_index.segment.rsc +1 -1
  90. package/.next/server/app/servers.segments/_tree.segment.rsc +1 -1
  91. package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +1 -1
  92. package/.next/server/app/servers.segments/servers.segment.rsc +1 -1
  93. package/.next/server/app/settings/networks.html +1 -1
  94. package/.next/server/app/settings/networks.rsc +1 -1
  95. package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
  96. package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
  97. package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
  98. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
  99. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
  100. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
  101. package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
  102. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/settings/tokens.html +1 -1
  104. package/.next/server/app/settings/tokens.rsc +1 -1
  105. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
  106. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
  107. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
  108. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
  109. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
  110. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
  111. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
  112. package/.next/server/app/settings.html +2 -2
  113. package/.next/server/app/settings.rsc +2 -2
  114. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  115. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  116. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  117. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  118. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  119. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  120. package/.next/server/app/tasks.html +1 -1
  121. package/.next/server/app/tasks.rsc +1 -1
  122. package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
  123. package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
  124. package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
  125. package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
  126. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
  127. package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
  128. package/.next/server/chunks/ssr/[root-of-the-server]__0~yeykb._.js +1 -1
  129. package/.next/server/chunks/ssr/[root-of-the-server]__0~yeykb._.js.map +1 -1
  130. package/.next/server/chunks/ssr/p247-dash-release_app_0va683w._.js +1 -1
  131. package/.next/server/chunks/ssr/p247-dash-release_app_0va683w._.js.map +1 -1
  132. package/.next/server/chunks/ssr/p247-dash-release_app_0~d5sb9._.js +1 -1
  133. package/.next/server/chunks/ssr/p247-dash-release_app_0~d5sb9._.js.map +1 -1
  134. package/.next/server/middleware-build-manifest.js +3 -3
  135. package/.next/server/pages/404.html +1 -1
  136. package/.next/server/pages/500.html +1 -1
  137. package/.next/static/chunks/{005fo49.qji8x.js → 0nitzk8qp3k8d.js} +1 -1
  138. package/.next/static/chunks/{0jvjwyu5gb48p.js → 0q8p5b07wot4g.js} +1 -1
  139. package/.next/static/chunks/{0mdl.keibdlsh.js → 13kcrxiilctt2.js} +1 -1
  140. package/.next/trace +2 -2
  141. package/.next/trace-build +1 -1
  142. package/package.json +1 -1
  143. /package/.next/static/{V4DKnWEb88U3hb7M7-ogj → akiYHIKYwhU8FKdRFT_bq}/_buildManifest.js +0 -0
  144. /package/.next/static/{V4DKnWEb88U3hb7M7-ogj → akiYHIKYwhU8FKdRFT_bq}/_clientMiddlewareManifest.js +0 -0
  145. /package/.next/static/{V4DKnWEb88U3hb7M7-ogj → akiYHIKYwhU8FKdRFT_bq}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../p247-dash-release/app/components/utils.ts","../../../../../p247-dash-release/app/components/AliasAvatar.tsx","../../../../../p247-dash-release/app/components/EmptyState.tsx","../../../../../p247-dash-release/app/lib/hooks.ts","../../../../../p247-dash-release/package.json.%5Bjson%5D.mjs","../../../../../p247-dash-release/app/lib/version.ts"],"sourcesContent":["/** Round 82: strip the most common markdown markup from agent-to-agent\n * task / message bodies so single-line table previews read cleanly.\n * Full original content stays in the expanded row / drawer / title=. */\nexport function previewContent(raw: string | null | undefined): string {\n if (!raw) return '--';\n return raw\n .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1') // images: ![alt](src) → alt\n .replace(/\\[([^\\]]+)\\]\\([^)]*\\)/g, '$1') // links: [text](href) → text\n .replace(/`([^`]+)`/g, '$1') // inline code: `x` → x\n .replace(/\\s+/g, ' ') // collapse whitespace\n .trim() || '--';\n}\n\n// Round 44 / Loop: timeAgo now delegates to the shared lib/time helper.\n// The old in-line `replace + 'Z'` parse appended a Z to already-ISO\n// inputs (producing \"…ZZ\", browser-fragile) — strict-superset semantics\n// preserved for SQL-style inputs, fixed for ISO. Plus a 'just now' fallback\n// when clock skew puts the timestamp in the future. Five callers benefit:\n// /admin · /logs · /settings/networks · InboxPanel · /messages.\nimport { relativeAgo } from '../lib/time';\nexport function timeAgo(dateStr: string): string {\n return relativeAgo(dateStr) ?? '--';\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n","/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\nfunction isGrokAlias(alias: string) {\n return /\\bgrok\\b|grok-build|grok测试员|grok-demo/i.test(alias);\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n if (isGrokAlias(alias)) {\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${className}`}\n style={{\n width: size,\n height: size,\n backgroundImage: 'url(/vendors/grok.svg)',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '68% 68%',\n }}\n title={alias}\n aria-hidden\n />\n );\n }\n\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/** Round 105 (issue #90): centered card shell so the Overview empty state\n * reads as an intentional, layout-aligned card instead of bare text\n * floating in the content column. */\nfunction EmptyCard({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"max-w-2xl mx-auto rounded-xl border border-[#26262b] bg-[#161618] shadow-lg shadow-black/20\">\n {children}\n </div>\n );\n}\n\n/**\n * Overview-specific variant. Three cases:\n * 1. network-mismatch — agents exist globally, none in this network\n * 2. agents-offline — 0 registered now BUT task history exists, so this\n * is NOT a first run (round 105 / issue #90: showing \"Spin up your\n * first agent\" next to \"acked: 499\" was misleading)\n * 3. true first-run — 0 agents, 0 history → quickstart command\n */\nexport function NodesEmptyState({\n hint,\n taskHistoryCount = 0,\n}: {\n hint?: { global_count?: number; filtered_network?: string };\n taskHistoryCount?: number;\n}) {\n if (hint?.global_count) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n </EmptyCard>\n );\n }\n\n // Round 105 (issue #90): there's task history but no agents online right\n // now — they finished or disconnected. Don't pitch a first-run setup;\n // point at the history instead.\n if (taskHistoryCount > 0) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents online\"\n sub={`Every agent in this network is currently offline. ${taskHistoryCount.toLocaleString()} task${taskHistoryCount === 1 ? '' : 's'} in history — they may have finished their work or disconnected.`}\n cta={{ label: 'View task history', href: '/tasks' }}\n />\n </EmptyCard>\n );\n }\n\n // Round 52: true empty state (zero agents anywhere) — show the\n // quickstart command inline so users don't have to leave the dashboard\n // to figure out how to spin up their first agent.\n return (\n <EmptyCard>\n <div className=\"text-center py-16 px-4\" role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <svg viewBox=\"0 0 64 64\" width={56} height={56}>\n <g stroke=\"currentColor\" strokeWidth=\"1.5\" fill=\"none\">\n <rect x=\"10\" y=\"20\" width=\"44\" height=\"28\" rx=\"2\" />\n <rect x=\"20\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"32\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"44\" y=\"32\" width=\"4\" height=\"8\" opacity=\"0.5\" />\n <line x1=\"10\" y1=\"26\" x2=\"54\" y2=\"26\" opacity=\"0.4\" />\n <circle cx=\"14\" cy=\"23\" r=\"0.8\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <h3 className=\"font-medium text-gray-300 text-base\">Spin up your first agent</h3>\n <p className=\"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed\">\n Run this in a fresh terminal to register an agent with this CommHub:\n </p>\n <div className=\"mt-4 inline-block\">\n <QuickstartCommand cmd=\"npx --yes @sleep2agi/agent-network init\" />\n </div>\n {/* #214 F6: expectation management — without this line, users\n copy the command and stare at an empty screen not knowing\n what to wait for. The page polls every 5s, so the node\n really does appear by itself. */}\n <p className=\"text-gray-600 text-xs mt-3 max-w-md mx-auto\">\n Once the agent connects, it appears here automatically within a\n few seconds — no refresh needed.\n </p>\n <div className=\"mt-3\">\n <a\n href=\"https://anet.sh\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300\"\n >\n Full quickstart guide\n <span aria-hidden>→</span>\n </a>\n </div>\n </div>\n </EmptyCard>\n );\n}\n\n/** Code block + inline copy button used by the empty-Overview first-run\n * CTA. State lives here so the parent stays stateless. */\nfunction QuickstartCommand({ cmd }: { cmd: string }) {\n const [copied, setCopied] = useState(false);\n const onCopy = async () => {\n try {\n await navigator.clipboard.writeText(cmd);\n setCopied(true);\n setTimeout(() => setCopied(false), 1800);\n } catch {}\n };\n return (\n <div className=\"anet-empty-cmd flex items-start sm:items-center gap-2 bg-[#0e0e10] border border-[#26262b] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm\">\n {/* #209 R44: long quickstart commands (e.g. the `npm install -g …`\n variant) overflowed the empty-state card horizontally on phones\n because <code> defaults to white-space:pre. break-all on mobile\n lets them wrap inside the box; sm: up restores normal wrapping\n so desktop monospace lines stay clean. items-start on phones\n aligns the Copy button to the top so a wrapped 2-line command\n doesn't bottom-anchor the button. */}\n <code className=\"text-cyan-300 font-mono select-all min-w-0 break-all sm:break-normal\">{cmd}</code>\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={copied ? 'Copied' : 'Copy command'}\n className=\"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1c1c1f] transition-colors\"\n >\n {copied ? (\n <span className=\"flex items-center gap-1 text-green-400\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n Copied\n </span>\n ) : (\n <span className=\"flex items-center gap-1\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n Copy\n </span>\n )}\n </button>\n </div>\n );\n}\n","import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n // keepPreviousData: /messages grows `limit` when the user asks for older\n // history (#217 M5) — without it the key change would blank the list and\n // flash the skeleton while the bigger page is in flight.\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n { ...SWR_OPTIONS, keepPreviousData: true },\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n","\"use turbopack no side effects\";\nexport default {\"name\":\"@sleep2agi/agent-network-dashboard\",\"version\":\"0.6.1-preview.3\",\"description\":\"Agent Network Dashboard — Web UI for managing AI Agent networks\",\"main\":\"apps/desktop/electron/main.cjs\",\"scripts\":{\"dev\":\"next dev\",\"build\":\"next build\",\"start\":\"next start\",\"lint\":\"eslint\",\"app:android:init\":\"npx cap add android\",\"app:android:sync\":\"npx cap sync android\",\"app:android:open\":\"npx cap open android\",\"app:ios:init\":\"npx cap add ios\",\"app:ios:sync\":\"npx cap sync ios\",\"app:ios:open\":\"npx cap open ios\",\"app:desktop\":\"electron apps/desktop/electron/main.cjs\",\"app:desktop:pack\":\"electron-builder --config electron-builder.json\",\"prepublishOnly\":\"[ -f .next/BUILD_ID ] || (echo 'prepublishOnly: .next/BUILD_ID missing — run npm run build first (see commit 05c1ebf body for R224 chunk-500 root cause)' >&2 && exit 1)\"},\"bin\":{\"agent-network-dashboard\":\"./bin/start.js\"},\"homepage\":\"https://anet.sh\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/sleep2agi/agent-network-dashboard\"},\"bugs\":{\"url\":\"https://github.com/sleep2agi/agent-network-dashboard/issues\"},\"author\":\"sleep2agi\",\"license\":\"Apache-2.0\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@capacitor/core\":\"^7.4.4\",\"next\":\"16.2.3\",\"react\":\"19.2.4\",\"react-dom\":\"19.2.4\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"swr\":\"^2.4.1\"},\"devDependencies\":{\"@capacitor/android\":\"^7.4.4\",\"@capacitor/cli\":\"^7.4.4\",\"@capacitor/ios\":\"^7.4.4\",\"@playwright/test\":\"^1.59.1\",\"@tailwindcss/postcss\":\"^4\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"eslint\":\"^9\",\"electron\":\"^39.2.6\",\"electron-builder\":\"^26.0.12\",\"eslint-config-next\":\"16.2.3\",\"tailwindcss\":\"^4\",\"typescript\":\"^5\"}};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cmJvcGFjazovLy9wMjQ3LWRhc2gtcmVsZWFzZS9wYWNrYWdlLmpzb24iXSwic291cmNlc0NvbnRlbnQiOlsie1wibmFtZVwiOlwiQHNsZWVwMmFnaS9hZ2VudC1uZXR3b3JrLWRhc2hib2FyZFwiLFwidmVyc2lv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iOlwiXjE5XCIsXCJAdHlwZXMvcmVhY3QtZG9tXCI6XCJeMTlcIixcImVzbGludFwiOlwiXjlcIixcImVsZWN0cm9uXCI6XCJeMzkuMi42XCIsXCJlbGVjdHJvbi1idWlsZGVyXCI6XCJeMjYuMC4xMlwiLFwiZXNsaW50LWNvbmZpZy1uZXh0XCI6XCIxNi4yLjNcIixcInRhaWx3aW5kY3NzXCI6XCJeNFwiLFwidHlwZXNjcmlwdFwiOlwiXjVcIn19Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=","/** Dashboard package version sourced from package.json at build time.\n * Importing JSON requires `resolveJsonModule: true` in tsconfig, which\n * Next sets by default. Bumping is automated by the publish flow, so this\n * surfaces the real preview number in Settings → Dashboard. */\nimport pkg from '../../package.json' assert { type: 'json' };\n\nexport const DASHBOARD_VERSION: string = pkg.version;\n"],"names":["previewContent","raw","replace","trim","timeAgo","dateStr","statusColor","status","hasSse","AVATAR_HUES","aliasAvatarColors","alias","h","i","length","charCodeAt","hue","bg","ring","text","aliasInitial","ch","match","toUpperCase","isGrokAlias","test","AliasAvatar","size","className","style","width","height","backgroundImage","backgroundPosition","backgroundRepeat","backgroundSize","title","c","fs","Math","max","round","fontSize","backgroundColor","borderColor","color","DEFAULTS","nodes","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","s","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","role","href","label","onClick","EmptyCard","children","NodesEmptyState","hint","taskHistoryCount","global_count","toLocaleString","QuickstartCommand","cmd","target","rel","copied","setCopied","onCopy","navigator","clipboard","writeText","setTimeout","type","fetcher","url","res","fetch","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","count","source","useStats","stats","ok","useMessages","keepPreviousData"],"mappings":"4GAmBA,IAAA,EAAA,EAAA,CAAA,CAAA,+BAhBO,SAAwBC,AAAfD,CAA6C,SAC3D,AAAKC,GACEA,CADH,CAAM,AAEPC,OAAO,AAFO,CAEN,0BAA2B,MAAQ,AAC3CA,OAAO,CAAC,oBAD+D,KACrC,MAAS,AAC3CA,OAAO,CAAC,aAAc,MAAqB,AAC3CA,GAFyE,IAElE,CAAC,OAAQ,KAA2B,AAC3CC,GAFkE,CAE9D,IAAM,IACf,UAFsE,IAW/D,SAAiBE,AAARD,CAAuB,EACrC,MAAO,CAAA,EAAA,EAAA,WAAA,AAAW,EAACC,IAAY,IACjC,6CCjBA,IAAMI,EAAc,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAI,GAAG,CAEnD,SAASC,EAAkBC,CAAa,EAC7C,IAAIC,EAAI,EACR,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAMG,MAAM,CAAED,IAAKD,EAAKA,AAAI,KAAKD,EAAMI,UAAU,CAACF,KAAQ,EAC9E,IAAMG,EAAMP,CAAW,CAACG,EAAIH,EAAYK,MAAM,CAAC,CAC/C,MAAO,CACLG,GAAI,CAAC,IAAI,EAAED,EAAI,SAAS,CAAC,CACzBE,KAAM,CAAC,IAAI,EAAEF,EAAI,SAAS,CAAC,CAC3BG,KAAM,CAAC,IAAI,EAAEH,EAAI,SAAS,CAAC,AAC7B,CACF,CAEO,SAASI,EAAaT,CAAc,SACzC,AAAKA,EAEEU,CADIV,CADP,CACaR,EADL,EACS,GAAGmB,KAAK,CAAC,kBAAkB,CAAC,EAAE,EAAIX,EAAMR,IAAI,EAAE,CAAC,EAAE,EAAI,GAAA,EAChEoB,WAAW,GAFF,GAGrB,sBAYO,SAASG,AAAY,OAAEf,CAAK,MAAEgB,EAAO,EAAE,CAAEC,YAAY,EAAE,CAAoB,EAChF,GAVO,CAUHJ,wCAV4CC,IAAI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AE,CAAG,CAAA,EAAA,EAAA,YAAA,AAAY,IAC5B,MAAEK,CAAI,OAAEC,CAAK,WAAEC,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EACvCR,EAAY,kBAAmBC,GAC/Bb,EACAS,GAEF,MAAO,CAAEY,SAAUH,GAAMG,UAAY,EAAE,CAAErC,KAAMkC,GAAMI,YAAOH,YAAOC,CAAU,CAC/E,eA6BO,SAASe,EACd,GAAM,WAAEtB,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,YAAY,AAAZ,IAChB,MAAEK,CAAI,OAAEC,CAAK,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EAACP,EAAY,iBAAkBC,GAAYb,EAASS,GAClF,MAAO,CAAE2B,MAAOlB,GAAMmB,GAAKnB,EAAO,KAAMC,OAAM,CAChD,eArBO,SAAkBS,AAATD,CAAwC,EACtD,GAAM,WAAEd,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,YAAA,AAAY,IAC5BgB,EAAQ,IAAIC,gBAAgB,CAAEC,MAAO,MAAO,GAAGH,CAAM,AAAC,GAAGI,QAAQ,GACjE,MAAEd,CAAI,OAAEC,CAAK,WAAEC,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EACvCR,EAAY,CAAC,eAAe,EAAEiB,EAAAA,CAAO,CAAEhB,GACvCb,EACAS,GAEF,MAAO,CACLpE,MAAO6E,GAAM7E,OAAS,EAAE,CACxB4F,MAAOf,GAAMe,OAAS,EACtBC,OAAQhB,GAAMgB,aACdf,YACAC,CACF,CACF,uDCxDsE"}
1
+ {"version":3,"sources":["../../../../../p247-dash-release/app/components/utils.ts","../../../../../p247-dash-release/app/components/AliasAvatar.tsx","../../../../../p247-dash-release/app/components/EmptyState.tsx","../../../../../p247-dash-release/app/lib/hooks.ts","../../../../../p247-dash-release/package.json.%5Bjson%5D.mjs","../../../../../p247-dash-release/app/lib/version.ts"],"sourcesContent":["/** Round 82: strip the most common markdown markup from agent-to-agent\n * task / message bodies so single-line table previews read cleanly.\n * Full original content stays in the expanded row / drawer / title=. */\nexport function previewContent(raw: string | null | undefined): string {\n if (!raw) return '--';\n return raw\n .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1') // images: ![alt](src) → alt\n .replace(/\\[([^\\]]+)\\]\\([^)]*\\)/g, '$1') // links: [text](href) → text\n .replace(/`([^`]+)`/g, '$1') // inline code: `x` → x\n .replace(/\\s+/g, ' ') // collapse whitespace\n .trim() || '--';\n}\n\n// Round 44 / Loop: timeAgo now delegates to the shared lib/time helper.\n// The old in-line `replace + 'Z'` parse appended a Z to already-ISO\n// inputs (producing \"…ZZ\", browser-fragile) — strict-superset semantics\n// preserved for SQL-style inputs, fixed for ISO. Plus a 'just now' fallback\n// when clock skew puts the timestamp in the future. Five callers benefit:\n// /admin · /logs · /settings/networks · InboxPanel · /messages.\nimport { relativeAgo } from '../lib/time';\nexport function timeAgo(dateStr: string): string {\n return relativeAgo(dateStr) ?? '--';\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n","/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\nfunction isGrokAlias(alias: string) {\n return /\\bgrok\\b|grok-build|grok测试员|grok-demo/i.test(alias);\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n if (isGrokAlias(alias)) {\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${className}`}\n style={{\n width: size,\n height: size,\n backgroundImage: 'url(/vendors/grok.svg)',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '68% 68%',\n }}\n title={alias}\n aria-hidden\n />\n );\n }\n\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/** Round 105 (issue #90): centered card shell so the Overview empty state\n * reads as an intentional, layout-aligned card instead of bare text\n * floating in the content column. */\nfunction EmptyCard({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"max-w-2xl mx-auto rounded-xl border border-[#26262b] bg-[#161618] shadow-lg shadow-black/20\">\n {children}\n </div>\n );\n}\n\n/**\n * Overview-specific variant. Three cases:\n * 1. network-mismatch — agents exist globally, none in this network\n * 2. agents-offline — 0 registered now BUT task history exists, so this\n * is NOT a first run (round 105 / issue #90: showing \"Spin up your\n * first agent\" next to \"acked: 499\" was misleading)\n * 3. true first-run — 0 agents, 0 history → quickstart command\n */\nexport function NodesEmptyState({\n hint,\n taskHistoryCount = 0,\n}: {\n hint?: { global_count?: number; filtered_network?: string };\n taskHistoryCount?: number;\n}) {\n if (hint?.global_count) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n </EmptyCard>\n );\n }\n\n // Round 105 (issue #90): there's task history but no agents online right\n // now — they finished or disconnected. Don't pitch a first-run setup;\n // point at the history instead.\n if (taskHistoryCount > 0) {\n return (\n <EmptyCard>\n <EmptyState\n variant=\"nodes\"\n title=\"No agents online\"\n sub={`Every agent in this network is currently offline. ${taskHistoryCount.toLocaleString()} task${taskHistoryCount === 1 ? '' : 's'} in history — they may have finished their work or disconnected.`}\n cta={{ label: 'View task history', href: '/tasks' }}\n />\n </EmptyCard>\n );\n }\n\n // Round 52: true empty state (zero agents anywhere) — show the\n // quickstart command inline so users don't have to leave the dashboard\n // to figure out how to spin up their first agent.\n return (\n <EmptyCard>\n <div className=\"text-center py-16 px-4\" role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <svg viewBox=\"0 0 64 64\" width={56} height={56}>\n <g stroke=\"currentColor\" strokeWidth=\"1.5\" fill=\"none\">\n <rect x=\"10\" y=\"20\" width=\"44\" height=\"28\" rx=\"2\" />\n <rect x=\"20\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"32\" y=\"32\" width=\"6\" height=\"8\" opacity=\"0.5\" />\n <rect x=\"44\" y=\"32\" width=\"4\" height=\"8\" opacity=\"0.5\" />\n <line x1=\"10\" y1=\"26\" x2=\"54\" y2=\"26\" opacity=\"0.4\" />\n <circle cx=\"14\" cy=\"23\" r=\"0.8\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <h3 className=\"font-medium text-gray-300 text-base\">Spin up your first agent</h3>\n <p className=\"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed\">\n Run this in a fresh terminal to register an agent with this CommHub:\n </p>\n <div className=\"mt-4 inline-block\">\n <QuickstartCommand cmd=\"npx --yes @sleep2agi/agent-network init\" />\n </div>\n {/* #214 F6: expectation management — without this line, users\n copy the command and stare at an empty screen not knowing\n what to wait for. The page polls every 5s, so the node\n really does appear by itself. */}\n <p className=\"text-gray-600 text-xs mt-3 max-w-md mx-auto\">\n Once the agent connects, it appears here automatically within a\n few seconds — no refresh needed.\n </p>\n <div className=\"mt-3\">\n <a\n href=\"https://anet.sh\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300\"\n >\n Full quickstart guide\n <span aria-hidden>→</span>\n </a>\n </div>\n </div>\n </EmptyCard>\n );\n}\n\n/** Code block + inline copy button used by the empty-Overview first-run\n * CTA. State lives here so the parent stays stateless. */\nfunction QuickstartCommand({ cmd }: { cmd: string }) {\n const [copied, setCopied] = useState(false);\n const onCopy = async () => {\n try {\n await navigator.clipboard.writeText(cmd);\n setCopied(true);\n setTimeout(() => setCopied(false), 1800);\n } catch {}\n };\n return (\n <div className=\"anet-empty-cmd flex items-start sm:items-center gap-2 bg-[#0e0e10] border border-[#26262b] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm\">\n {/* #209 R44: long quickstart commands (e.g. the `npm install -g …`\n variant) overflowed the empty-state card horizontally on phones\n because <code> defaults to white-space:pre. break-all on mobile\n lets them wrap inside the box; sm: up restores normal wrapping\n so desktop monospace lines stay clean. items-start on phones\n aligns the Copy button to the top so a wrapped 2-line command\n doesn't bottom-anchor the button. */}\n <code className=\"text-cyan-300 font-mono select-all min-w-0 break-all sm:break-normal\">{cmd}</code>\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={copied ? 'Copied' : 'Copy command'}\n className=\"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1c1c1f] transition-colors\"\n >\n {copied ? (\n <span className=\"flex items-center gap-1 text-green-400\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n Copied\n </span>\n ) : (\n <span className=\"flex items-center gap-1\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n Copy\n </span>\n )}\n </button>\n </div>\n );\n}\n","import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n // keepPreviousData: /messages grows `limit` when the user asks for older\n // history (#217 M5) — without it the key change would blank the list and\n // flash the skeleton while the bigger page is in flight.\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n { ...SWR_OPTIONS, keepPreviousData: true },\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n","\"use turbopack no side effects\";\nexport default {\"name\":\"@sleep2agi/agent-network-dashboard\",\"version\":\"0.6.2-preview.0\",\"description\":\"Agent Network Dashboard — Web UI for managing AI Agent networks\",\"main\":\"apps/desktop/electron/main.cjs\",\"scripts\":{\"dev\":\"next dev\",\"build\":\"next build\",\"start\":\"next start\",\"lint\":\"eslint\",\"app:android:init\":\"npx cap add android\",\"app:android:sync\":\"npx cap sync android\",\"app:android:open\":\"npx cap open android\",\"app:ios:init\":\"npx cap add ios\",\"app:ios:sync\":\"npx cap sync ios\",\"app:ios:open\":\"npx cap open ios\",\"app:desktop\":\"electron apps/desktop/electron/main.cjs\",\"app:desktop:pack\":\"electron-builder --config electron-builder.json\",\"prepublishOnly\":\"[ -f .next/BUILD_ID ] || (echo 'prepublishOnly: .next/BUILD_ID missing — run npm run build first (see commit 05c1ebf body for R224 chunk-500 root cause)' >&2 && exit 1)\"},\"bin\":{\"agent-network-dashboard\":\"./bin/start.js\"},\"homepage\":\"https://anet.sh\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/sleep2agi/agent-network-dashboard\"},\"bugs\":{\"url\":\"https://github.com/sleep2agi/agent-network-dashboard/issues\"},\"author\":\"sleep2agi\",\"license\":\"Apache-2.0\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@capacitor/core\":\"^7.4.4\",\"next\":\"16.2.3\",\"react\":\"19.2.4\",\"react-dom\":\"19.2.4\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"swr\":\"^2.4.1\"},\"devDependencies\":{\"@capacitor/android\":\"^7.4.4\",\"@capacitor/cli\":\"^7.4.4\",\"@capacitor/ios\":\"^7.4.4\",\"@playwright/test\":\"^1.59.1\",\"@tailwindcss/postcss\":\"^4\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"eslint\":\"^9\",\"electron\":\"^39.2.6\",\"electron-builder\":\"^26.0.12\",\"eslint-config-next\":\"16.2.3\",\"tailwindcss\":\"^4\",\"typescript\":\"^5\"}};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cmJvcGFjazovLy9wMjQ3LWRhc2gtcmVsZWFzZS9wYWNrYWdlLmpzb24iXSwic291cmNlc0NvbnRlbnQiOlsie1wibmFtZVwiOlwiQHNsZWVwMmFnaS9hZ2VudC1uZXR3b3JrLWRhc2hib2FyZFwiLFwidmVyc2lvblwiOlwiMC42LjItcHJldmlldy4wXCIsXCJkZXNjcmlwdGl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JeMTlcIixcImVzbGludFwiOlwiXjlcIixcImVsZWN0cm9uXCI6XCJeMzkuMi42XCIsXCJlbGVjdHJvbi1idWlsZGVyXCI6XCJeMjYuMC4xMlwiLFwiZXNsaW50LWNvbmZpZy1uZXh0XCI6XCIxNi4yLjNcIixcInRhaWx3aW5kY3NzXCI6XCJeNFwiLFwidHlwZXNjcmlwdFwiOlwiXjVcIn19Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=","/** Dashboard package version sourced from package.json at build time.\n * Importing JSON requires `resolveJsonModule: true` in tsconfig, which\n * Next sets by default. Bumping is automated by the publish flow, so this\n * surfaces the real preview number in Settings → Dashboard. */\nimport pkg from '../../package.json' assert { type: 'json' };\n\nexport const DASHBOARD_VERSION: string = pkg.version;\n"],"names":["previewContent","raw","replace","trim","timeAgo","dateStr","statusColor","status","hasSse","AVATAR_HUES","aliasAvatarColors","alias","h","i","length","charCodeAt","hue","bg","ring","text","aliasInitial","ch","match","toUpperCase","isGrokAlias","test","AliasAvatar","size","className","style","width","height","backgroundImage","backgroundPosition","backgroundRepeat","backgroundSize","title","c","fs","Math","max","round","fontSize","backgroundColor","borderColor","color","DEFAULTS","nodes","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","s","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","role","href","label","onClick","EmptyCard","children","NodesEmptyState","hint","taskHistoryCount","global_count","toLocaleString","QuickstartCommand","cmd","target","rel","copied","setCopied","onCopy","navigator","clipboard","writeText","setTimeout","type","fetcher","url","res","fetch","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","count","source","useStats","stats","ok","useMessages","keepP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K,CAAI,OAAEC,CAAK,WAAEC,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EACvCR,EAAY,kBAAmBC,GAC/Bb,EACAS,GAEF,MAAO,CAAEY,SAAUH,GAAMG,UAAY,EAAE,CAAErC,KAAMkC,GAAMI,YAAOH,YAAOC,CAAU,CAC/E,eA6BO,SAASe,EACd,GAAM,WAAEtB,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,YAAY,AAAZ,IAChB,MAAEK,CAAI,OAAEC,CAAK,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EAACP,EAAY,iBAAkBC,GAAYb,EAASS,GAClF,MAAO,CAAE2B,MAAOlB,GAAMmB,GAAKnB,EAAO,KAAMC,OAAM,CAChD,eArBO,SAAkBS,AAATD,CAAwC,EACtD,GAAM,WAAEd,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,YAAA,AAAY,IAC5BgB,EAAQ,IAAIC,gBAAgB,CAAEC,MAAO,MAAO,GAAGH,CAAM,AAAC,GAAGI,QAAQ,GACjE,MAAEd,CAAI,OAAEC,CAAK,WAAEC,CAAS,CAAE,CAAG,CAAA,EAAA,EAAA,OAAA,AAAM,EACvCR,EAAY,CAAC,eAAe,EAAEiB,EAAAA,CAAO,CAAEhB,GACvCb,EACAS,GAEF,MAAO,CACLpE,MAAO6E,GAAM7E,OAAS,EAAE,CACxB4F,MAAOf,GAAMe,OAAS,EACtBC,OAAQhB,GAAMgB,aACdf,YACAC,CACF,CACF,uDCxDsE"}
@@ -1,3 +1,3 @@
1
- module.exports=[34864,a=>{"use strict";var b=a.i(69104),c=a.i(58086);let d=async a=>{let b=await fetch(a);if(401===b.status)throw window.location.assign("/login"),Error("unauthorized");return b.json()},e={refreshInterval:5e3,dedupingInterval:3e3};function f(a,b){if(!b)return a;let c=a.includes("?")?"&":"?";return`${a}${c}network_id=${encodeURIComponent(b)}`}a.s(["useAnetConfig",0,function(){let{data:a}=(0,b.default)("/api/anet/config",d,{refreshInterval:3e4});return{config:a||null}},"useHealth",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/health",d,e);return{health:a||null,error:c}},"useMessages",0,function(a=100){let{networkId:g}=(0,c.useNetworkId)(),{data:h,error:i,isLoading:j}=(0,b.default)(f(`/api/hub/messages?limit=${a}`,g),d,{...e,keepPreviousData:!0});return{messages:h?.messages||[],error:i,isLoading:j}},"useSessions",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h,isLoading:i}=(0,b.default)(f("/api/hub/status",a),d,e);return{sessions:g?.sessions||[],hint:g?._hint,error:h,isLoading:i}},"useStats",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/stats",a),d,e);return{stats:g?.ok?g:null,error:h}},"useTasks",0,function(a){let{networkId:g}=(0,c.useNetworkId)(),h=new URLSearchParams({limit:"100",...a}).toString(),{data:i,error:j,isLoading:k}=(0,b.default)(f(`/api/hub/tasks?${h}`,g),d,e);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:j,isLoading:k}}])},21993,a=>{"use strict";a.s(["DASHBOARD_VERSION",0,"0.6.1-preview.3"],21993)},47376,a=>{"use strict";var b=a.i(91274),c=a.i(31883),d=a.i(18522),e=a.i(34864),f=a.i(21993);a.s(["default",0,function(){let{config:a}=(0,e.useAnetConfig)(),{health:g,error:h}=(0,e.useHealth)(),[i,j]=(0,c.useState)(()=>"cyber"),[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(""),q="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",r="break-all sm:max-w-[320px] sm:text-right";return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0b0b0d] text-gray-100 p-4 sm:p-6",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,b.jsx)("nav",{className:"mb-4 sm:mb-8 flex flex-wrap gap-2 text-xs",children:[{href:"#appearance",label:"Appearance"},{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(a=>(0,b.jsx)("a",{href:a.href,className:"inline-flex min-h-[44px] items-center rounded-md border border-[#26262b] bg-[#0e0e10]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:a.label},a.href))}),(0,b.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,b.jsxs)("div",{id:"appearance",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Appearance"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Theme"}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[{id:"cyber",label:"Dark",swatch:"#0b0b0d"},{id:"light",label:"Light",swatch:"#f6f7f9"}].map(a=>(0,b.jsxs)("button",{onClick:()=>{try{localStorage.setItem("anet-theme",a.id)}catch{}document.documentElement.setAttribute("data-theme",a.id),j(a.id)},"aria-pressed":i===a.id,className:`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm transition-colors ${i===a.id?"border-cyan-500/60 bg-cyan-500/10 text-gray-100":"border-[#26262b] text-gray-400 hover:border-[#3a3a41]"}`,children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"inline-block w-5 h-5 rounded-full border border-black/20 shrink-0",style:{backgroundColor:a.swatch}}),a.label,i===a.id&&(0,b.jsx)("span",{className:"ml-auto text-cyan-400",children:"✓"})]},a.id))})]})]}),(0,b.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,b.jsx)("span",{className:`text-cyan-300 ${r}`,children:a?.hub||"not configured"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:a?.source==="file"?"Local file (~/.anet/config.json)":a?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,b.jsx)("span",{className:`${a?.tokenConfigured?"text-green-400":"text-red-400"} ${r}`,children:a?.tokenConfigured?`Configured (${a.tokenPreview})`:"Not configured"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,b.jsx)("span",{className:`${g?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:g?.auth||"--"})]}),a?.error&&(0,b.jsx)("div",{className:"border-t border-[#26262b] pt-3 text-xs text-gray-600",children:a.error}),(h||g?.ok===!1)&&(0,b.jsxs)("div",{className:"border-t border-red-500/20 pt-3 text-xs space-y-1.5",role:"alert",children:[(0,b.jsx)("div",{className:"text-red-300 font-medium",children:"CommHub unreachable — how to recover:"}),(0,b.jsxs)("div",{className:"text-gray-400",children:["1. Check the hub process on the server: ",(0,b.jsx)("code",{className:"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5",children:"anet hub status"})]}),(0,b.jsxs)("div",{className:"text-gray-400",children:["2. Start it if stopped: ",(0,b.jsx)("code",{className:"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5",children:"anet hub start"})]}),(0,b.jsx)("div",{className:"text-gray-400",children:"3. Confirm the Hub URL above matches where the hub actually listens."})]})]})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.version||"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.sessions??"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,b.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.sse_connections??"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.uptime?`${Math.floor(g.uptime/3600)}h ${Math.floor(g.uptime%3600/60)}m`:"--"})]})]})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,b.jsx)("span",{className:`text-gray-300 font-mono ${r}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:f.DASHBOARD_VERSION})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,b.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("input",{type:"password",value:k,onChange:a=>l(a.target.value),placeholder:"Current password",className:"w-full bg-[#0e0e10] border border-[#26262b] 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,b.jsx)("input",{type:"password",value:m,onChange:a=>n(a.target.value),placeholder:"New password",className:"w-full bg-[#0e0e10] border border-[#26262b] 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,b.jsx)("button",{onClick:async()=>{if(!k||!m)return;let a=sessionStorage.getItem("anet_v3_auth");if(!a)return void p("Not logged in with V3 auth");let{token:b}=JSON.parse(a),c=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:b,current_password:k,new_password:m})}),d=await c.json();if(p(d.ok?"Password changed":`Failed: ${d.error}`),d.ok){if(d.token){let b=JSON.parse(a);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...b,token:d.token}))}l(""),n("")}setTimeout(()=>p(""),5e3)},disabled:!k||!m,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),o&&(0,b.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,b.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1c1c1f] text-gray-300 text-sm rounded-lg border border-[#26262b] hover:border-[#3a3a41] transition-colors",children:"Sign out"})]})]}),(0,b.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)(d.default,{href:"/settings/tokens",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,b.jsxs)(d.default,{href:"/settings/networks",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,b.jsxs)(d.default,{href:"/messages",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Messages"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Global timeline of CommHub messages across all agents."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,b.jsxs)(d.default,{href:"/logs",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Audit Log"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Authentication, token rotations, and admin actions."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,b.jsxs)(d.default,{href:"/server-logs",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Server Logs"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Live stdout / stderr from the CommHub server."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]})]})]})]})]})}])}];
1
+ module.exports=[34864,a=>{"use strict";var b=a.i(69104),c=a.i(58086);let d=async a=>{let b=await fetch(a);if(401===b.status)throw window.location.assign("/login"),Error("unauthorized");return b.json()},e={refreshInterval:5e3,dedupingInterval:3e3};function f(a,b){if(!b)return a;let c=a.includes("?")?"&":"?";return`${a}${c}network_id=${encodeURIComponent(b)}`}a.s(["useAnetConfig",0,function(){let{data:a}=(0,b.default)("/api/anet/config",d,{refreshInterval:3e4});return{config:a||null}},"useHealth",0,function(){let{data:a,error:c}=(0,b.default)("/api/hub/health",d,e);return{health:a||null,error:c}},"useMessages",0,function(a=100){let{networkId:g}=(0,c.useNetworkId)(),{data:h,error:i,isLoading:j}=(0,b.default)(f(`/api/hub/messages?limit=${a}`,g),d,{...e,keepPreviousData:!0});return{messages:h?.messages||[],error:i,isLoading:j}},"useSessions",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h,isLoading:i}=(0,b.default)(f("/api/hub/status",a),d,e);return{sessions:g?.sessions||[],hint:g?._hint,error:h,isLoading:i}},"useStats",0,function(){let{networkId:a}=(0,c.useNetworkId)(),{data:g,error:h}=(0,b.default)(f("/api/hub/stats",a),d,e);return{stats:g?.ok?g:null,error:h}},"useTasks",0,function(a){let{networkId:g}=(0,c.useNetworkId)(),h=new URLSearchParams({limit:"100",...a}).toString(),{data:i,error:j,isLoading:k}=(0,b.default)(f(`/api/hub/tasks?${h}`,g),d,e);return{tasks:i?.tasks||[],count:i?.count??0,source:i?.source,error:j,isLoading:k}}])},21993,a=>{"use strict";a.s(["DASHBOARD_VERSION",0,"0.6.2-preview.0"],21993)},47376,a=>{"use strict";var b=a.i(91274),c=a.i(31883),d=a.i(18522),e=a.i(34864),f=a.i(21993);a.s(["default",0,function(){let{config:a}=(0,e.useAnetConfig)(),{health:g,error:h}=(0,e.useHealth)(),[i,j]=(0,c.useState)(()=>"cyber"),[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(""),q="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",r="break-all sm:max-w-[320px] sm:text-right";return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0b0b0d] text-gray-100 p-4 sm:p-6",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,b.jsx)("nav",{className:"mb-4 sm:mb-8 flex flex-wrap gap-2 text-xs",children:[{href:"#appearance",label:"Appearance"},{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(a=>(0,b.jsx)("a",{href:a.href,className:"inline-flex min-h-[44px] items-center rounded-md border border-[#26262b] bg-[#0e0e10]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:a.label},a.href))}),(0,b.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,b.jsxs)("div",{id:"appearance",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Appearance"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Theme"}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[{id:"cyber",label:"Dark",swatch:"#0b0b0d"},{id:"light",label:"Light",swatch:"#f6f7f9"}].map(a=>(0,b.jsxs)("button",{onClick:()=>{try{localStorage.setItem("anet-theme",a.id)}catch{}document.documentElement.setAttribute("data-theme",a.id),j(a.id)},"aria-pressed":i===a.id,className:`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm transition-colors ${i===a.id?"border-cyan-500/60 bg-cyan-500/10 text-gray-100":"border-[#26262b] text-gray-400 hover:border-[#3a3a41]"}`,children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"inline-block w-5 h-5 rounded-full border border-black/20 shrink-0",style:{backgroundColor:a.swatch}}),a.label,i===a.id&&(0,b.jsx)("span",{className:"ml-auto text-cyan-400",children:"✓"})]},a.id))})]})]}),(0,b.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,b.jsx)("span",{className:`text-cyan-300 ${r}`,children:a?.hub||"not configured"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:a?.source==="file"?"Local file (~/.anet/config.json)":a?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,b.jsx)("span",{className:`${a?.tokenConfigured?"text-green-400":"text-red-400"} ${r}`,children:a?.tokenConfigured?`Configured (${a.tokenPreview})`:"Not configured"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,b.jsx)("span",{className:`${g?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:g?.auth||"--"})]}),a?.error&&(0,b.jsx)("div",{className:"border-t border-[#26262b] pt-3 text-xs text-gray-600",children:a.error}),(h||g?.ok===!1)&&(0,b.jsxs)("div",{className:"border-t border-red-500/20 pt-3 text-xs space-y-1.5",role:"alert",children:[(0,b.jsx)("div",{className:"text-red-300 font-medium",children:"CommHub unreachable — how to recover:"}),(0,b.jsxs)("div",{className:"text-gray-400",children:["1. Check the hub process on the server: ",(0,b.jsx)("code",{className:"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5",children:"anet hub status"})]}),(0,b.jsxs)("div",{className:"text-gray-400",children:["2. Start it if stopped: ",(0,b.jsx)("code",{className:"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5",children:"anet hub start"})]}),(0,b.jsx)("div",{className:"text-gray-400",children:"3. Confirm the Hub URL above matches where the hub actually listens."})]})]})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.version||"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.sessions??"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,b.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.sse_connections??"--"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:g?.uptime?`${Math.floor(g.uptime/3600)}h ${Math.floor(g.uptime%3600/60)}m`:"--"})]})]})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,b.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,b.jsx)("span",{className:`text-gray-300 font-mono ${r}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:f.DASHBOARD_VERSION})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,b.jsxs)("div",{className:q,children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,b.jsx)("span",{className:`text-gray-300 ${r}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,b.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("input",{type:"password",value:k,onChange:a=>l(a.target.value),placeholder:"Current password",className:"w-full bg-[#0e0e10] border border-[#26262b] 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,b.jsx)("input",{type:"password",value:m,onChange:a=>n(a.target.value),placeholder:"New password",className:"w-full bg-[#0e0e10] border border-[#26262b] 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,b.jsx)("button",{onClick:async()=>{if(!k||!m)return;let a=sessionStorage.getItem("anet_v3_auth");if(!a)return void p("Not logged in with V3 auth");let{token:b}=JSON.parse(a),c=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:b,current_password:k,new_password:m})}),d=await c.json();if(p(d.ok?"Password changed":`Failed: ${d.error}`),d.ok){if(d.token){let b=JSON.parse(a);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...b,token:d.token}))}l(""),n("")}setTimeout(()=>p(""),5e3)},disabled:!k||!m,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),o&&(0,b.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]}),(0,b.jsxs)("section",{className:"bg-[#161618] border border-[#26262b] rounded-xl p-5",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,b.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1c1c1f] text-gray-300 text-sm rounded-lg border border-[#26262b] hover:border-[#3a3a41] transition-colors",children:"Sign out"})]})]}),(0,b.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,b.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,b.jsx)("div",{className:"flex-1 h-px bg-[#26262b]"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)(d.default,{href:"/settings/tokens",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,b.jsxs)(d.default,{href:"/settings/networks",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,b.jsxs)(d.default,{href:"/messages",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Messages"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Global timeline of CommHub messages across all agents."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,b.jsxs)(d.default,{href:"/logs",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Audit Log"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Authentication, token rotations, and admin actions."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,b.jsxs)(d.default,{href:"/server-logs",className:"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Server Logs"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Live stdout / stderr from the CommHub server."}),(0,b.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]})]})]})]})]})}])}];
2
2
 
3
3
  //# sourceMappingURL=p247-dash-release_app_0va683w._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../p247-dash-release/app/lib/hooks.ts","../../../../../p247-dash-release/package.json.%5Bjson%5D.mjs","../../../../../p247-dash-release/app/lib/version.ts","../../../../../p247-dash-release/app/settings/page.tsx"],"sourcesContent":["import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n // keepPreviousData: /messages grows `limit` when the user asks for older\n // history (#217 M5) — without it the key change would blank the list and\n // flash the skeleton while the bigger page is in flight.\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n { ...SWR_OPTIONS, keepPreviousData: true },\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n","\"use turbopack no side effects\";\nexport default {\"name\":\"@sleep2agi/agent-network-dashboard\",\"version\":\"0.6.1-preview.3\",\"description\":\"Agent Network Dashboard — Web UI for managing AI Agent networks\",\"main\":\"apps/desktop/electron/main.cjs\",\"scripts\":{\"dev\":\"next dev\",\"build\":\"next build\",\"start\":\"next start\",\"lint\":\"eslint\",\"app:android:init\":\"npx cap add android\",\"app:android:sync\":\"npx cap sync android\",\"app:android:open\":\"npx cap open android\",\"app:ios:init\":\"npx cap add ios\",\"app:ios:sync\":\"npx cap sync ios\",\"app:ios:open\":\"npx cap open ios\",\"app:desktop\":\"electron apps/desktop/electron/main.cjs\",\"app:desktop:pack\":\"electron-builder --config electron-builder.json\",\"prepublishOnly\":\"[ -f .next/BUILD_ID ] || (echo 'prepublishOnly: .next/BUILD_ID missing — run npm run build first (see commit 05c1ebf body for R224 chunk-500 root cause)' >&2 && exit 1)\"},\"bin\":{\"agent-network-dashboard\":\"./bin/start.js\"},\"homepage\":\"https://anet.sh\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/sleep2agi/agent-network-dashboard\"},\"bugs\":{\"url\":\"https://github.com/sleep2agi/agent-network-dashboard/issues\"},\"author\":\"sleep2agi\",\"license\":\"Apache-2.0\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@capacitor/core\":\"^7.4.4\",\"next\":\"16.2.3\",\"react\":\"19.2.4\",\"react-dom\":\"19.2.4\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"swr\":\"^2.4.1\"},\"devDependencies\":{\"@capacitor/android\":\"^7.4.4\",\"@capacitor/cli\":\"^7.4.4\",\"@capacitor/ios\":\"^7.4.4\",\"@playwright/test\":\"^1.59.1\",\"@tailwindcss/postcss\":\"^4\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"eslint\":\"^9\",\"electron\":\"^39.2.6\",\"electron-builder\":\"^26.0.12\",\"eslint-config-next\":\"16.2.3\",\"tailwindcss\":\"^4\",\"typescript\":\"^5\"}};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cmJvcGFjazovLy9wMjQ3LWRhc2gtcmVsZWFzZS9wYWNrYWdlLmpzb24iXSwic291cmNlc0NvbnRlbnQiOlsie1wibmFtZVwiOlwiQHNsZWVwMmFnaS9hZ2VudC1uZXR3b3JrLWRhc2hib2FyZFwiLFwidmVyc2lvblwiOlwiMC42LjEtcHJldmlldy4zXCIsXCJkZXNjcmlwdGlvblwiOlwiQWdlbnQgTmV0d29yayBEYXNoYm9hcmQg4oCUIFdlYiBVSSBmb3IgbWFuYWdpbmcgQUkgQWdlbnQgbmV0d29ya3NcIixcIm1haW5cIjpcImFwcHMvZGVza3RvcC9lbGVjdHJvbi9tYWluLmNqc1wiLFwic2NyaXB0c1wiOntcImRldlwiOlwibmV4dCBkZXZcIixcImJ1aWxkXCI6XCJuZXh0IGJ1aWxkXCIsXCJzdGFydFwiOlwibmV4dCBzdGFydFwiLFwibGludFwiOlwiZXNsaW50XCIsXCJhcHA6YW5kcm9pZDppbml0XCI6XCJucHggY2FwIGFkZCBhbmRyb2lkXCIsXCJhcHA6YW5kcm9pZDpzeW5jXCI6XCJucHggY2FwIHN5bmMgYW5kcm9pZFwiLFwiYXBwOmFuZHJvaWQ6b3BlblwiOlwibnB4IGNhcCBvcGVuIGFuZHJvaWRcIixcImFwcDppb3M6aW5pdFwiOlwibnB4IGNhcCBhZGQgaW9zXCIsXCJhcHA6aW9zOnN5bmNcIjpcIm5weCBjYXAgc3luYyBpb3NcIixcImFwcDppb3M6b3BlblwiOlwibnB4IGNhcCBvcGVuIGlvc1wiLFwiYXBwOmRlc2t0b3BcIjpcImVsZWN0cm9uIGFwcHMvZ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EuMFwiLFwicmVtYXJrLWdmbVwiOlwiXjQuMC4xXCIsXCJzd3JcIjpcIl4yLjQuMVwifSxcImRldkRlcGVuZGVuY2llc1wiOntcIkBjYXBhY2l0b3IvYW5kcm9pZFwiOlwiXjcuNC40XCIsXCJAY2FwYWNpdG9yL2NsaVwiOlwiXjcuNC40XCIsXCJAY2FwYWNpdG9yL2lvc1wiOlwiXjcuNC40XCIsXCJAcGxheXdyaWdodC90ZXN0XCI6XCJeMS41OS4xXCIsXCJAdGFpbHdpbmRjc3MvcG9zdGNzc1wiOlwiXjRcIixcIkB0eXBlcy9ub2RlXCI6XCJeMjBcIixcIkB0eXBlcy9yZWFjdFwiOlwiXjE5XCIsXCJAdHlwZXMvcmVhY3QtZG9tXCI6XCJeMTlcIixcImVzbGludFwiOlwiXjlcIixcImVsZWN0cm9uXCI6XCJeMzkuMi42XCIsXCJlbGVjdHJvbi1idWlsZGVyXCI6XCJeMjYuMC4xMlwiLFwiZXNsaW50LWNvbmZpZy1uZXh0XCI6XCIxNi4yLjNcIixcInRhaWx3aW5kY3NzXCI6XCJeNFwiLFwidHlwZXNjcmlwdFwiOlwiXjVcIn19Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=","/** Dashboard package version sourced from package.json at build time.\n * Importing JSON requires `resolveJsonModule: true` in tsconfig, which\n * Next sets by default. Bumping is automated by the publish flow, so this\n * surfaces the real preview number in Settings → Dashboard. */\nimport pkg from '../../package.json' assert { type: 'json' };\n\nexport const DASHBOARD_VERSION: string = pkg.version;\n","'use client';\n\nimport { useState } from 'react';\nimport Link from 'next/link';\nimport { useAnetConfig, useHealth } from '../lib/hooks';\nimport { DASHBOARD_VERSION } from '../lib/version';\n\nexport default function SettingsPage() {\n const { config } = useAnetConfig();\n const { health, error: healthError } = useHealth();\n const [theme, setTheme] = useState<string>(() => {\n if (typeof window === 'undefined') return 'cyber';\n try { return localStorage.getItem('anet-theme') || 'cyber'; } catch { return 'cyber'; }\n });\n const [oldPwd, setOldPwd] = useState('');\n const [newPwd, setNewPwd] = useState('');\n const [pwdResult, setPwdResult] = useState('');\n const rowClass = 'flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between';\n const valueClass = 'break-all sm:max-w-[320px] sm:text-right';\n\n return (\n <div className=\"min-h-screen bg-[#0b0b0d] text-gray-100 p-4 sm:p-6\">\n <h1 className=\"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10\">Settings</h1>\n\n {/* Section anchor nav (round 28) — jump to a group instead of scrolling\n through the whole page. Mirrors the section headers below; pages\n with 7+ cards benefit from a visible table-of-contents.\n R3 of #190 mobile polish: matches the /admin chip treatment\n (preview.3) — 44px tap-target + visible border so the chips read\n as tappable rather than as inert headings on 375–390px. */}\n {/* #209 R36: mb-8 → mb-4 sm:mb-8 — same pattern R31 applied to\n /admin's identical jump-nav. Saves 16 px on phones. */}\n <nav className=\"mb-4 sm:mb-8 flex flex-wrap gap-2 text-xs\">\n {[\n { href: '#appearance', label: 'Appearance' },\n { href: '#connection', label: 'Connection' },\n { href: '#account', label: 'Account' },\n { href: '#resources', label: 'Resources' },\n ].map(a => (\n <a key={a.href} href={a.href}\n className=\"inline-flex min-h-[44px] items-center rounded-md border border-[#26262b] bg-[#0e0e10]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors\">\n {a.label}\n </a>\n ))}\n </nav>\n\n <div className=\"max-w-2xl space-y-10\">\n {/* ── Group: Appearance (#217 S6 — Vincent: \"设置里面再来一个\n 优化白色的主题\"). The light theme tokens were restored from\n pre-R8 history; this card is the visible owner of the toggle\n (previously theme switching hid inside Cmd+K only). */}\n <div id=\"appearance\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Appearance</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Theme</h2>\n <div className=\"grid grid-cols-2 gap-3\">\n {([\n { id: 'cyber', label: 'Dark', swatch: '#0b0b0d' },\n { id: 'light', label: 'Light', swatch: '#f6f7f9' },\n ] as const).map(t => (\n <button\n key={t.id}\n onClick={() => {\n try { localStorage.setItem('anet-theme', t.id); } catch {}\n document.documentElement.setAttribute('data-theme', t.id);\n setTheme(t.id);\n }}\n aria-pressed={theme === t.id}\n className={`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm transition-colors ${\n theme === t.id\n ? 'border-cyan-500/60 bg-cyan-500/10 text-gray-100'\n : 'border-[#26262b] text-gray-400 hover:border-[#3a3a41]'\n }`}\n >\n <span\n aria-hidden\n className=\"inline-block w-5 h-5 rounded-full border border-black/20 shrink-0\"\n style={{ backgroundColor: t.swatch }}\n />\n {t.label}\n {theme === t.id && <span className=\"ml-auto text-cyan-400\">✓</span>}\n </button>\n ))}\n </div>\n </section>\n </div>\n\n {/* ── Group: Connection ─────────────────────────────────── */}\n <div id=\"connection\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Connection</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* CommHub Connection */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">CommHub Connection</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500 shrink-0\">Hub URL</span>\n <span className={`text-cyan-300 ${valueClass}`}>{config?.hub || 'not configured'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Config Source</span>\n <span className={`text-gray-300 ${valueClass}`}>\n {config?.source === 'file' ? 'Local file (~/.anet/config.json)' : config?.source === 'runtime-env' ? 'Vercel env vars' : 'Missing'}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Auth Token</span>\n <span className={`${config?.tokenConfigured ? 'text-green-400' : 'text-red-400'} ${valueClass}`}>\n {config?.tokenConfigured ? `Configured (${config.tokenPreview})` : 'Not configured'}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Server Auth</span>\n <span className={`${health?.auth === 'enabled' ? 'text-green-400' : 'text-yellow-400'} sm:text-right`}>\n {health?.auth || '--'}\n </span>\n </div>\n {config?.error && (\n <div className=\"border-t border-[#26262b] pt-3 text-xs text-gray-600\">\n {config.error}\n </div>\n )}\n {/* #214 F5: the red HealthBanner's \"Open Settings\" CTA used to\n land on a read-only page with no next step. When the hub is\n unreachable, give the user actual recovery commands. */}\n {(healthError || health?.ok === false) && (\n <div className=\"border-t border-red-500/20 pt-3 text-xs space-y-1.5\" role=\"alert\">\n <div className=\"text-red-300 font-medium\">CommHub unreachable — how to recover:</div>\n <div className=\"text-gray-400\">1. Check the hub process on the server: <code className=\"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5\">anet hub status</code></div>\n <div className=\"text-gray-400\">2. Start it if stopped: <code className=\"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5\">anet hub start</code></div>\n <div className=\"text-gray-400\">3. Confirm the Hub URL above matches where the hub actually listens.</div>\n </div>\n )}\n </div>\n </section>\n\n {/* Server Info */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Server Info</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500\">Version</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.version || '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Sessions</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.sessions ?? '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">SSE streams <span className=\"text-gray-600\">· server</span></span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.sse_connections ?? '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Uptime</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.uptime ? `${Math.floor(health.uptime / 3600)}h ${Math.floor((health.uptime % 3600) / 60)}m` : '--'}</span>\n </div>\n </div>\n </section>\n\n {/* Dashboard Info */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Dashboard</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500\">Version</span>\n <span className={`text-gray-300 font-mono ${valueClass}`} title=\"From package.json @sleep2agi/agent-network-dashboard\">\n {DASHBOARD_VERSION}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Data Layer</span>\n <span className={`text-gray-300 ${valueClass}`}>SWR (5s refresh, 3s dedup)</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Pages</span>\n <span className={`text-gray-300 ${valueClass}`}>Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings</span>\n </div>\n </div>\n </section>\n </div>\n\n {/* ── Group: Account ────────────────────────────────────── */}\n <div id=\"account\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Account</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* Change Password */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Change Password</h2>\n <div className=\"space-y-3\">\n <input type=\"password\" value={oldPwd} onChange={e => setOldPwd(e.target.value)} placeholder=\"Current password\"\n className=\"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\" />\n <input type=\"password\" value={newPwd} onChange={e => setNewPwd(e.target.value)} placeholder=\"New password\"\n className=\"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\" />\n <button onClick={async () => {\n if (!oldPwd || !newPwd) return;\n const saved = sessionStorage.getItem('anet_v3_auth');\n if (!saved) { setPwdResult('Not logged in with V3 auth'); return; }\n const { token } = JSON.parse(saved);\n const res = await fetch('/api/hub/auth', {\n method: 'POST', headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ action: 'change_password', token, current_password: oldPwd, new_password: newPwd }),\n });\n const data = await res.json();\n setPwdResult(data.ok ? 'Password changed' : `Failed: ${data.error}`);\n if (data.ok) {\n if (data.token) {\n const auth = JSON.parse(saved);\n sessionStorage.setItem('anet_v3_auth', JSON.stringify({ ...auth, token: data.token }));\n }\n setOldPwd('');\n setNewPwd('');\n }\n setTimeout(() => setPwdResult(''), 5000);\n }} disabled={!oldPwd || !newPwd}\n className=\"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors\">\n Change Password\n </button>\n </div>\n {pwdResult && <div className={`mt-2 text-xs ${pwdResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{pwdResult}</div>}\n </section>\n\n {/* Session — tone-neutral, no longer \"danger zone\" red */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Sign out</h2>\n <p className=\"text-xs text-gray-500 mb-3\">Signing out clears your dashboard session cookie. You'll return to the login page.</p>\n <button\n onClick={async () => {\n await fetch('/api/auth/logout', { method: 'POST' }).catch(() => {});\n window.location.assign('/login');\n }}\n className=\"px-4 py-2 bg-transparent hover:bg-[#1c1c1f] text-gray-300 text-sm rounded-lg border border-[#26262b] hover:border-[#3a3a41] transition-colors\"\n >\n Sign out\n </button>\n </section>\n </div>\n\n {/* ── Group: Resources ──────────────────────────────────── */}\n <div id=\"resources\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Resources</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* #209 (per Vincent 521/522): the low-frequency pages 通信龙\n moved out of the sidebar (Messages, Audit Log, Server Logs)\n need a discovery surface that isn't the primary nav — folded\n into the Settings/Resources grid alongside Tokens + Networks\n so the page tree stays the same (pages NOT deleted), the\n sidebar stays at 6, and users still have a one-tap way to\n reach them without remembering URLs or opening Cmd+K. */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <Link href=\"/settings/tokens\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">API Tokens</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Create and manage tokens for CLI access.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Manage &rarr;</span>\n </Link>\n <Link href=\"/settings/networks\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Networks</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Create, manage, and delete agent networks.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Manage &rarr;</span>\n </Link>\n <Link href=\"/messages\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Messages</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Global timeline of CommHub messages across all agents.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n <Link href=\"/logs\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Audit Log</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Authentication, token rotations, and admin actions.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n <Link href=\"/server-logs\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Server Logs</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Live stdout / stderr from the CommHub server.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n </div>\n </div>\n\n </div>\n </div>\n );\n}\n"],"names":["fetcher","url","res","fetch","status","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","hint","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","tasks","count","source","useStats","stats","ok","useMessages","keepPreviousData","messages","SettingsPage","healthError","theme","setTheme","oldPwd","setOldPwd","newPwd","setNewPwd","pwdResult","setPwdResult","rowClass","valueClass","className","href","label","map","a","id","swatch","t","onClick","localStorage","setItem","document","documentElement","setAttribute","style","backgroundColor","hub","tokenConfigured","tokenPreview","auth","role","version","sse_connections","uptime","Math","floor","title","type","value","onChange","e","target","placeholder","saved","sessionStorage","getItem","token","JSON","parse","method","headers","body","stringify","action","current_password","new_password","setTimeout","disabled","startsWith","catch"],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAMA,EAAU,MAAOC,IACrB,IAAMC,EAAM,MAAMC,MAAMF,GACxB,GAAmB,KAAK,CAApBC,EAAIE,MAAM,CAEZ,MADAC,OAAOC,QAAQ,CAACC,MAAM,CAAC,UACjB,AAAIC,MAAM,gBAElB,OAAON,EAAIO,IAAI,EACjB,EAEMC,EAAc,CAAE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AA,EAAA,GAAA,EAAC,KAAA,CAAGA,UAAU,+CAAsC,gBACpD,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAEA,UAAU,sCAA6B,kDAC1C,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKA,UAAU,mDAA0C,yBAQtE"}
1
+ {"version":3,"sources":["../../../../../p247-dash-release/app/lib/hooks.ts","../../../../../p247-dash-release/package.json.%5Bjson%5D.mjs","../../../../../p247-dash-release/app/lib/version.ts","../../../../../p247-dash-release/app/settings/page.tsx"],"sourcesContent":["import useSWR from 'swr';\nimport { Session, Health, AnetConfig } from '../components/types';\nimport { useNetworkId } from './network-context';\n\nconst fetcher = async (url: string) => {\n const res = await fetch(url);\n if (res.status === 401) {\n window.location.assign('/login');\n throw new Error('unauthorized');\n }\n return res.json();\n};\n\nconst SWR_OPTIONS = { refreshInterval: 5000, dedupingInterval: 3000 };\n\n/** Append network_id to URL if set */\nfunction withNetwork(url: string, networkId: string): string {\n if (!networkId) return url;\n const sep = url.includes('?') ? '&' : '?';\n return `${url}${sep}network_id=${encodeURIComponent(networkId)}`;\n}\n\nexport function useSessions() {\n const { networkId } = useNetworkId();\n const { data, error, isLoading } = useSWR<{ sessions: Session[]; _hint?: { global_count?: number; filtered_network?: string } }>(\n withNetwork('/api/hub/status', networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return { sessions: data?.sessions || [], hint: data?._hint, error, isLoading };\n}\n\nexport function useHealth() {\n const { data, error } = useSWR<Health>('/api/hub/health', fetcher, SWR_OPTIONS);\n return { health: data || null, error };\n}\n\nexport function useAnetConfig() {\n const { data } = useSWR<AnetConfig>('/api/anet/config', fetcher, { refreshInterval: 30000 });\n return { config: data || null };\n}\n\nexport function useTasks(params?: Record<string, string>) {\n const { networkId } = useNetworkId();\n const query = new URLSearchParams({ limit: '100', ...params }).toString();\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/tasks?${query}`, networkId),\n fetcher,\n SWR_OPTIONS,\n );\n return {\n tasks: data?.tasks || [],\n count: data?.count ?? 0,\n source: data?.source,\n error,\n isLoading,\n };\n}\n\nexport function useStats() {\n const { networkId } = useNetworkId();\n const { data, error } = useSWR(withNetwork('/api/hub/stats', networkId), fetcher, SWR_OPTIONS);\n return { stats: data?.ok ? data : null, error };\n}\n\nexport function useMessages(limit = 100) {\n const { networkId } = useNetworkId();\n // keepPreviousData: /messages grows `limit` when the user asks for older\n // history (#217 M5) — without it the key change would blank the list and\n // flash the skeleton while the bigger page is in flight.\n const { data, error, isLoading } = useSWR(\n withNetwork(`/api/hub/messages?limit=${limit}`, networkId),\n fetcher,\n { ...SWR_OPTIONS, keepPreviousData: true },\n );\n return { messages: data?.messages || [], error, isLoading };\n}\n","\"use turbopack no side effects\";\nexport default {\"name\":\"@sleep2agi/agent-network-dashboard\",\"version\":\"0.6.2-preview.0\",\"description\":\"Agent Network Dashboard — Web UI for managing AI Agent networks\",\"main\":\"apps/desktop/electron/main.cjs\",\"scripts\":{\"dev\":\"next dev\",\"build\":\"next build\",\"start\":\"next start\",\"lint\":\"eslint\",\"app:android:init\":\"npx cap add android\",\"app:android:sync\":\"npx cap sync android\",\"app:android:open\":\"npx cap open android\",\"app:ios:init\":\"npx cap add ios\",\"app:ios:sync\":\"npx cap sync ios\",\"app:ios:open\":\"npx cap open ios\",\"app:desktop\":\"electron apps/desktop/electron/main.cjs\",\"app:desktop:pack\":\"electron-builder --config electron-builder.json\",\"prepublishOnly\":\"[ -f .next/BUILD_ID ] || (echo 'prepublishOnly: .next/BUILD_ID missing — run npm run build first (see commit 05c1ebf body for R224 chunk-500 root cause)' >&2 && exit 1)\"},\"bin\":{\"agent-network-dashboard\":\"./bin/start.js\"},\"homepage\":\"https://anet.sh\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/sleep2agi/agent-network-dashboard\"},\"bugs\":{\"url\":\"https://github.com/sleep2agi/agent-network-dashboard/issues\"},\"author\":\"sleep2agi\",\"license\":\"Apache-2.0\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@capacitor/core\":\"^7.4.4\",\"next\":\"16.2.3\",\"react\":\"19.2.4\",\"react-dom\":\"19.2.4\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"swr\":\"^2.4.1\"},\"devDependencies\":{\"@capacitor/android\":\"^7.4.4\",\"@capacitor/cli\":\"^7.4.4\",\"@capacitor/ios\":\"^7.4.4\",\"@playwright/test\":\"^1.59.1\",\"@tailwindcss/postcss\":\"^4\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"eslint\":\"^9\",\"electron\":\"^39.2.6\",\"electron-builder\":\"^26.0.12\",\"eslint-config-next\":\"16.2.3\",\"tailwindcss\":\"^4\",\"typescript\":\"^5\"}};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cmJvcGFjazovLy9wMjQ3LWRhc2gtcmVsZWFzZS9wYWNrYWdlLmpzb24iXSwic291cmNlc0NvbnRlbnQiOlsie1wibmFtZVwiOlwiQHNsZWVwMmFnaS9hZ2VudC1uZXR3b3JrLWRhc2hib2FyZFwiLFwidmVyc2lvblwiOlwiMC42LjItcHJldmlldy4wXCIsXCJkZXNjcmlwdGlvblwiOlwiQWdlbnQgTmV0d29yayBEYXNoYm9hcmQg4oCUIFdlYiBVSSBmb3IgbWFuYWdpbmcgQUkgQWdlbnQgbmV0d29ya3NcIixcIm1haW5cIjpcImFwcHMvZGVza3RvcC9lbGVjdHJvbi9tYWluLmNqc1wiLFwic2NyaXB0c1wiOntcImRldlwiOlwibmV4dCBkZXZcIixcImJ1aWxkXCI6XCJuZXh0IGJ1aWxkXCIsXCJzdGFydFwiOlwibmV4dCBzdGFydFwiLFwibGludFwiOlwiZXNsaW50XCIsXCJhcHA6YW5kcm9pZDppbml0XCI6XCJucHggY2FwIGFkZCBhbmRyb2lkXCIsXCJhcHA6YW5kcm9pZDpzeW5jXCI6XCJucHggY2FwIH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ImxpY2Vuc2VcIjpcIkFwYWNoZS0yLjBcIixcInB1Ymxpc2hDb25maWdcIjp7XCJhY2Nlc3NcIjpcInB1YmxpY1wifSxcImRlcGVuZGVuY2llc1wiOntcIkBjYXBhY2l0b3IvY29yZVwiOlwiXjcuNC40XCIsXCJuZXh0XCI6XCIxNi4yLjNcIixcInJlYWN0XCI6XCIxOS4yLjRcIixcInJlYWN0LWRvbVwiOlwiMTkuMi40XCIsXCJyZWFjdC1tYXJrZG93blwiOlwiXjEwLjEuMFwiLFwicmVtYXJrLWdmbVwiOlwiXjQuMC4xXCIsXCJzd3JcIjpcIl4yLjQuMVwifSxcImRldkRlcGVuZGVuY2llc1wiOntcIkBjYXBhY2l0b3IvYW5kcm9pZFwiOlwiXjcuNC40XCIsXCJAY2FwYWNpdG9yL2NsaVwiOlwiXjcuNC40XCIsXCJAY2FwYWNpdG9yL2lvc1wiOlwiXjcuNC40XCIsXCJAcGxheXdyaWdodC90ZXN0XCI6XCJeMS41OS4xXCIsXCJAdGFpbHdpbmRjc3MvcG9zdGNzc1wiOlwiXjRcIixcIkB0eXBlcy9ub2RlXCI6XCJeMjBcIixcIkB0eXBlcy9yZWFjdFwiOlwiXjE5XCIsXCJAdHlwZXMvcmVhY3QtZG9tXCI6XCJeMTlcIixcImVzbGludFwiOlwiXjlcIixcImVsZWN0cm9uXCI6XCJeMzkuMi42XCIsXCJlbGVjdHJvbi1idWlsZGVyXCI6XCJeMjYuMC4xMlwiLFwiZXNsaW50LWNvbmZpZy1uZXh0XCI6XCIxNi4yLjNcIixcInRhaWx3aW5kY3NzXCI6XCJeNFwiLFwidHlwZXNjcmlwdFwiOlwiXjVcIn19Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=","/** Dashboard package version sourced from package.json at build time.\n * Importing JSON requires `resolveJsonModule: true` in tsconfig, which\n * Next sets by default. Bumping is automated by the publish flow, so this\n * surfaces the real preview number in Settings → Dashboard. */\nimport pkg from '../../package.json' assert { type: 'json' };\n\nexport const DASHBOARD_VERSION: string = pkg.version;\n","'use client';\n\nimport { useState } from 'react';\nimport Link from 'next/link';\nimport { useAnetConfig, useHealth } from '../lib/hooks';\nimport { DASHBOARD_VERSION } from '../lib/version';\n\nexport default function SettingsPage() {\n const { config } = useAnetConfig();\n const { health, error: healthError } = useHealth();\n const [theme, setTheme] = useState<string>(() => {\n if (typeof window === 'undefined') return 'cyber';\n try { return localStorage.getItem('anet-theme') || 'cyber'; } catch { return 'cyber'; }\n });\n const [oldPwd, setOldPwd] = useState('');\n const [newPwd, setNewPwd] = useState('');\n const [pwdResult, setPwdResult] = useState('');\n const rowClass = 'flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between';\n const valueClass = 'break-all sm:max-w-[320px] sm:text-right';\n\n return (\n <div className=\"min-h-screen bg-[#0b0b0d] text-gray-100 p-4 sm:p-6\">\n <h1 className=\"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10\">Settings</h1>\n\n {/* Section anchor nav (round 28) — jump to a group instead of scrolling\n through the whole page. Mirrors the section headers below; pages\n with 7+ cards benefit from a visible table-of-contents.\n R3 of #190 mobile polish: matches the /admin chip treatment\n (preview.3) — 44px tap-target + visible border so the chips read\n as tappable rather than as inert headings on 375–390px. */}\n {/* #209 R36: mb-8 → mb-4 sm:mb-8 — same pattern R31 applied to\n /admin's identical jump-nav. Saves 16 px on phones. */}\n <nav className=\"mb-4 sm:mb-8 flex flex-wrap gap-2 text-xs\">\n {[\n { href: '#appearance', label: 'Appearance' },\n { href: '#connection', label: 'Connection' },\n { href: '#account', label: 'Account' },\n { href: '#resources', label: 'Resources' },\n ].map(a => (\n <a key={a.href} href={a.href}\n className=\"inline-flex min-h-[44px] items-center rounded-md border border-[#26262b] bg-[#0e0e10]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors\">\n {a.label}\n </a>\n ))}\n </nav>\n\n <div className=\"max-w-2xl space-y-10\">\n {/* ── Group: Appearance (#217 S6 — Vincent: \"设置里面再来一个\n 优化白色的主题\"). The light theme tokens were restored from\n pre-R8 history; this card is the visible owner of the toggle\n (previously theme switching hid inside Cmd+K only). */}\n <div id=\"appearance\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Appearance</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Theme</h2>\n <div className=\"grid grid-cols-2 gap-3\">\n {([\n { id: 'cyber', label: 'Dark', swatch: '#0b0b0d' },\n { id: 'light', label: 'Light', swatch: '#f6f7f9' },\n ] as const).map(t => (\n <button\n key={t.id}\n onClick={() => {\n try { localStorage.setItem('anet-theme', t.id); } catch {}\n document.documentElement.setAttribute('data-theme', t.id);\n setTheme(t.id);\n }}\n aria-pressed={theme === t.id}\n className={`flex items-center gap-3 rounded-lg border px-4 py-3 text-sm transition-colors ${\n theme === t.id\n ? 'border-cyan-500/60 bg-cyan-500/10 text-gray-100'\n : 'border-[#26262b] text-gray-400 hover:border-[#3a3a41]'\n }`}\n >\n <span\n aria-hidden\n className=\"inline-block w-5 h-5 rounded-full border border-black/20 shrink-0\"\n style={{ backgroundColor: t.swatch }}\n />\n {t.label}\n {theme === t.id && <span className=\"ml-auto text-cyan-400\">✓</span>}\n </button>\n ))}\n </div>\n </section>\n </div>\n\n {/* ── Group: Connection ─────────────────────────────────── */}\n <div id=\"connection\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Connection</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* CommHub Connection */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">CommHub Connection</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500 shrink-0\">Hub URL</span>\n <span className={`text-cyan-300 ${valueClass}`}>{config?.hub || 'not configured'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Config Source</span>\n <span className={`text-gray-300 ${valueClass}`}>\n {config?.source === 'file' ? 'Local file (~/.anet/config.json)' : config?.source === 'runtime-env' ? 'Vercel env vars' : 'Missing'}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Auth Token</span>\n <span className={`${config?.tokenConfigured ? 'text-green-400' : 'text-red-400'} ${valueClass}`}>\n {config?.tokenConfigured ? `Configured (${config.tokenPreview})` : 'Not configured'}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Server Auth</span>\n <span className={`${health?.auth === 'enabled' ? 'text-green-400' : 'text-yellow-400'} sm:text-right`}>\n {health?.auth || '--'}\n </span>\n </div>\n {config?.error && (\n <div className=\"border-t border-[#26262b] pt-3 text-xs text-gray-600\">\n {config.error}\n </div>\n )}\n {/* #214 F5: the red HealthBanner's \"Open Settings\" CTA used to\n land on a read-only page with no next step. When the hub is\n unreachable, give the user actual recovery commands. */}\n {(healthError || health?.ok === false) && (\n <div className=\"border-t border-red-500/20 pt-3 text-xs space-y-1.5\" role=\"alert\">\n <div className=\"text-red-300 font-medium\">CommHub unreachable — how to recover:</div>\n <div className=\"text-gray-400\">1. Check the hub process on the server: <code className=\"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5\">anet hub status</code></div>\n <div className=\"text-gray-400\">2. Start it if stopped: <code className=\"font-mono bg-[#0e0e10] border border-[#1c1c1f] rounded px-1.5 py-0.5\">anet hub start</code></div>\n <div className=\"text-gray-400\">3. Confirm the Hub URL above matches where the hub actually listens.</div>\n </div>\n )}\n </div>\n </section>\n\n {/* Server Info */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Server Info</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500\">Version</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.version || '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Sessions</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.sessions ?? '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">SSE streams <span className=\"text-gray-600\">· server</span></span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.sse_connections ?? '--'}</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Uptime</span>\n <span className={`text-gray-300 ${valueClass}`}>{health?.uptime ? `${Math.floor(health.uptime / 3600)}h ${Math.floor((health.uptime % 3600) / 60)}m` : '--'}</span>\n </div>\n </div>\n </section>\n\n {/* Dashboard Info */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Dashboard</h2>\n <div className=\"space-y-3 text-sm\">\n <div className={rowClass}>\n <span className=\"text-gray-500\">Version</span>\n <span className={`text-gray-300 font-mono ${valueClass}`} title=\"From package.json @sleep2agi/agent-network-dashboard\">\n {DASHBOARD_VERSION}\n </span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Data Layer</span>\n <span className={`text-gray-300 ${valueClass}`}>SWR (5s refresh, 3s dedup)</span>\n </div>\n <div className={rowClass}>\n <span className=\"text-gray-500\">Pages</span>\n <span className={`text-gray-300 ${valueClass}`}>Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings</span>\n </div>\n </div>\n </section>\n </div>\n\n {/* ── Group: Account ────────────────────────────────────── */}\n <div id=\"account\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Account</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* Change Password */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Change Password</h2>\n <div className=\"space-y-3\">\n <input type=\"password\" value={oldPwd} onChange={e => setOldPwd(e.target.value)} placeholder=\"Current password\"\n className=\"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\" />\n <input type=\"password\" value={newPwd} onChange={e => setNewPwd(e.target.value)} placeholder=\"New password\"\n className=\"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none\" />\n <button onClick={async () => {\n if (!oldPwd || !newPwd) return;\n const saved = sessionStorage.getItem('anet_v3_auth');\n if (!saved) { setPwdResult('Not logged in with V3 auth'); return; }\n const { token } = JSON.parse(saved);\n const res = await fetch('/api/hub/auth', {\n method: 'POST', headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ action: 'change_password', token, current_password: oldPwd, new_password: newPwd }),\n });\n const data = await res.json();\n setPwdResult(data.ok ? 'Password changed' : `Failed: ${data.error}`);\n if (data.ok) {\n if (data.token) {\n const auth = JSON.parse(saved);\n sessionStorage.setItem('anet_v3_auth', JSON.stringify({ ...auth, token: data.token }));\n }\n setOldPwd('');\n setNewPwd('');\n }\n setTimeout(() => setPwdResult(''), 5000);\n }} disabled={!oldPwd || !newPwd}\n className=\"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors\">\n Change Password\n </button>\n </div>\n {pwdResult && <div className={`mt-2 text-xs ${pwdResult.startsWith('Failed') ? 'text-red-400' : 'text-green-400'}`}>{pwdResult}</div>}\n </section>\n\n {/* Session — tone-neutral, no longer \"danger zone\" red */}\n <section className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5\">\n <h2 className=\"text-sm font-semibold text-gray-300 mb-4\">Sign out</h2>\n <p className=\"text-xs text-gray-500 mb-3\">Signing out clears your dashboard session cookie. You'll return to the login page.</p>\n <button\n onClick={async () => {\n await fetch('/api/auth/logout', { method: 'POST' }).catch(() => {});\n window.location.assign('/login');\n }}\n className=\"px-4 py-2 bg-transparent hover:bg-[#1c1c1f] text-gray-300 text-sm rounded-lg border border-[#26262b] hover:border-[#3a3a41] transition-colors\"\n >\n Sign out\n </button>\n </section>\n </div>\n\n {/* ── Group: Resources ──────────────────────────────────── */}\n <div id=\"resources\" className=\"space-y-4 scroll-mt-6\">\n <div className=\"flex items-center gap-2 px-1\">\n <div className=\"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold\">Resources</div>\n <div className=\"flex-1 h-px bg-[#26262b]\" />\n </div>\n\n {/* #209 (per Vincent 521/522): the low-frequency pages 通信龙\n moved out of the sidebar (Messages, Audit Log, Server Logs)\n need a discovery surface that isn't the primary nav — folded\n into the Settings/Resources grid alongside Tokens + Networks\n so the page tree stays the same (pages NOT deleted), the\n sidebar stays at 6, and users still have a one-tap way to\n reach them without remembering URLs or opening Cmd+K. */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <Link href=\"/settings/tokens\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">API Tokens</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Create and manage tokens for CLI access.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Manage &rarr;</span>\n </Link>\n <Link href=\"/settings/networks\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Networks</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Create, manage, and delete agent networks.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Manage &rarr;</span>\n </Link>\n <Link href=\"/messages\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Messages</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Global timeline of CommHub messages across all agents.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n <Link href=\"/logs\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Audit Log</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Authentication, token rotations, and admin actions.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n <Link href=\"/server-logs\" className=\"bg-[#161618] border border-[#26262b] rounded-xl p-5 hover:border-cyan-500/30 transition-colors\">\n <h2 className=\"text-sm font-semibold text-gray-300\">Server Logs</h2>\n <p className=\"text-xs text-gray-500 mt-2\">Live stdout / stderr from the CommHub server.</p>\n <span className=\"text-xs text-cyan-400 mt-3 inline-block\">Open &rarr;</span>\n </Link>\n </div>\n </div>\n\n </div>\n </div>\n );\n}\n"],"names":["fetcher","url","res","fetch","status","window","location","assign","Error","json","SWR_OPTIONS","refreshInterval","dedupingInterval","withNetwork","networkId","sep","includes","encodeURIComponent","useSessions","data","error","isLoading","sessions","hint","_hint","useHealth","health","useAnetConfig","config","useTasks","params","query","URLSearchParams","limit","toString","tasks","count","source","useStats","stats","ok","useMessages","keepPreviousData","messages","SettingsPage","healthError","theme","setTheme","oldPwd","setOldPwd","newPwd","setNewPwd","pwdResult","setPwdResult","rowClass","valueClass","className","href","label","map","a","id","swatch","t","onClick","localStorage","setItem","document","documentElement","setAttribute","style","backgroundColor","hub","tokenConfigured","tokenPreview","auth","role","version","sse_connections","uptime","Math","floor","title","type","value","onChange","e","target","placeholder","saved","sessionStorage","getItem","token","JSON","parse","method","headers","body","stringify","action","current_password","new_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ACC,KAAK,QAAQD,UAAU,2GAC3B,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAGA,UAAU,+CAAsC,cACpD,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAEA,UAAU,sCAA6B,wDAC1C,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKA,UAAU,mDAA0C,cAE5D,CAAA,EAAA,EAAA,IAAA,EAAC,EAAA,OAAI,CAAA,CAACC,KAAK,eAAeD,UAAU,2GAClC,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAGA,UAAU,+CAAsC,gBACpD,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAEA,UAAU,sCAA6B,kDAC1C,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKA,UAAU,mDAA0C,yBAQtE"}
@@ -1,3 +1,3 @@
1
- module.exports=[21993,a=>{"use strict";a.s(["DASHBOARD_VERSION",0,"0.6.1-preview.3"],21993)},86537,a=>{"use strict";var b=a.i(91274),c=a.i(31883),d=a.i(21993);a.s(["default",0,function(){let[a,e]=(0,c.useState)("login"),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(!1),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(!1),p=async b=>{b.preventDefault(),o(!0),m("");try{let b=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,username:f,password:h})}),c=await b.json();if(c.ok){c.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:c.user,token:c.token,networks:c.networks||[],currentNetwork:c.network_id||c.networks?.[0]?.network_id||""})),window.location.assign("/");return}m(c.error||"Login failed")}catch{m("Connection failed")}o(!1)};return(0,b.jsxs)("main",{className:"min-h-screen bg-[#0b0b0d] text-gray-100 flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,b.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,b.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,b.jsxs)("div",{className:"text-center mb-7",children:[(0,b.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#161618] border border-[#26262b] anet-login-mark",children:(0,b.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,b.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,b.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,b.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,b.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,b.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,b.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,b.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,b.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,b.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===a?(0,b.jsxs)(b.Fragment,{children:["Welcome back · ",(0,b.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,b.jsxs)(b.Fragment,{children:["Create your account · ",(0,b.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,b.jsx)("div",{className:"flex rounded-lg border border-[#26262b] bg-[#161618] p-1 mb-4",children:["login","register"].map(c=>(0,b.jsx)("button",{type:"button",onClick:()=>{e(c),m("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${a===c?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===c?"Sign in":"Register"},c))}),(0,b.jsxs)("form",{onSubmit:p,className:"border border-[#26262b] bg-[#161618]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,b.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,b.jsx)("input",{id:"username",type:"text",value:f,onChange:a=>g(a.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-4 py-3 text-base sm: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,b.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{id:"password",type:j?"text":"password",value:h,onChange:a=>i(a.target.value),placeholder:"Enter password",className:"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-4 pr-11 py-3 text-base sm: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,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),tabIndex:-1,"aria-label":j?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center justify-center min-w-[44px] px-3 text-gray-600 hover:text-gray-300 transition-colors",children:j?(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.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,b.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),l&&(0,b.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:l}),(0,b.jsxs)("button",{type:"submit",disabled:n||!h||!f.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:[n&&(0,b.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,b.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,b.jsx)("span",{children:n?"login"===a?"Signing in…":"Registering…":"login"===a?"Sign in":"Create account"})]})]}),(0,b.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,b.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,b.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,b.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",d.DASHBOARD_VERSION]})]})]})]})}])}];
1
+ module.exports=[21993,a=>{"use strict";a.s(["DASHBOARD_VERSION",0,"0.6.2-preview.0"],21993)},86537,a=>{"use strict";var b=a.i(91274),c=a.i(31883),d=a.i(21993);a.s(["default",0,function(){let[a,e]=(0,c.useState)("login"),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(!1),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(!1),p=async b=>{b.preventDefault(),o(!0),m("");try{let b=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,username:f,password:h})}),c=await b.json();if(c.ok){c.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:c.user,token:c.token,networks:c.networks||[],currentNetwork:c.network_id||c.networks?.[0]?.network_id||""})),window.location.assign("/");return}m(c.error||"Login failed")}catch{m("Connection failed")}o(!1)};return(0,b.jsxs)("main",{className:"min-h-screen bg-[#0b0b0d] text-gray-100 flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,b.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,b.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,b.jsxs)("div",{className:"text-center mb-7",children:[(0,b.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#161618] border border-[#26262b] anet-login-mark",children:(0,b.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,b.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,b.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,b.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,b.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,b.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,b.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,b.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,b.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,b.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===a?(0,b.jsxs)(b.Fragment,{children:["Welcome back · ",(0,b.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,b.jsxs)(b.Fragment,{children:["Create your account · ",(0,b.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,b.jsx)("div",{className:"flex rounded-lg border border-[#26262b] bg-[#161618] p-1 mb-4",children:["login","register"].map(c=>(0,b.jsx)("button",{type:"button",onClick:()=>{e(c),m("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${a===c?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===c?"Sign in":"Register"},c))}),(0,b.jsxs)("form",{onSubmit:p,className:"border border-[#26262b] bg-[#161618]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,b.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,b.jsx)("input",{id:"username",type:"text",value:f,onChange:a=>g(a.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-4 py-3 text-base sm: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,b.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{id:"password",type:j?"text":"password",value:h,onChange:a=>i(a.target.value),placeholder:"Enter password",className:"w-full bg-[#0e0e10] border border-[#26262b] rounded-lg px-4 pr-11 py-3 text-base sm: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,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),tabIndex:-1,"aria-label":j?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center justify-center min-w-[44px] px-3 text-gray-600 hover:text-gray-300 transition-colors",children:j?(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.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,b.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),l&&(0,b.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:l}),(0,b.jsxs)("button",{type:"submit",disabled:n||!h||!f.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:[n&&(0,b.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,b.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,b.jsx)("span",{children:n?"login"===a?"Signing in…":"Registering…":"login"===a?"Sign in":"Create account"})]})]}),(0,b.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,b.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,b.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,b.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",d.DASHBOARD_VERSION]})]})]})]})}])}];
2
2
 
3
3
  //# sourceMappingURL=p247-dash-release_app_0~d5sb9._.js.map