Files
kandev/backend/internal/orchestrator/api/requests.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

79 lines
2.4 KiB
Go

// Package api provides REST API handlers for the orchestrator service.
package api
import "time"
// TriggerTaskRequest for manually triggering a task
type TriggerTaskRequest struct {
TaskID string `json:"task_id" binding:"required"`
Force bool `json:"force"`
}
// StartTaskRequest for starting agent execution
type StartTaskRequest struct {
AgentType string `json:"agent_type,omitempty"`
Priority int `json:"priority"`
}
// StopTaskRequest for stopping agent execution
type StopTaskRequest struct {
Reason string `json:"reason,omitempty"`
Force bool `json:"force"`
}
// TaskStatusResponse for task execution status
type TaskStatusResponse struct {
TaskID string `json:"task_id"`
State string `json:"state"`
AgentInstanceID string `json:"agent_instance_id,omitempty"`
AgentType string `json:"agent_type,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
Progress int `json:"progress"`
CurrentOperation string `json:"current_operation,omitempty"`
EstimatedCompletion *time.Time `json:"estimated_completion,omitempty"`
}
// QueuedTaskResponse for queue listing
type QueuedTaskResponse struct {
TaskID string `json:"task_id"`
Priority int `json:"priority"`
QueuedAt time.Time `json:"queued_at"`
EstimatedStart *time.Time `json:"estimated_start,omitempty"`
}
// QueueResponse for queue endpoint
type QueueResponse struct {
Tasks []QueuedTaskResponse `json:"tasks"`
Total int `json:"total"`
}
// LogEntry for log listing
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
// LogsResponse for logs endpoint
type LogsResponse struct {
Logs []LogEntry `json:"logs"`
Total int `json:"total"`
}
// ArtifactResponse for artifact listing
type ArtifactResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Size int64 `json:"size"`
CreatedAt time.Time `json:"created_at"`
DownloadURL string `json:"download_url"`
}
// ArtifactsResponse for artifacts endpoint
type ArtifactsResponse struct {
Artifacts []ArtifactResponse `json:"artifacts"`
}