Documentation
¶
Overview ¶
Package installer runs the staging-verify-activate install transaction with temp-then-rename atomicity under an exclusive lock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupStaging ¶
CleanupStaging removes orphaned staging temp directories left under the given roots by an interrupted install, so a crash never leaves torn state behind (FR-024, SC-007). It returns the number of entries removed.
Types ¶
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer runs the staging-verify-activate transaction over the store, cache, and git runner.
func (*Installer) Discover ¶
Discover materializes the source and discovers the skill without activating it, for pre-flight checks such as learning the skill name or detecting a manifest conflict. Materialized git content is cached, so a following Install reuses it.
type Mode ¶
type Mode string
Mode is the actual activation method recorded for an installed skill. The requested preference may be "auto", but only symlink or copy is ever recorded (FR-020).
type Request ¶
type Request struct {
Ref source.Ref
Revision resolver.Revision
Name string // declared manifest key; must match frontmatter name
Path string // explicit in-repo subpath (optional)
Agents []agent.Agent
Scope Scope
ModePref string // symlink | copy | auto
ProjectRoot string
Home string
// Offline forbids network fetches; material must already be cached (FR-026).
Offline bool
// ExpectContentHash, when set, must equal the materialized content hash or
// the install fails closed (used by frozen restore, FR-015/FR-037).
ExpectContentHash string
}
Request is everything needed to install one skill.
type Result ¶
type Result struct {
Skill discovery.Skill
ContentHash string
SkillFileHash string
Mode Mode
Agents []string
Targets map[string]string // agentID -> recorded dir (relative for project scope)
Warnings []string
}
Result is the outcome of a successful install, sufficient to build a lock entry.