Documentation
¶
Overview ¶
Package plugin implements Agent Plugins v1.0.0. It loads plugin directories and exposes their skills, MCP servers, and namespaced lifecycle hooks.
Index ¶
Constants ¶
const MCPSchema = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json"
MCPSchema is the canonical Agent Plugins 1.0.0 MCP configuration identifier.
const ManifestSchema = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"
ManifestSchema is the canonical Agent Plugins 1.0.0 manifest identifier. It selects local validation rules and is never retrieved.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover(workDir, projectData, personalData string) ([]Plugin, []Diagnostic)
Discover loads every plugin reachable from the project and the user's home directory. A plugin name resolves once: the first directory that provides it wins and later copies are reported. Plugins whose manifest is invalid are reported and skipped.
projectData and personalData are the roots under which each scope's PLUGIN_DATA directories are created; the caller owns their location so plugin state sits alongside the rest of a project's state.
Types ¶
type Diagnostic ¶
Diagnostic reports something a plugin got wrong that did not stop the rest of it from loading.
func Servers ¶
func Servers(plugins []Plugin) (map[string]mcp.ServerConfig, []Diagnostic)
Servers returns every plugin's MCP servers keyed by their declared name. Earlier plugins win a contested name, matching skill precedence.
func (Diagnostic) String ¶
func (d Diagnostic) String() string
type Manifest ¶
type Manifest struct {
Schema string `json:"$schema"`
Name string `json:"name"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
Author *Author `json:"author,omitempty"`
Homepage string `json:"homepage,omitempty"`
Repository string `json:"repository,omitempty"`
License string `json:"license,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Extensions map[string]json.RawMessage `json:"extensions,omitempty"`
}
Manifest is the closed set of portable plugin.json fields.