summaryrefslogtreecommitdiff
path: root/internal/task/task.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/task/task.go')
-rw-r--r--internal/task/task.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/task/task.go b/internal/task/task.go
index 498c364..6b240dd 100644
--- a/internal/task/task.go
+++ b/internal/task/task.go
@@ -28,7 +28,8 @@ const (
PriorityLow Priority = "low"
)
-type ClaudeConfig struct {
+type AgentConfig struct {
+ Type string `yaml:"type" json:"type"`
Model string `yaml:"model" json:"model"`
ContextFiles []string `yaml:"context_files" json:"context_files"`
Instructions string `yaml:"instructions" json:"instructions"`
@@ -43,8 +44,8 @@ type ClaudeConfig struct {
}
// UnmarshalJSON reads project_dir with fallback to legacy working_dir.
-func (c *ClaudeConfig) UnmarshalJSON(data []byte) error {
- type Alias ClaudeConfig
+func (c *AgentConfig) UnmarshalJSON(data []byte) error {
+ type Alias AgentConfig
aux := &struct {
ProjectDir string `json:"project_dir"`
WorkingDir string `json:"working_dir"` // legacy
@@ -71,7 +72,8 @@ type Task struct {
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"`
+ Agent AgentConfig `yaml:"agent" json:"agent"`
+ Claude AgentConfig `yaml:"claude" json:"claude"` // alias for backward compatibility
Timeout Duration `yaml:"timeout" json:"timeout"`
Retry RetryConfig `yaml:"retry" json:"retry"`
Priority Priority `yaml:"priority" json:"priority"`