Versions in this module Expand all Collapse all v0 v0.7.0 Apr 13, 2026 Changes in this version + func AddRerouteHint(input string, failure RecoveryContext) string + func BuildControlTools(cp *AgentControlPlane) []*agent.Tool + func BuildTaskTools(store TaskStore) []*agent.Tool + func ComputeBackoff(attempt int) time.Duration + type AgentControlPlane struct + Projection *AgentRunProjection + RunStore AgentRunStore + type AgentRun struct + AllowedTools []string + CancelFn context.CancelFunc + ChildSession string + CompletedAt time.Time + CreatedAt time.Time + Error string + ID string + Instruction string + ParentID string + RequestedAgent string + Result string + SpawnDepth int + Status AgentRunStatus + type AgentRunProjection struct + func NewAgentRunProjection(store AgentRunStore) *AgentRunProjection + func (p *AgentRunProjection) PrepareTask(_ context.Context, _ string, _ background.Origin) (string, error) + func (p *AgentRunProjection) RegisterPending(agentRunID string) + func (p *AgentRunProjection) SyncTask(_ context.Context, snap background.TaskSnapshot) error + type AgentRunStatus string + const AgentRunCancelled + const AgentRunCompleted + const AgentRunFailed + const AgentRunRunning + const AgentRunSpawned + type AgentRunStore interface + Cancel func(id string) error + Create func(run *AgentRun) error + Get func(id string) (*AgentRun, error) + List func() []*AgentRun + UpdateStatus func(id string, status AgentRunStatus, result, errMsg string) error + type BudgetAlert struct + Limit int + Percentage float64 + Resource string + Used int + type BudgetAlertEvent struct + Limit int + Percentage float64 + Resource string + SessionID string + Used int + func (e BudgetAlertEvent) EventName() string + type BudgetPolicy struct + func NewBudgetPolicy(cfg config.BudgetCfg) *BudgetPolicy + func (b *BudgetPolicy) Clone() *BudgetPolicy + func (b *BudgetPolicy) DelegationCount() int + func (b *BudgetPolicy) RecordDelegation(target string) + func (b *BudgetPolicy) RecordTurn() + func (b *BudgetPolicy) Reset() + func (b *BudgetPolicy) Restore(state map[string]string) + func (b *BudgetPolicy) Serialize() map[string]string + func (b *BudgetPolicy) SetAlertHandler(fn func(BudgetAlert)) + func (b *BudgetPolicy) TurnCount() int + func (b *BudgetPolicy) UniqueAgentCount() int + type CauseClass string + const CauseMalformedToolCall + const CauseRateLimit + const CauseTimeout + const CauseTransient + const CauseUnknown + type CircuitBreakerTrippedEvent struct + AgentName string + FailureCount int + ResetAt time.Time + func (e CircuitBreakerTrippedEvent) EventName() string + type CircuitState int + const CircuitClosed + const CircuitHalfOpen + const CircuitOpen + type CoordinatingExecutor struct + func NewCoordinatingExecutor(inner turnrunner.Executor, guard *DelegationGuard, budget *BudgetPolicy, ...) *CoordinatingExecutor + func (c *CoordinatingExecutor) LastRunStatsForSession(sessionID string) (RunStats, bool) + func (c *CoordinatingExecutor) RunStreamingDetailed(ctx context.Context, sessionID, input string, onChunk adk.ChunkCallback, ...) (adk.RunReport, error) + type DelegationGuard struct + func NewDelegationGuard(cfg config.CircuitBreakerCfg, bus *eventbus.Bus) *DelegationGuard + func (g *DelegationGuard) IsOpen(agentName string) bool + func (g *DelegationGuard) IsProviderOpen(provider string) bool + func (g *DelegationGuard) RecordOutcome(agentName string, success bool) + func (g *DelegationGuard) RecordProviderFailure(provider string, success bool) + func (g *DelegationGuard) State(agentName string) CircuitState + type DelegationObservedEvent struct + From string + IsOpen bool + SessionID string + To string + func (e DelegationObservedEvent) EventName() string + type InMemoryAgentRunStore struct + func NewInMemoryAgentRunStore() *InMemoryAgentRunStore + func (s *InMemoryAgentRunStore) Cancel(id string) error + func (s *InMemoryAgentRunStore) Create(run *AgentRun) error + func (s *InMemoryAgentRunStore) Get(id string) (*AgentRun, error) + func (s *InMemoryAgentRunStore) List() []*AgentRun + func (s *InMemoryAgentRunStore) UpdateStatus(id string, status AgentRunStatus, result, errMsg string) error + type InMemoryTaskStore struct + func NewInMemoryTaskStore() *InMemoryTaskStore + func (s *InMemoryTaskStore) Create(entry *TaskEntry) error + func (s *InMemoryTaskStore) Get(id string) (*TaskEntry, error) + func (s *InMemoryTaskStore) List(statusFilter, parentFilter string) []*TaskEntry + func (s *InMemoryTaskStore) Update(id string, status, description string) error + type RecoveryAction int + const RecoveryDirectAnswer + const RecoveryEscalate + const RecoveryNone + const RecoveryRetry + const RecoveryRetryWithHint + func (a RecoveryAction) String() string + type RecoveryContext struct + AgentName string + ClassRetryCounts map[CauseClass]int + Error error + LearningFix string + PartialResult string + RetryCount int + SessionID string + type RecoveryDecisionEvent struct + Action string + Attempt int + Backoff time.Duration + CauseClass string + SessionKey string + func (e RecoveryDecisionEvent) EventName() string + type RecoveryEvent struct + Action RecoveryAction + AgentName string + Error string + SessionID string + func (e RecoveryEvent) EventName() string + type RecoveryPolicy struct + func NewRecoveryPolicy(cfg config.RecoveryCfg, provider adk.ErrorFixProvider) *RecoveryPolicy + func (p *RecoveryPolicy) Decide(ctx context.Context, failure *RecoveryContext) RecoveryAction + type RecursionGuard struct + MaxDepth int + func NewRecursionGuard(maxDepth int) *RecursionGuard + func (g *RecursionGuard) Check(ctx context.Context, spawner, target string) error + type RunStats struct + Delegations int + Turns int + type TaskEntry struct + AgentID string + CreatedAt time.Time + Description string + ID string + ParentID string + Status string + Title string + UpdatedAt time.Time + type TaskStore interface + Create func(entry *TaskEntry) error + Get func(id string) (*TaskEntry, error) + List func(statusFilter, parentFilter string) []*TaskEntry + Update func(id string, status, description string) error