package sdk import ( "context" "fmt" ) // BasePlugin provides default implementations for optional Plugin methods. type BasePlugin struct{} func (BasePlugin) Init(_ context.Context, _ PluginConfig) error { return nil } func (BasePlugin) Start(_ context.Context, _ HostAPI) error { return nil } func (BasePlugin) Stop(_ context.Context) error { return nil } func (BasePlugin) Health(_ context.Context) error { return nil } // BaseTool provides a Validate default that checks required parameters. type BaseTool struct { Def ToolDefinition Required []string } func (b BaseTool) Definition() ToolDefinition { return b.Def } func (b BaseTool) Complexity() ToolComplexity { return ComplexitySimple } func (b BaseTool) Validate(args map[string]interface{}) error { for _, key := range b.Required { if _, ok := args[key]; !ok { return fmt.Errorf("missing required parameter: %s", key) } } return nil } func (b BaseTool) Execute(_ context.Context, _ map[string]interface{}) (*ToolResult, error) { return nil, fmt.Errorf("not implemented") }