Global registry of skill repositories — tracks which projects use which remote repos and cleans up stale entries.
RepoEntry
Fields
| Name | Type | Description |
|---|---|---|
url | String | |
projects | Vec<String> |
Trait Implementations
DebugCloneDefaultSerializeDeserialize<'de>
Registry
Fields
| Name | Type | Description |
|---|---|---|
repos | BTreeMap<String, RepoEntry> |
Methods
registry_path
pub fn registry_path() -> Option<PathBuf>
Returns the path to the global registry file.
load
pub fn load() -> Result<Self>
Load the global registry. Returns empty registry if file doesn’t exist.
load_from
pub fn load_from(path: &Path) -> Result<Self>
Load registry from a specific path.
save
pub fn save(&self) -> Result<()>
Save registry to the default path.
save_to
pub fn save_to(&self, path: &Path) -> Result<()>
Save registry to a specific path.
register
pub fn register(&mut self, repo_hash: &str, url: &str, project_dir: &str)
Register that a project uses a specific repo.
unregister
pub fn unregister(&mut self, repo_hash: &str, project_dir: &str)
Unregister a project from a specific repo.
cleanup_stale
pub fn cleanup_stale(&mut self) -> Vec<(String, String)>
Remove repos with no remaining projects. Returns list of removed repo hashes.
Trait Implementations
DebugCloneDefaultSerializeDeserialize<'de>