Global registry of skill repositories — tracks which projects use which remote repos and cleans up stale entries.

RepoEntry

Fields

NameTypeDescription
urlString
projectsVec<String>

Trait Implementations

  • Debug
  • Clone
  • Default
  • Serialize
  • Deserialize<'de>

Registry

Fields

NameTypeDescription
reposBTreeMap<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

  • Debug
  • Clone
  • Default
  • Serialize
  • Deserialize<'de>