Documentation
¶
Overview ¶
Package agentplugin loads portable Agent Plugins 1.0.0 packages.
Index ¶
Constants ¶
const ( // ManifestSchema is the canonical Agent Plugins 1.0.0 manifest schema ID. ManifestSchema = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json" // MCPSchema is the canonical Agent Plugins 1.0.0 MCP schema ID. MCPSchema = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json" )
Variables ¶
var ( // ErrInvalid reports a package or component that violates Agent Plugins. ErrInvalid = errors.New("agent plugin: invalid") // ErrLimitExceeded reports bounded discovery or content exhaustion. ErrLimitExceeded = errors.New("agent plugin: limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Plugin string `json:"plugin"`
Component string `json:"component"`
Code string `json:"code"`
Message string `json:"message"`
}
Diagnostic describes a non-fatal package or component decision.
type Limits ¶
type Limits struct {
MaxPlugins int
MaxManifestBytes int64
MaxMCPBytes int64
MaxMCPServers int
MaxSkills int
MaxSkillBytes int64
MaxResourcesPerSkill int
MaxResourceBytes int64
MaxTotalResourceBytes int64
}
Limits bound local package discovery and reads.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits returns conservative Agent Plugin loading bounds.
type Manifest ¶
type Manifest struct {
Name string
Version string
Description string
Author *Author
Homepage string
Repository string
License string
Keywords []string
}
Manifest is the portable metadata from plugin.json.
type Package ¶
type Package struct {
Manifest Manifest
Provenance string
Root string
Data string
SkillCount int
ServerCount int
// contains filtered or unexported fields
}
Package is one accepted portable plugin package.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is one fully decoded Agent Plugin generation.
func Load ¶
Load discovers immediate plugin package directories from the user root and, only when trusted, the project root. Each package is then loaded according to the Agent Plugins 1.0.0 fixed-location contract.
func LoadDirectory ¶
func LoadDirectory( ctx context.Context, directory string, dataBase string, limits Limits, ) (Result, error)
LoadDirectory validates and decodes one explicit Agent Plugin package root. It is intended for client validation surfaces; runtime discovery uses Load.
func (Result) Diagnostics ¶
func (r Result) Diagnostics() []Diagnostic
Diagnostics returns deterministic load diagnostics.
func (Result) MCPDefinitions ¶
func (r Result) MCPDefinitions() codingmcp.Definitions
MCPDefinitions returns validated portable MCP server definitions.
func (Result) SkillEntries ¶
func (r Result) SkillEntries() []extension.SkillEntry
SkillEntries returns accepted Agent Skills with plugin provenance.