maintenance

package
v0.0.0-...-8f9dc6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkillName        = "guiho-s-mirror"
	BlockBeginMarker = "<!-- BEGIN MIRROR — DO NOT EDIT THIS SECTION -->"
	BlockEndMarker   = "<!-- END MIRROR -->"
)

Variables

This section is empty.

Functions

func AtomicWrite

func AtomicWrite(path string, content []byte, mode fs.FileMode) error

func EmbeddedInstructionBody

func EmbeddedInstructionBody(embeddedFS embed.FS) (string, error)

func EnsureSkillFile

func EnsureSkillFile(targetPath string, content []byte) (bool, error)

func FindAgentsMD

func FindAgentsMD(startDir string) (string, error)

func ReadAGENTSFile

func ReadAGENTSFile(path string) (string, error)

func ReconcileAgentSkills

func ReconcileAgentSkills(embeddedFS embed.FS, targetDir string) error

ReconcileAgentSkills atomically updates both targets below targetDir. The explicit CLI path uses InstallAgentSkills to choose global or local scope.

func RemoveAGENTSBlock

func RemoveAGENTSBlock(agentsPath string) error

func RunMaintenanceNonBlocking

func RunMaintenanceNonBlocking(embeddedFS embed.FS, targetDir, blockContent string)

func UninstallAgentSkills

func UninstallAgentSkills(targetDir string, local bool) ([]string, error)

func UpdateAGENTSBlock

func UpdateAGENTSBlock(agentsPath, blockContent string) error

func WriteAGENTSFile

func WriteAGENTSFile(path, content string) error

Types

type InstructionResult

type InstructionResult struct {
	Path    string `json:"path"`
	Changed bool   `json:"changed"`
}

func ApplyInstructions

func ApplyInstructions(embeddedFS embed.FS, targetDir string) ([]InstructionResult, error)

func RemoveInstructions

func RemoveInstructions(targetDir string) ([]InstructionResult, error)

type SkillResult

type SkillResult struct {
	Tool      string `json:"tool"`
	Path      string `json:"path"`
	Installed bool   `json:"installed"`
	Updated   bool   `json:"updated"`
}

func InstallAgentSkills

func InstallAgentSkills(embeddedFS embed.FS, targetDir string, local bool) ([]SkillResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL