Expand description
Network-backed package registry client.
Implements the registry protocol defined in spec §19.5:
GET /packages/{name} → { versions, latest }
GET /packages/{name}/{version} → { manifest, checksum, download_url }
GET /packages/{name}/{version}/download → tarball bytesTarballs are cached under cache_dir after SHA-256 verification.
A PackageRegistry can be passed as a fallback for offline use
or private overrides.
Structs§
- Fetched
Package - Result of
NetworkRegistry::fetch_package. - Manifest
Data - Manifest fragment served by the registry for a specific version.
- Network
Registry - A network-backed registry that fetches metadata and tarballs over HTTPS.
- Registries
Section - The
[registries]section of anbock.projectfile. - Version
Meta Response - Response body for
GET /packages/{name}/{version}. - Versions
Response - Response body for
GET /packages/{name}.
Constants§
- AUTH_
TOKEN_ ENV - Environment variable that supplies a Bearer auth token for private registries.
Functions§
- default_
registry_ url - Resolve the effective default registry URL for a project.
- normalize_
checksum - Strip any
sha256:prefix and lowercase the remaining hex for storage. - parse_
registries - Parse just the
[registries]section out of anbock.projectTOML string. - sha256_
hex - Compute the hex-encoded SHA-256 digest of
data. - verify_
checksum - Verify a byte buffer against a SHA-256 checksum.