Documentation
¶
Overview ¶
Package agentplugin reads and validates portable Agent Plugins packages.
Index ¶
- Constants
- Variables
- func LocateManifest(root string) (string, string, error)
- func ValidateName(name string) error
- type AuthorInfo
- type DerivedInput
- type Diagnostic
- type Issue
- type LoadOptions
- type ManifestDocument
- type ManifestError
- type NotManifestError
- type OAuthConfig
- type Package
- type SchemaStatus
- type SchemaUnsupportedError
- type ServerSpec
- type SkillRef
Constants ¶
const ( ClientComponentIgnored = "client_component_ignored" ClientFieldIgnored = "client_field_ignored" ClientMCPDiscovered = "client_mcp_discovered" )
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" )
const ClientPlaceholderInvalid = "client_placeholder_invalid"
const LayoutStandard = "standard"
LayoutStandard identifies the portable root manifest grammar.
Variables ¶
var ErrSchemaUnsupported = errors.New("extension: Agent Plugins schema is unsupported")
Functions ¶
func LocateManifest ¶
LocateManifest selects a manifest when only its path and layout are needed.
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 DerivedInput ¶
type Diagnostic ¶
Diagnostic records one non-fatal component skip.
type LoadOptions ¶
LoadOptions supplies the instance-specific data root used for expansion.
type ManifestDocument ¶
type ManifestDocument struct {
Path string
Layout string
// contains filtered or unexported fields
}
ManifestDocument retains one securely acquired manifest for classification and loading.
func ReadManifest ¶
func ReadManifest(root string) (*ManifestDocument, error)
func (*ManifestDocument) Classify ¶
func (m *ManifestDocument) Classify() (SchemaStatus, string)
func (*ManifestDocument) Load ¶
func (m *ManifestDocument) Load(opts LoadOptions) (*Package, error)
func (*ManifestDocument) Name ¶
func (m *ManifestDocument) Name() (string, error)
func (*ManifestDocument) ValidJSON ¶
func (m *ManifestDocument) ValidJSON() bool
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 NotManifestError ¶
NotManifestError records the candidate paths checked during lookup.
func (*NotManifestError) Error ¶
func (e *NotManifestError) Error() string
type OAuthConfig ¶
type Package ¶
type Package struct {
Layout string
Name string
Version string
Description string
Author *AuthorInfo
Homepage string
Repository string
License string
Keywords []string
Skills []SkillRef
Inputs []DerivedInput
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 locates the authored manifest and triages its declared schema.
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.
type SchemaUnsupportedError ¶
SchemaUnsupportedError retains manifest identity across acquisition and loading boundaries.
func (*SchemaUnsupportedError) Error ¶
func (e *SchemaUnsupportedError) Error() string
func (*SchemaUnsupportedError) Unwrap ¶
func (e *SchemaUnsupportedError) Unwrap() error