Documentation
¶
Index ¶
- type PluginConfig
- type PluginManager
- func (pm *PluginManager) DiscoverActions(ctx context.Context, pluginID string) error
- func (pm *PluginManager) LoadPlugin(ctx context.Context, config PluginConfig) error
- func (pm *PluginManager) Status() map[string]string
- func (pm *PluginManager) StopAll(ctx context.Context) error
- func (pm *PluginManager) StopPlugin(ctx context.Context, id string) error
- type PluginProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginConfig ¶
type PluginConfig struct {
ID string
Name string
Command string // MCP server binary path
Args []string // CLI arguments
Env []string // environment variables
}
PluginConfig describes how to launch and identify a plugin subprocess.
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
PluginManager manages the lifecycle of MCP plugin subprocesses.
func NewPluginManager ¶
func NewPluginManager(s store.Store, registry *actions.Registry, logger *slog.Logger) *PluginManager
NewPluginManager creates a new PluginManager.
func (*PluginManager) DiscoverActions ¶
func (pm *PluginManager) DiscoverActions(ctx context.Context, pluginID string) error
DiscoverActions sends a tools/list MCP request and registers discovered actions.
func (*PluginManager) LoadPlugin ¶
func (pm *PluginManager) LoadPlugin(ctx context.Context, config PluginConfig) error
LoadPlugin starts a plugin subprocess and initializes MCP handshake.
func (*PluginManager) Status ¶
func (pm *PluginManager) Status() map[string]string
Status returns the current status of all managed plugins.
func (*PluginManager) StopAll ¶
func (pm *PluginManager) StopAll(ctx context.Context) error
StopAll stops all managed plugins.
func (*PluginManager) StopPlugin ¶
func (pm *PluginManager) StopPlugin(ctx context.Context, id string) error
StopPlugin gracefully stops a plugin subprocess.
type PluginProvider ¶
type PluginProvider interface {
Name() string
Actions() []actions.Action
HealthCheck(ctx context.Context) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
}
PluginProvider is an external action source (e.g. MCP server). When started, it discovers available tools and registers them as actions.
Click to show internal directories.
Click to hide internal directories.