Documentation
¶
Index ¶
- type Handler
- type Registry
- func (r *Registry) AddInternalService(s svc.Service) error
- func (r *Registry) ClearWarnings()
- func (r *Registry) Definitions() []llm.ToolDefinition
- func (r *Registry) Execute(ctx context.Context, name string, args map[string]interface{}) (string, error)
- func (r *Registry) GetDefinition(name string) (*llm.ToolDefinition, bool)
- func (r *Registry) Initialize(ctx context.Context)
- func (r *Registry) InjectVirtualAgentTools(agents []*agent.Agent, domain string)
- func (r *Registry) LastWarnings() []string
- func (r *Registry) MatchDefinition(pattern string) []*llm.ToolDefinition
- func (r *Registry) MustHaveTools(patterns []string) ([]llm.Tool, error)
- func (r *Registry) SetDebugLogger(w io.Writer)
- func (r *Registry) ToolTimeout(name string) (time.Duration, bool)
- func (r *Registry) WithManager(m *manager.Manager) *Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry bridges per-server MCP tools and internal services to the generic tool.Registry interface so that callers can use dependency injection.
func NewWithManager ¶
NewWithManager creates a registry backed by an MCP client manager.
func (*Registry) AddInternalService ¶
AddInternalService registers a service.Service as an in-memory MCP client under its Service.Name().
func (*Registry) ClearWarnings ¶
func (r *Registry) ClearWarnings()
ClearWarnings clears accumulated warnings.
func (*Registry) Definitions ¶
func (r *Registry) Definitions() []llm.ToolDefinition
func (*Registry) GetDefinition ¶
func (r *Registry) GetDefinition(name string) (*llm.ToolDefinition, bool)
func (*Registry) Initialize ¶
Initialize attempts to eagerly discover MCP servers and list their tools to warm the local cache. It logs warnings for unreachable servers.
func (*Registry) InjectVirtualAgentTools ¶
InjectVirtualAgentTools registers synthetic tool definitions that delegate execution to another agent. It must be called once during bootstrap *after* the agent catalogue is loaded. Domain can be empty to expose all.
func (*Registry) LastWarnings ¶
LastWarnings returns any accumulated non-fatal warnings and does not clear them.
func (*Registry) MatchDefinition ¶
func (r *Registry) MatchDefinition(pattern string) []*llm.ToolDefinition
func (*Registry) MustHaveTools ¶
func (*Registry) SetDebugLogger ¶
func (*Registry) ToolTimeout ¶ added in v0.2.10
ToolTimeout returns a suggested timeout for a given tool name.