Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type ExecutionContext struct {
WorkflowID string
StepID string
AgentID string
RunID string
Context context.Context
Timeout time.Duration
}
ExecutionContext provides context for tool execution
type Provider ¶
type Provider interface {
// GetType returns the tool type this provider handles
GetType() ast.ToolType
// AddToolDefinition adds a tool definition to the provider
// and returns the tools available from the definition.
// This could return multiple tools if the definition is a MCP server.
AddToolDefinition(tool *ast.Tool) ([]Tool, error)
// ExecuteTool executes a tool with the given parameters
ExecuteTool(execCtx *execcontext.ExecutionContext, toolName string, parameters json.RawMessage) (*Result, error)
// Close cleans up resources
Close() error
}
ToolProvider defines the interface for tool providers
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
ToolRegistry manages tool providers and available tools
func (*Registry) ExecuteTool ¶
func (tr *Registry) ExecuteTool(execCtx *execcontext.ExecutionContext, toolName string, parameters json.RawMessage) (*Result, error)
GetProvider returns a provider by name
func (*Registry) GetToolsForAgent ¶
func (*Registry) RegisterProvider ¶
RegisterProvider registers a tool provider
type Result ¶
type Result struct {
ToolName string `json:"tool_name"`
Success bool `json:"success"`
Output interface{} `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Result represents the result of a tool execution
Click to show internal directories.
Click to hide internal directories.