Documentation
¶
Index ¶
- Constants
- func AllowedMCPServers(trust string, servers map[string]mcpclient.ServerConfig) map[string]mcpclient.ServerConfig
- func DefaultTrust(_ string) string
- func IsTrusted(trust string) bool
- func NormalizeID(raw string) string
- func NormalizeTrust(trust string) string
- func Remove(cwd string, loaded Loaded) error
- func RuntimeSkillSource(scope, trust string) string
- func RuntimeSkillSpecs(scope, trust string, specs []skill.Spec) []skill.Spec
- func SetEnabled(cwd string, loaded Loaded, enabled bool) error
- func SetTrust(cwd string, loaded Loaded, trust string) error
- func ValidateID(id string) error
- type Catalog
- type Contributions
- type InstallInput
- type InstallResult
- type Loaded
- type Manifest
- type ScaffoldInput
- type ScaffoldResult
- type SkillDir
- type State
- type ValidationReport
Constants ¶
View Source
const ( TrustTrusted = "trusted" TrustUntrusted = "untrusted" )
View Source
const ( ScopeProject = "project" ScopeUser = "user" )
Variables ¶
This section is empty.
Functions ¶
func AllowedMCPServers ¶
func AllowedMCPServers(trust string, servers map[string]mcpclient.ServerConfig) map[string]mcpclient.ServerConfig
func DefaultTrust ¶
func NormalizeID ¶
func NormalizeTrust ¶
func RuntimeSkillSource ¶
func RuntimeSkillSpecs ¶
func SetEnabled ¶
SetEnabled persists a plugin enable/disable decision into the matching state file.
func ValidateID ¶
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is the in-memory registry of discovered plugins.
func LoadAll ¶
LoadAll discovers plugins from user and project roots. Project scope wins on duplicate IDs.
func (*Catalog) Contributions ¶
func (c *Catalog) Contributions() Contributions
Contributions collects runtime contributions from enabled plugins.
type Contributions ¶
type Contributions struct {
SkillSpecs []skill.Spec
SkillDirs []SkillDir
CommandDirs []string
MCPServers map[string]mcpclient.ServerConfig
}
Contributions is the runtime-facing view of all enabled plugins.
type InstallInput ¶
type InstallResult ¶
func InstallLocal ¶
func InstallLocal(input InstallInput) (*InstallResult, error)
type Loaded ¶
type Loaded struct {
Manifest Manifest
State State
RootDir string
Scope string // "builtin", "project", or "user"
// contains filtered or unexported fields
}
Loaded is a validated plugin plus its effective local state.
func (Loaded) CommandCount ¶
CommandCount returns the number of command roots contributed by this plugin.
func (Loaded) SkillCount ¶
SkillCount returns the number of skills contributed by this plugin.
type Manifest ¶
type Manifest struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description,omitempty"`
SkillsDir string `json:"skillsDir,omitempty"`
CommandsDir string `json:"commandsDir,omitempty"`
MCPServers map[string]mcpclient.ServerConfig `json:"mcpServers,omitempty"`
}
Manifest describes a plugin package and the contributions it exports.
type ScaffoldInput ¶
type ScaffoldResult ¶
func Scaffold ¶
func Scaffold(input ScaffoldInput) (*ScaffoldResult, error)
type ValidationReport ¶
type ValidationReport struct {
RootDir string
Scope string
Manifest Manifest
State *State
SkillsDir string
CommandsDir string
SkillCount int
CommandCount int
MCPCount int
Errors []string
Warnings []string
}
func ValidateLoaded ¶
func ValidateLoaded(loaded Loaded) (*ValidationReport, error)
func ValidatePath ¶
func ValidatePath(path, scope string) (*ValidationReport, error)
func (*ValidationReport) Summary ¶
func (r *ValidationReport) Summary() string
Click to show internal directories.
Click to hide internal directories.