plugins

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL