Files
kandev/backend/internal/orchestrator/api/router.go
T
jcfs ba919305c2 Initial commit: Kandev with SQLite persistence and agent integration
Features:
- Unified Go binary running Task Service, Agent Manager, and Orchestrator
- SQLite persistence for boards, columns, and tasks
- Docker-based agent execution with ACP message streaming
- Augment Agent integration with session resumption support
- RESTful API for all operations (port 8080)
- In-memory event bus for service communication

Architecture:
- cmd/kandev: Single entry point for all services
- internal/task: Task, board, and column management
- internal/agent: Docker container lifecycle and ACP streaming
- internal/orchestrator: Agent coordination and monitoring
- internal/events: In-memory pub/sub event bus

Documentation:
- README.md: Project overview and quick start
- docs/ARCHITECTURE.md: System architecture (current + planned)
- docs/GETTING_STARTED.md: Development setup guide
- docs/IMPLEMENTATION_PLAN.md: Original microservices plan
- backend/NEXT_STEPS.md: Development roadmap
2026-01-10 01:30:24 +00:00

31 lines
880 B
Go

package api
import (
"github.com/gin-gonic/gin"
"github.com/kandev/kandev/internal/common/logger"
"github.com/kandev/kandev/internal/orchestrator"
)
// SetupRoutes configures the orchestrator API routes
func SetupRoutes(router *gin.RouterGroup, service *orchestrator.Service, log *logger.Logger) {
handler := NewHandler(service, log)
// Orchestrator control
router.GET("/status", handler.GetStatus)
router.GET("/queue", handler.GetQueue)
router.POST("/trigger", handler.TriggerTask)
// Task execution control
tasks := router.Group("/tasks/:taskId")
{
tasks.POST("/start", handler.StartTask)
tasks.POST("/stop", handler.StopTask)
tasks.POST("/pause", handler.PauseTask)
tasks.POST("/resume", handler.ResumeTask)
tasks.GET("/status", handler.GetTaskStatus)
tasks.GET("/logs", handler.GetTaskLogs)
tasks.GET("/artifacts", handler.GetTaskArtifacts)
}
}