Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BashTool ¶
type BashTool struct {
// contains filtered or unexported fields
}
BashTool represents the Bash tool that LLMs can invoke
func NewBashTool ¶
func NewBashTool(manager *LLMToolsManager) *BashTool
NewBashTool creates a new Bash tool
type LLMToolsManager ¶
type LLMToolsManager struct {
// contains filtered or unexported fields
}
LLMToolsManager provides tools that LLMs can invoke
func NewLLMToolsManager ¶
func NewLLMToolsManager(cfg *config.Config) *LLMToolsManager
NewLLMToolsManager creates a new LLM tools manager
func (*LLMToolsManager) GetAvailableTools ¶
func (manager *LLMToolsManager) GetAvailableTools() []ToolDefinition
GetAvailableTools returns the list of available tools for LLMs
func (*LLMToolsManager) InvokeTool ¶
func (manager *LLMToolsManager) InvokeTool(toolName string, parameters map[string]interface{}) (string, error)
InvokeTool invokes a tool by name with given parameters
type ToolDefinition ¶
type ToolDefinition struct { Name string `json:"name"` Description string `json:"description"` Parameters map[string]interface{} `json:"parameters"` }
ToolDefinition represents a tool definition for LLMs
type ToolEngine ¶
type ToolEngine struct {
// contains filtered or unexported fields
}
ToolEngine manages tool execution with security controls
func NewToolEngine ¶
func NewToolEngine(cfg *config.Config) *ToolEngine
NewToolEngine creates a new tool engine
func (*ToolEngine) ExecuteBash ¶
func (te *ToolEngine) ExecuteBash(command string) (*ToolResult, error)
ExecuteBash executes a bash command with security validation
func (*ToolEngine) ListAllowedCommands ¶
func (te *ToolEngine) ListAllowedCommands() []string
ListAllowedCommands returns the list of whitelisted commands
func (*ToolEngine) ValidateCommand ¶
func (te *ToolEngine) ValidateCommand(command string) error
ValidateCommand checks if a command would be allowed without executing it