diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-03 21:15:01 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-03 21:15:01 +0000 |
| commit | 704d007a26cac804148a51d35e129beaea382fb0 (patch) | |
| tree | 5061ca129ea033e8689d0a5bdc9d7ddbb9c09f56 /internal/task/task.go | |
| parent | 58f1f0909b8329b1219c5de9d0df2b4c6c93fec9 (diff) | |
Add subtask support: parent_task_id, ListSubtasks, UpdateTask
- Task struct gains ParentTaskID field
- DB schema adds parent_task_id column (additive migration)
- DB.ListSubtasks fetches children of a parent task
- DB.UpdateTask allows partial field updates (name, description, state, etc.)
- Templates table added to initial schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/task/task.go')
| -rw-r--r-- | internal/task/task.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/task/task.go b/internal/task/task.go index 5c28f63..d360a07 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -34,6 +34,7 @@ type ClaudeConfig struct { DisallowedTools []string `yaml:"disallowed_tools" json:"disallowed_tools"` SystemPromptAppend string `yaml:"system_prompt_append" json:"system_prompt_append"` AdditionalArgs []string `yaml:"additional_args" json:"additional_args"` + SkipPlanning bool `yaml:"skip_planning" json:"skip_planning"` } type RetryConfig struct { @@ -42,8 +43,9 @@ type RetryConfig struct { } type Task struct { - ID string `yaml:"id" json:"id"` - Name string `yaml:"name" json:"name"` + ID string `yaml:"id" json:"id"` + ParentTaskID string `yaml:"parent_task_id" json:"parent_task_id"` + Name string `yaml:"name" json:"name"` Description string `yaml:"description" json:"description"` Claude ClaudeConfig `yaml:"claude" json:"claude"` Timeout Duration `yaml:"timeout" json:"timeout"` @@ -90,6 +92,7 @@ func ValidTransition(from, to State) bool { StateQueued: {StateRunning, StateCancelled}, StateRunning: {StateCompleted, StateFailed, StateTimedOut, StateCancelled, StateBudgetExceeded}, StateFailed: {StateQueued}, // retry + StateTimedOut: {StateQueued}, // retry } for _, allowed := range transitions[from] { if allowed == to { |
