Expand description
Provider manager (plans/0010): install, list, update, upgrade, pin, remove, use — for stdio provider binaries distributed as GitHub release tarballs (the 4-target matrix rootle and its providers ship: linux+macOS × x86_64+aarch64).
Layout (XDG tiers, one purpose each — see the plan’s survey):
~/.local/share/rootle/providers/<name>/<version>/rootle-<name> binary
~/.local/share/rootle/providers/<name>/current -> <version>/ pointer
~/.local/state/rootle/providers/<name>.toml receiptAtomicity (krew model): download to temp staging → verify sha256
(mandatory) → extract into the versioned dir → write the receipt
LAST → atomically re-point current. A failed step leaves the
previous version intact. The running TUI is never affected —
provider children die with the app, the next spawn picks up the
new current.
Config declares, the store installs (mise pattern): use writes
the existing [provider] block; the runtime build() is
untouched and hand-edited configs keep working.
Submodules by concern: refs (the install-reference grammar),
release (GitHub API, tarball, checksum), install (the
install/update/upgrade flows), store (local state on disk),
bookkeeping (pin/remove/use/list).
Modules§
- progress
- CLI output aesthetics for the provider manager (plans/0010):
the uv/mise grammar — bold-cyan in-progress verbs that flip to
bold-green on completion, a braille spinner during downloads, dim
step summaries with bold counts and timings. Std only: raw ANSI,
IsTerminalgating,NO_COLORrespected.
Structs§
- Installed
- An installed provider, as
listreports. - Manager
- Provider
Reference - A resolved install reference (the grammar from the plan):
gitlab|owner/repo|https://github.com/owner/repo, each optionally@tag-pinned — or a plain-HTTP URL naming the platform tarball directly (plans/0014 #1a: arbitrary artifact hosts). - Receipt
- The receipt: provenance recorded beside the binary so list/upgrade read local state, never the network (gh manifest.yml pattern).
Enums§
- Manager
Error - Sweep
Outcome - One provider’s result in
rootle update’s sweep (0019 M1) — rendered by the caller, never printed here.
Functions§
- checksum_
sidecar - The
.sha256sidecar forasset— no sidecar, no install. - download_
bytes - extract_
binary - Extract the binary from the tarball: find the single executable
file, return its bytes (our tarballs contain
<dir>/<binary>). - latest_
release - latest_
release_ at - The verified-download machinery, shared with
rootle update(0017 M2) — same integrity model as provider installs. Tests point this at a loopback host. - pick_
asset - Pick the asset for this platform:
<anything>-<target>.tar.gz, suffix-matched (gh extension’s model — tolerate version prefixes and name variants). - platform_
target - The GitHub release this rootle downloads for (the 4-target matrix).
- verify_
checksum - Verify against the
.sha256sidecar asset — mandatory (krew rule: a missing checksum is a failed install, not a warning).