plan/10: Add /api/stats endpoint and dashboard stats badge (#2)

Adds GET /api/stats endpoint with agent/plan/task/queue counts, stats widget in dashboard header, and Go test coverage.
This commit was merged in pull request #2.
This commit is contained in:
2026-04-08 15:30:16 +00:00
parent 3a64d8fb8e
commit a5e4e7a6d2
5 changed files with 220 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ func main() {
// Agents
api.GET("/agents", h.ListAgents)
api.PATCH("/agents/:id", h.UpdateAgent)
api.GET("/agents/:id/next-task", h.NextTask)
// Director Queue
api.GET("/queue", h.ListQueue)
@@ -91,6 +92,12 @@ func main() {
// System / Settings
api.GET("/system/claude-mode", h.GetClaudeMode)
api.POST("/system/claude-mode", h.SetClaudeMode)
api.GET("/system/claude-usage", h.GetClaudeUsage)
api.POST("/system/claude-usage", h.SetClaudeUsage)
api.POST("/system/claude-kill-switch", h.ClaudeKillSwitch)
// Stats
api.GET("/stats", h.GetStats)
}
// WebSocket