Documentation
¶
Overview ¶
Package manage provides session-independent operations for the assistant to configure itself: install/enable/remove plugins, author skills, and add/remove MCP servers. All operations persist to disk (plugin/skill registries and the user config file) and are fully unit-testable without a running session.
Index ¶
- type Configurator
- func (c *Configurator) AddMCPServer(name, command string, args []string, env map[string]string) error
- func (c *Configurator) EffectiveConfig() (types.Config, error)
- func (c *Configurator) GenerateSkill(name, description, instructions string) (SkillInfo, error)
- func (c *Configurator) InstallPlugin(url, ref string) (PluginInfo, error)
- func (c *Configurator) ListMCPServers() ([]MCPServerInfo, error)
- func (c *Configurator) ListPlugins() ([]PluginInfo, error)
- func (c *Configurator) ListSkills() ([]SkillInfo, error)
- func (c *Configurator) RemoveMCPServer(name string) error
- func (c *Configurator) RemovePlugin(name string) error
- func (c *Configurator) SetPluginEnabled(name string, enabled bool) error
- type MCPServerInfo
- type PluginInfo
- type SkillInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurator ¶
type Configurator struct {
// contains filtered or unexported fields
}
Configurator performs self-configuration operations against a base directory (the plugin/skill registries) and a single user config file (mcp_servers).
func New ¶
func New(baseDir, configPath string) *Configurator
New returns a Configurator rooted at baseDir (use plugin.BaseDir() in prod) writing MCP-server config to configPath (use config.WritablePath() in prod).
func (*Configurator) AddMCPServer ¶
func (c *Configurator) AddMCPServer(name, command string, args []string, env map[string]string) error
AddMCPServer persists an MCP server to the user config file.
func (*Configurator) EffectiveConfig ¶
func (c *Configurator) EffectiveConfig() (types.Config, error)
EffectiveConfig recomputes the merged config (same as startup) so callers can re-wire a live session after a change.
func (*Configurator) GenerateSkill ¶
func (c *Configurator) GenerateSkill(name, description, instructions string) (SkillInfo, error)
GenerateSkill writes a new SKILL.md into the shared "local" skill pack and ensures that pack is registered enabled, so the skill becomes loadable once the session reloads. Returns the new skill's tool-facing info.
func (*Configurator) InstallPlugin ¶
func (c *Configurator) InstallPlugin(url, ref string) (PluginInfo, error)
InstallPlugin installs a plugin (DISABLED) and returns its record.
func (*Configurator) ListMCPServers ¶
func (c *Configurator) ListMCPServers() ([]MCPServerInfo, error)
ListMCPServers returns the MCP servers configured in the user config file, sorted by name. It reads the writable user file (the authoritative source for add/remove), not the merged effective config.
func (*Configurator) ListPlugins ¶
func (c *Configurator) ListPlugins() ([]PluginInfo, error)
ListPlugins returns all installed plugins from the registry.
func (*Configurator) ListSkills ¶
func (c *Configurator) ListSkills() ([]SkillInfo, error)
ListSkills returns the skills contributed by enabled skill packs.
func (*Configurator) RemoveMCPServer ¶
func (c *Configurator) RemoveMCPServer(name string) error
RemoveMCPServer deletes an MCP server from the user config file.
func (*Configurator) RemovePlugin ¶
func (c *Configurator) RemovePlugin(name string) error
RemovePlugin deletes a plugin's files and registry record.
func (*Configurator) SetPluginEnabled ¶
func (c *Configurator) SetPluginEnabled(name string, enabled bool) error
SetPluginEnabled flips a plugin's enabled flag.
type MCPServerInfo ¶
MCPServerInfo is a configured MCP server in tool-facing form.
type PluginInfo ¶
PluginInfo is a registry plugin record in tool-facing form.