Documentation
¶
Index ¶
- type Executor
- func (e *Executor) ApplyPermissionUpdates(updates []*permission.Update)
- func (e *Executor) Execute(ctx context.Context, name string, input map[string]any) (string, error)
- func (e *Executor) ExecuteWithSuggestions(ctx context.Context, name string, input map[string]any, ...) (string, error)
- func (e *Executor) SetMode(mode permission.Mode)
- type Registry
- type ToolRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor executes tools from the registry.
func NewExecutor ¶
NewExecutor creates a tool executor.
func (*Executor) ApplyPermissionUpdates ¶
func (e *Executor) ApplyPermissionUpdates(updates []*permission.Update)
ApplyPermissionUpdates updates in-memory permission policy state.
func (*Executor) ExecuteWithSuggestions ¶
func (e *Executor) ExecuteWithSuggestions( ctx context.Context, name string, input map[string]any, suggestions []*permission.Update, ) (string, error)
ExecuteWithSuggestions executes one tool call and provides permission suggestions to callback.
func (*Executor) SetMode ¶
func (e *Executor) SetMode(mode permission.Mode)
SetMode updates the active permission mode for subsequent tool evaluations.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry contains tool metadata for model exposure and execution.
func NewRegistry ¶
NewRegistry builds a registry from options.
func (*Registry) OpenAITools ¶
OpenAITools returns OpenAI-compatible tool definitions.
func (*Registry) ResolveName ¶
ResolveName returns a registered tool name that matches `name` under a loose equivalence — ignoring runs of underscores. LM Studio thinking-mode models (e.g. Qwen3) sometimes emit `mcp_server_tool` in their Hermes XML output where the canonical name is `mcp__server__tool`. Returns the canonical name and true on a unique match, else empty + false.
func (*Registry) ServerStatuses ¶
func (r *Registry) ServerStatuses() map[string]mcp.ServerStatus
ServerStatuses returns the current MCP server discovery status by server name.