Documentation
¶
Overview ¶
Package agentplugin reads and validates portable Agent Plugins packages.
Index ¶
Constants ¶
const ( PluginSchemaID = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json" MCPSchemaID = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json" PluginSchemaSHA256 = "0a4aad95ce337878ad38802ebf0daa3fde76abe3f65400c86bcbb1ec0b3ab883" MCPSchemaSHA256 = "6539175bfcdf43085855183e86da40ea94b166547a72b47ae9a0a390516d3acb" )
Variables ¶
This section is empty.
Functions ¶
func ReadManifestName ¶
ReadManifestName reads only the authored package name needed to resolve its data directory. Load still performs the complete schema and component validation exactly once afterward.
func ValidateName ¶
ValidateName enforces the portable manifest name grammar byte-for-byte.
Types ¶
type AuthorInfo ¶
AuthorInfo mirrors the closed author object in the standard.
type Diagnostic ¶
Diagnostic records one non-fatal component skip.
type LoadOptions ¶
type LoadOptions struct {
DataDir string
}
LoadOptions supplies the instance-specific data root used for expansion.
type ManifestError ¶
type ManifestError struct {
Issues []Issue
}
ManifestError contains every deterministic fatal manifest issue.
func (*ManifestError) Error ¶
func (e *ManifestError) Error() string
Error renders all issues without discarding their field paths.
type Package ¶
type Package struct {
Name string
Version string
Description string
Author *AuthorInfo
Homepage string
Repository string
License string
Keywords []string
Skills []SkillRef
Servers []ServerSpec
Diagnostics []Diagnostic
}
Package is the validated, portable package projection.
type SchemaStatus ¶
type SchemaStatus int
SchemaStatus classifies a root manifest without selecting a fallback.
const ( SchemaSupported SchemaStatus = iota SchemaUnsupportedVersion )
func ClassifyManifest ¶
func ClassifyManifest(dir string) (SchemaStatus, string, error)
ClassifyManifest reads a regular, non-symlinked root plugin.json and triages its declared schema identifier.
func ClassifyManifestContent ¶
func ClassifyManifestContent(content []byte) (SchemaStatus, string)
ClassifyManifestContent applies the same schema triage to manifest bytes already acquired through a caller-owned filesystem capability.