Documentation
¶
Overview ¶
Package skills implements the skills command chain, which installs the Fly agent skills from github.com/superfly/skills into local coding agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodingTool ¶
type CodingTool struct {
Slug string
Name string
Parent string // directory whose presence means the tool is installed
}
CodingTool is a coding agent that reads skills from a global directory.
func (CodingTool) SkillsDir ¶
func (t CodingTool) SkillsDir() string
SkillsDir is the directory skills are written into for this tool.
type Manifest ¶
type Manifest struct {
// SourceSHA is the last revision that was applied in full everywhere.
SourceSHA string `json:"source_sha,omitempty"`
// ArchiveSHA256 is the hex digest of the tarball that revision was
// installed from, recorded together with SourceSHA.
ArchiveSHA256 string `json:"archive_sha256,omitempty"`
// LatestSHA is the newest upstream revision seen, applied or not.
LatestSHA string `json:"latest_sha,omitempty"`
LastChecked string `json:"last_checked,omitempty"`
Targets map[string]map[string]SkillRecord `json:"targets"`
}
Manifest records what fly skills has installed, keyed by target skills directory and then by skill name.
type SkillFile ¶
type SkillFile struct {
// Rel is the path relative to the skill directory, forward-slashed.
Rel string
Contents []byte
}
SkillFile is one file inside a skill directory.
type SkillFiles ¶
SkillFiles maps a skill directory name to its files.
type SkillRecord ¶
type SkillRecord struct {
// SourceSHA is the skills repository commit the files came from. It only
// advances when every incoming file was applied.
SourceSHA string `json:"source_sha,omitempty"`
InstalledAt string `json:"installed_at"`
// Files maps a forward-slashed path relative to the skill directory to
// the content hash we wrote.
Files map[string]string `json:"files"`
}
SkillRecord is what we last wrote for one skill into one target.
type SkillState ¶
type SkillState int
SkillState is how an on-disk skill compares to the recorded baseline and the incoming upstream content.
const ( // NotInstalled means the skill directory does not exist. NotInstalled SkillState = iota // UpToDate means every incoming file is already on disk with matching // content and nothing we own has been left behind. UpToDate // CleanUpgrade means every file we own is unmodified and upstream moved. CleanUpgrade // Modified means at least one file we own was edited or deleted, or a // user-added file collides with an incoming one. Modified // Unverifiable means the directory exists but we have no baseline and it // differs from upstream, so we cannot prove it is untouched. Unverifiable )
func (SkillState) String ¶
func (s SkillState) String() string