Documentation
¶
Overview ¶
Package install applies a set of skills to the developer's machine: real copies in ~/.agents/skills, symlinks in ~/.claude/skills, backups of anything it has to overwrite, and the lockfile that records ownership.
Index ¶
- type Condition
- type Installer
- func (in *Installer) Apply(ctx context.Context, lock state.Lock, items []Item, keep ...string) (state.Lock, Report, error)
- func (in *Installer) Check(lock state.Lock) map[string]Condition
- func (in *Installer) LatestBackup(name string) (string, bool)
- func (in *Installer) Uninstall(lock state.Lock) (Report, error)
- type Item
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Installer ¶
Installer writes skills under a home directory.
func (*Installer) Apply ¶
func (in *Installer) Apply(ctx context.Context, lock state.Lock, items []Item, keep ...string) (state.Lock, Report, error)
Apply makes the installed skills match items. Skills in lock that are neither in items nor in keep are removed; keep protects skills the caller could not prepare this time. A failing skill keeps its previous state and does not prevent the others from being applied.
Once ctx is done, no new install starts: the remaining skills keep their previous state and are reported as deferred. Removals still happen (they are renames, and a blocked skill must go), and deleting what was set aside is left to a later run.
func (*Installer) LatestBackup ¶
LatestBackup returns the most recent backup of local edits to a skill.
type Item ¶
type Item struct {
ID string
Name string // install name
Commit string
Source string // directory holding the skill files
// SourceHash identifies the source content (e.g. its git tree id); it is
// computed from Source when empty.
SourceHash string
}
Item is a skill to install, as exported from the registry.