Documentation
¶
Index ¶
- func CopyDir(src, dst string) error
- func FormatDiff(diffs []FileDiff) string
- func HasDifferences(srcDir, dstDir string) (bool, error)
- func ListSkillFiles(skillDir string) ([]string, error)
- func RemoveSkillDir(path string) error
- func ReplaceDir(src, dst string) error
- func SymlinkDir(src, dst string) error
- type FileDiff
- type Skill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies src into dst, preserving file mode bits (so executable scripts inside a skill keep their +x). Symlinks are recreated as symlinks rather than followed.
func FormatDiff ¶
func HasDifferences ¶
func ListSkillFiles ¶
func RemoveSkillDir ¶
func ReplaceDir ¶
ReplaceDir atomically replaces dst with a copy of src. It copies into a temporary sibling directory first, then swaps it into place with rename, so a failure mid-copy never leaves dst partially written.
func SymlinkDir ¶
Types ¶
type FileDiff ¶
type FileDiff struct {
RelPath string
Status string // "modified", "added", "deleted"
OldContent string
NewContent string
Binary bool
}
func CompareSkillDirs ¶
type Skill ¶
type Skill struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Path string `yaml:"-" json:"path"`
RawContent string `yaml:"-" json:"-"`
}
func DiscoverSkills ¶
func ParseSkillMd ¶
Click to show internal directories.
Click to hide internal directories.