registerAgentRoutes registers all agent-related routes
(rg *gin.RouterGroup)
| 9 | |
| 10 | // registerAgentRoutes registers all agent-related routes |
| 11 | func (s *Server) registerAgentRoutes(rg *gin.RouterGroup) { |
| 12 | // Create agent handler |
| 13 | h := handlers.NewAgentHandler(s.store, s.deps.AgentDeps) |
| 14 | |
| 15 | agents := rg.Group("/agents") |
| 16 | { |
| 17 | agents.POST("", h.Create) |
| 18 | agents.GET("", h.List) |
| 19 | agents.GET("/:id", h.Get) |
| 20 | agents.PATCH("/:id", h.Update) |
| 21 | agents.DELETE("/:id", h.Delete) |
| 22 | agents.POST("/:id/run", h.Run) |
| 23 | agents.POST("/:id/send", h.Send) |
| 24 | agents.POST("/chat", h.Chat) |
| 25 | agents.POST("/chat/stream", h.StreamChat) |
| 26 | agents.GET("/:id/status", h.GetStatus) |
| 27 | agents.GET("/:id/stats", h.GetStats) |
| 28 | agents.POST("/:id/resume", h.Resume) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // registerWebSocketRoutes registers WebSocket routes |
| 33 | // Deprecated: WebSocket routes are now registered in registerRoutes |
no test coverage detected