Task 53 — Mesh dashboard
Phase: 6
Initiative: 32
Status: done
Owner: —
Slug: mesh-dashboard
Goal
Web UI: live agent topology, traffic, health, policy denials, бюджеты, queued tasks, skill usage heatmap, последние eval results.
Acceptance criteria
MeshDashboardService— server-side aggregator exposing all dashboard dataGET /api/mesh/dashboardendpoint — single endpoint returning topology, health, traffic, denials, budget, queued tasks, skill heatmap, eval resultsMeshTopologyDto— agent list with health/trust/latency per entryMeshTrafficDto— request count, fan-out count, avg latency (last 24h), routing decisionsMeshHealthDto— per-agent health scores, circuit breaker states, uptimeMeshPolicyDenialsDto— recent policy denials from audit log (filtered by denial events)MeshSkillHeatmapDto— per-skill usage count and success rate for heatmap gridMeshEvalSummaryDto— last N eval runs with pass/fail, score, scenario type- Frontend
MeshDashboard.astrocomponent with all 7 sections mesh.astropage updated to use new dashboard componentdotnet build+dotnet testpass
Sub-tasks
src/agent/Mesh/Dashboard/MeshDashboardDtos.cs— all DTO modelssrc/agent/Mesh/Dashboard/MeshDashboardService.cs— aggregator serviceGET /api/mesh/dashboardendpoint inMeshController.csGET /api/mesh/topologyendpoint (agent list with health/trust/latency)GET /api/mesh/healthendpoint (per-agent health + CB states)GET /api/mesh/denialsendpoint (recent policy denials)GET /api/mesh/skills/heatmapendpoint (skill usage grid)GET /api/mesh/eval/summaryendpoint (recent eval runs)MeshServiceExtensions.cs— DI registration forMeshDashboardServicesrc/hercules-web/src/components/MeshDashboard.astro— full 7-section dashboard component- Update
src/hercules-web/src/pages/memmesh.astroto include MeshDashboard - Add API methods to
src/hercules-web/src/lib/api.ts dotnet build src/agent/Hercules.csproj -c Release— 0 errorsdotnet test tests/Hercules.Agent.Tests/— 1374/1383 pass (9 pre-existing failures: OtelServiceTests ×5, BudgetGuardTests ×1, NumericValidatorTests ×2, WasmToolTests ×1)npm run build(hercules-web) — 6 pages built, 0 errors
Implementation notes
Backend
src/agent/Mesh/Dashboard/MeshDashboardDtos.cs
MeshTopologyDto,MeshAgentDto,MeshTrafficDto,MeshHealthDto,MeshHealthEntryDtoMeshPolicyDenialsDto,MeshDenialEntryDtoMeshSkillHeatmapDto,MeshSkillHeatmapEntryDtoMeshEvalSummaryDto,MeshEvalRunDtoMeshDashboardDto— complete snapshot
src/agent/Mesh/Dashboard/MeshDashboardService.cs
- Injects
ICapabilityRegistryService,CircuitBreaker,IAuditService,WebApiAdapter,IMeshEvalRunner GetDashboardAsync()— full snapshot (all 6 sections)GetTopologyAsync()— agents from registry with health/trust/latencyGetTrafficAsync()— traffic counters (CB rejections + placeholders for full OTel metrics)GetHealthAsync()— per-agent health + CB statesGetPolicyDenialsAsync()— audit log filtered byresult=denied+action=trust_deniedGetSkillHeatmap()— local skill usage fromWebApiAdapter.ListSkills()GetEvalSummaryAsync()— last 20 eval runs from baseline.json
MeshController.cs — 6 new endpoints:
GET /api/mesh/dashboard— full snapshotGET /api/mesh/topology— agent listGET /api/mesh/health— health + CB statesGET /api/mesh/denials— policy denialsGET /api/mesh/skills/heatmap— skill usageGET /api/mesh/eval/summary— eval runs
MeshServiceExtensions.cs — services.AddSingleton<MeshDashboardService>()
Frontend
src/hercules-web/src/lib/api.ts — 6 new API methods + all TypeScript DTOs for mesh dashboard.
src/hercules-web/src/components/MeshDashboard.astro
- 7 sections: Topology, Traffic, Health, Policy Denials, Skill Heatmap, Eval Summary
- Auto-loads on mount, manual refresh per section and global refresh
- Skill heatmap: color-coded cells (emerald/amber/rose) by success rate × usage intensity
- Health: progress bars per agent with CB state badge
src/hercules-web/src/pages/memmesh.astro — updated to show MeshDashboard above the existing MeshRouterPanel + EscalationPanel.
Validation
dotnet build src/agent/Hercules.csproj -c Release → 0 errors
dotnet test tests/Hercules.Agent.Tests/ → 1374/1383 pass
(9 pre-existing failures)
npm run build (src/hercules-web/) → 6 pages built, 0 errors
Scope / Likely files
src/agent/Mesh/Dashboard/, src/hercules-web/src/components/MeshDashboard.astro, src/hercules-web/src/pages/memmesh.astro
Dependencies
- блокирует / опирается на: task_013 — opentelemetry
- блокирует / опирается на: task_034 — capability-registry
Risks / Rollback
UI-сложность; phase-gated фичи с feature flags.
Links
- Backlog: ../backlog.md
- Roadmap (EN): ../../ROADMAP-EN.md
- Roadmap (RU): ../../ROADMAP-RU.md