Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvalidateRegistry ¶
func InvalidateRegistry()
InvalidateRegistry clears the cached registry so it will be reloaded on next GetRegistry call. This is useful when agent configurations change at runtime.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
ID string `yaml:"-"`
Name string `yaml:"name,omitempty"`
Description string `yaml:"description,omitempty"`
Mode config.AgentMode `yaml:"mode,omitempty"`
Native bool `yaml:"native,omitempty"`
Hidden bool `yaml:"hidden,omitempty"`
Disabled bool `yaml:"disabled,omitempty"`
Color string `yaml:"color,omitempty"`
Model string `yaml:"model,omitempty"`
MaxTokens int64 `yaml:"maxTokens,omitempty"`
ReasoningEffort string `yaml:"reasoningEffort,omitempty"`
Prompt string `yaml:"-"`
Permission map[string]any `yaml:"permission,omitempty"`
Tools map[string]bool `yaml:"tools,omitempty"`
Output *Output `yaml:"output,omitempty"`
Location string `yaml:"-"`
}
AgentInfo holds the configuration for an agent. It includes metadata like name, description, mode, and tool permissions. AgentInfo holds the configuration for an agent. It includes metadata like name, description, mode, and tool permissions.
type Registry ¶
type Registry interface {
Get(id string) (AgentInfo, bool)
List() []AgentInfo
ListByMode(mode config.AgentMode) []AgentInfo
// Resolves agent specific permission action for a given tool
EvaluatePermission(agentID, toolName, input string) permission.Action
IsToolEnabled(agentID, toolName string) bool
GlobalPermissions() map[string]any
}
Registry provides access to agent configurations. It allows querying agents by ID, listing all agents, and checking tool permissions.
func GetRegistry ¶
func GetRegistry() Registry
GetRegistry returns the global agent registry instance. It initializes the registry on first call with built-in agents, discovered markdown agents, and configuration overrides.