Documentation
¶
Index ¶
- func LoadAll(dir string) (map[string]*Kit, error)
- func Resolve(pf *projectfile.ProjectFile, availableKits map[string]*Kit, ...) ([]string, error)
- func ResolveMCPServers(pf *projectfile.ProjectFile, availableKits map[string]*Kit) ([]string, error)
- func Save(path string, kit *Kit) error
- type Conflict
- type Kit
- type MissingRef
- type Ref
- type Resolution
- type ResolvedOrigin
- type ResolvedSkill
- type ResolverInput
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(pf *projectfile.ProjectFile, availableKits map[string]*Kit, installedSkills []string) ([]string, error)
Resolve returns the final skill set for a project. Algorithm:
- union all skills declared by projectFile.Kits
- apply projectFile.Add
- apply projectFile.Remove
- expand globs against installedSkills
- return a deduplicated, sorted skill name slice
func ResolveMCPServers ¶
func ResolveMCPServers(pf *projectfile.ProjectFile, availableKits map[string]*Kit) ([]string, error)
ResolveMCPServers returns the final MCP server set for a project. MCP servers are kit-scoped so projects only activate runtime tools declared by their selected kits.
Types ¶
type Kit ¶
type Kit struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Skills []string `yaml:"-"`
SkillAliases map[string]string `yaml:"-"`
MCPServers []string `yaml:"mcp_servers,omitempty"`
Source *Source `yaml:"source,omitempty"`
}
Kit is a named bundle of Scribe skills.
func (Kit) MarshalYAML ¶
type MissingRef ¶
type Ref ¶
type Ref struct {
Raw string
Registry string
Source manifest.Source
Skill string
Local bool
Glob bool
}
Ref is a parsed skill reference from a kit.
func ParseSkillRef ¶
ParseSkillRef parses same-registry, cross-registry, pinned github, and local skill references used by registry-published kits.
type Resolution ¶
type Resolution struct {
Skills []ResolvedSkill `json:"skills"`
Missing []MissingRef `json:"missing,omitempty"`
Conflicts []Conflict `json:"conflicts,omitempty"`
}
func ResolveWithDetail ¶
func ResolveWithDetail(ctx context.Context, in ResolverInput) (Resolution, error)
type ResolvedOrigin ¶
type ResolvedOrigin string
const ( OriginSameRegistry ResolvedOrigin = "same_registry" OriginCrossRegistry ResolvedOrigin = "cross_registry" OriginLocal ResolvedOrigin = "local" )
type ResolvedSkill ¶
type ResolverInput ¶
type ResolverInput struct {
Project *projectfile.ProjectFile
Kits map[string]*Kit
InstalledSkills []string
Registries []config.RegistryConfig
NowRegistry func(context.Context, string) (*manifest.Manifest, error)
}
Click to show internal directories.
Click to hide internal directories.