| 29 | var nonReusableStableStatuses = stringSet("completed", "failed", "killed", "interrupted") |
| 30 | |
| 31 | type AgentTaskRecord struct { |
| 32 | TaskID string `json:"task_id"` |
| 33 | ParentTaskID string `json:"parent_task_id"` |
| 34 | ParentScopeID string `json:"parent_scope_id"` |
| 35 | WorkerLabel string `json:"worker_label"` |
| 36 | Description string `json:"description"` |
| 37 | AgentType string `json:"agent_type"` |
| 38 | Reusable bool `json:"reusable"` |
| 39 | Status string `json:"status"` |
| 40 | CreatedAt float64 `json:"created_at"` |
| 41 | UpdatedAt float64 `json:"updated_at"` |
| 42 | ResultText string `json:"result_text"` |
| 43 | ErrorText string `json:"error_text"` |
| 44 | ResultFile string `json:"result_file"` |
| 45 | ErrorFile string `json:"error_file"` |
| 46 | InputTokens int `json:"input_tokens"` |
| 47 | OutputTokens int `json:"output_tokens"` |
| 48 | ToolUseCount int `json:"tool_use_count"` |
| 49 | DurationMS int `json:"duration_ms"` |
| 50 | TerminationReason string `json:"termination_reason"` |
| 51 | } |
| 52 | |
| 53 | func (r AgentTaskRecord) ToMap() map[string]any { |
| 54 | b, _ := json.Marshal(r) |
nothing calls this directly
no outgoing calls
no test coverage detected