()
| 137 | } |
| 138 | |
| 139 | func NewAgentTaskRuntime() *AgentTaskRuntime { |
| 140 | return &AgentTaskRuntime{ |
| 141 | records: map[string]*AgentTaskRecord{}, |
| 142 | notifications: map[string][]TaskNotification{}, |
| 143 | waiters: map[string][]chan struct{}{}, |
| 144 | workers: map[string]context.CancelFunc{}, |
| 145 | workerSpecs: map[string]workerSpec{}, |
| 146 | scopes: map[string]struct{}{"main": {}}, |
| 147 | childCounts: map[string]int{}, |
| 148 | taskParentScopes: map[string]string{}, |
| 149 | expiredTaskParentScopes: map[string]string{}, |
| 150 | recordCleanupCancels: map[string]context.CancelFunc{}, |
| 151 | idleTTLCancels: map[string]context.CancelFunc{}, |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | func (rt *AgentTaskRuntime) ExportSnapshot() []map[string]any { |
| 156 | rt.mu.Lock() |
no outgoing calls