Documentation
¶
Overview ¶
Package adopt detects unmanaged skills in tool-facing directories and imports them into the canonical Scribe store (~/.scribe/skills/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCandidates ¶
FindCandidates walks configured adoption paths (via cfg.AdoptionPaths()) and returns candidates and conflicts. Never mutates state.
Types ¶
type AdoptCompleteMsg ¶
AdoptCompleteMsg is emitted after all candidates in Apply have been processed.
type AdoptErrorMsg ¶
AdoptErrorMsg is emitted when adoption fails for a single candidate.
type AdoptedMsg ¶
AdoptedMsg is emitted when a candidate is successfully adopted.
type Adopter ¶
type Adopter struct {
State *state.State
Tools []tools.Tool // tools to consider (typically tools.DefaultTools())
Emit func(any) // optional; nil is safe
}
Adopter performs adoption.
type Candidate ¶
type Candidate struct {
Name string // skill name (dir base)
LocalPath string // source dir on disk
Targets []string // tool names where this skill was discovered (e.g. ["claude"])
Hash string // content hash (blob SHA of SKILL.md)
// contains filtered or unexported fields
}
Candidate is an unmanaged skill that adoption can import.
type Conflict ¶
type Conflict struct {
Name string
Managed state.InstalledSkill
Unmanaged Candidate
}
Conflict describes a name collision between an unmanaged skill and a managed one.
type Decision ¶
type Decision int
Decision is the user's choice for a single conflict.
const ( // DecisionSkip drops the conflict — nothing is adopted. DecisionSkip Decision = iota // DecisionOverwriteManaged imports the unmanaged skill into the store, // bumping the managed revision. DecisionOverwriteManaged // DecisionReplaceUnmanaged re-links the unmanaged path to the managed // store entry (refreshes symlink, does not overwrite canonical content). DecisionReplaceUnmanaged )