Expand description
Install + local-plugin management.
install resolves a plugin against a crate::Client, downloads
the artifact through a pluggable Downloader (so tests can inject
bytes), verifies the SHA-256, and writes the result to
crate::paths::plugin_install_dir. A copy of the manifest is
stashed alongside (.manifest) so list/info/update can read
metadata without re-hitting the registry.
Local enumeration helpers (list_installed, read_installed,
remove) keep the file-layout knowledge in one place.
Structs§
- Http
Downloader - HTTP downloader using
ureq. The production downloader for CLIinstallandupdatecommands. - Installed
Record - The on-disk record for an installed plugin: the artifact path plus the cached manifest.
- Memory
Downloader - In-memory downloader keyed by URL.
- Noop
Downloader - A stub downloader that surfaces a typed “not yet implemented” for any URL. Used by the CLI when no real transport is wired in yet.
Traits§
- Downloader
- Pluggable artifact transport, mirroring
crate::client::Fetcherbut for the binary blob referenced by a manifest’s[artifact]url.
Functions§
- install
- Install
nameatversion(or latest whenNone). - install_
manifest - Install a resolved manifest. Split out so
updatecan reuse the path after re-resolving. - list_
installed - Enumerate installed plugins by scanning the plugins directory for
<name>-<version>.sofiles with a sibling.manifest. - read_
installed - Read a previously installed plugin’s record from its artifact path.
- remove
- Remove a plugin by name. Removes every installed version whose name matches (there should only be one under the single-version-per-name model, but this is forgiving).