Documentation
¶
Index ¶
- type AgentInfo
- type Opt
- type Team
- func (t *Team) Agent(name string) (*agent.Agent, error)
- func (t *Team) AgentConfig(name string) (latest.AgentConfig, bool)
- func (t *Team) AgentNames() []string
- func (t *Team) AgentOrDefault(name string) (*agent.Agent, error)
- func (t *Team) AgentsInfo() []AgentInfo
- func (t *Team) DefaultAgent() (*agent.Agent, error)
- func (t *Team) Permissions() *permissions.Checker
- func (t *Team) SetPermissions(checker *permissions.Checker)
- func (t *Team) Size() int
- func (t *Team) StopToolSets(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
Name string
Description string
Provider string
Model string
Commands types.Commands
}
AgentInfo contains information about an agent
type Opt ¶
type Opt func(*Team)
func WithAgentConfigs ¶ added in v1.88.0
func WithAgentConfigs(configs map[string]latest.AgentConfig) Opt
WithAgentConfigs retains the per-agent resolved configs (keyed by agent name) on the team. They are read-only reference data used by inspection surfaces; the runtime continues to operate on the resolved *agent.Agent.
func WithAgents ¶
func WithPermissions ¶
func WithPermissions(checker *permissions.Checker) Opt
type Team ¶
type Team struct {
// contains filtered or unexported fields
}
func (*Team) AgentConfig ¶ added in v1.88.0
func (t *Team) AgentConfig(name string) (latest.AgentConfig, bool)
AgentConfig returns the raw resolved config for the named agent and true when it was retained at construction (WithAgentConfigs). Teams built without configs (e.g. the remote runtime) return the zero value and false, letting callers gracefully omit config-derived detail.
func (*Team) AgentNames ¶
func (*Team) AgentOrDefault ¶ added in v1.54.0
AgentOrDefault returns the agent identified by name, or the team's [DefaultAgent] when name is empty. It is a convenience for the many call sites that accept an optional agent selector (CLI flag, HTTP route, ...) and want "empty means whatever the team considers default" semantics without sprinkling the same `if name == ""` check everywhere.
func (*Team) AgentsInfo ¶
AgentsInfo returns information about all agents in the team
func (*Team) Permissions ¶
func (t *Team) Permissions() *permissions.Checker
Permissions returns the permission checker for this team. Returns nil if no permissions are configured.
func (*Team) SetPermissions ¶ added in v1.37.0
func (t *Team) SetPermissions(checker *permissions.Checker)
SetPermissions replaces the team's permission checker. This is used to merge additional permission sources (e.g. user-level global permissions) into the team's checker after construction.