extensions

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceWorkspace = plugin.SourceWorkspace
	SourceUser      = plugin.SourceUser
	SourceBundled   = plugin.SourceBundled
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DisabledSet added in v0.14.0

type DisabledSet struct {
	Skills     []string `json:"skills,omitempty"`
	Plugins    []string `json:"plugins,omitempty"`
	MCPServers []string `json:"mcp_servers,omitempty"`
}

DisabledSet tracks which extensions are disabled by the user.

type LifecycleToolResolver added in v0.28.5

type LifecycleToolResolver interface {
	Get(name string) (tool.Tool, bool)
}

LifecycleToolResolver returns the tool registered under name. The extensions Manager passes in a small Resolver so lifecycle hooks can only see a curated subset of the user-surface registry; no caller has to hand the manager a full *tool.Registry just for hook plumbing.

type MPRuntime

type MPRuntime interface {
	SetServers(servers []config.MCPServer)
	BuildTools(ctx context.Context) ([]tool.Tool, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(opts Options) (*Manager, error)

func (*Manager) ChatTools

func (m *Manager) ChatTools() []tool.Tool

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) DisabledSet added in v0.14.0

func (m *Manager) DisabledSet() DisabledSet

DisabledSet returns the current disabled extensions.

func (*Manager) FindSkill

func (m *Manager) FindSkill(name string) (skill.Definition, bool)

func (*Manager) Reload

func (m *Manager) Reload(ctx context.Context) error

func (*Manager) SetDisabled added in v0.14.0

func (m *Manager) SetDisabled(ctx context.Context, kind, name string, disabled bool) error

SetDisabled enables or disables an extension and reloads.

func (*Manager) Snapshot

func (m *Manager) Snapshot() Snapshot

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

type Options

type Options struct {
	WorkspaceDir           string
	SkillsEnabled          bool
	PluginsEnabled         bool
	PluginsAllowMCPServers bool
	SkillSources           []skill.SourceDir
	PluginSources          []PluginSourceDir
	MCPBaseServers         []config.MCPServer
	MCPRuntime             MPRuntime
	WatchSkills            bool
	WatchPlugins           bool
	WatchDebounce          time.Duration
	PluginConfig           map[string]map[string]any // per-plugin config keyed by plugin ID

	// LifecycleToolResolver is consulted by plugin lifecycle hooks to
	// look up the builtin tool to invoke. May be nil; nil disables
	// lifecycle hook execution and turns each declared hook into a
	// single skip diagnostic. Wiring is the caller's responsibility —
	// extensions/Manager intentionally does not own the user-surface
	// registry.
	LifecycleToolResolver LifecycleToolResolver
}

type PluginSourceDir

type PluginSourceDir struct {
	Source Source
	Dir    string
}

type Snapshot

type Snapshot struct {
	Version     int64
	Skills      []skill.Definition
	Plugins     []plugin.Definition
	SkillPrompt string
	MCPServers  []config.MCPServer
	Diagnostics []string
}

type Source

type Source = plugin.Source

Jump to

Keyboard shortcuts

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