| package tm |
| |
| import ( |
| "context" |
| ) |
| |
| // TaskManager defines the interface for task management operations |
| type TaskManager interface { |
| // Task operations |
| CreateTask(ctx context.Context, req *TaskCreateRequest) (*Task, error) |
| GetTask(taskID string) (*Task, error) // Simplified for MVP |
| UpdateTask(task *Task) error // Simplified for MVP |
| ArchiveTask(ctx context.Context, id string) error |
| ListTasks(ctx context.Context, filter *TaskFilter, page, pageSize int) (*TaskList, error) |
| |
| // Task status operations |
| StartTask(ctx context.Context, id string) (*Task, error) |
| CompleteTask(ctx context.Context, id string) (*Task, error) |
| |
| // Task queries |
| GetTasksByOwner(ctx context.Context, ownerID string, page, pageSize int) (*TaskList, error) |
| GetTasksByAssignee(assignee string) ([]*Task, error) // For MVP auto-assignment |
| GetTasksByStatus(ctx context.Context, status TaskStatus, page, pageSize int) (*TaskList, error) |
| GetTasksByPriority(ctx context.Context, priority TaskPriority, page, pageSize int) (*TaskList, error) |
| |
| // Proposals |
| ProposeSubTasks(ctx context.Context, task *Task, analysis *SubtaskAnalysis, agentName string) (string, error) |
| ProposeSolution(ctx context.Context, task *Task, solution, agentName string) (string, error) |
| Close() error |
| } |