gleamunison/pkg
Package installation: the registry’s read path.
install_from_store composes the three shipped pieces: manifest fetch (integrity re-hashed), the evidence turnstile (no passing test on the content hash, no install), and the versioned namespace (bindings land as a commit on the target branch — causal history included).
v1 scope: manifest deps are listed but not auto-installed — install them first, separately. Peer fetching is the CLI’s job (sync first, then install from the now-populated local store).
Values
pub fn install_from_store(
adapter: storage.StorageAdapter,
manifest_hex: String,
branch: String,
) -> Result(List(String), String)
Install a package from the local store onto a branch. Returns the admitted definition names. Refuses (Error naming the unevidenced defs) when the manifest requires evidence and any gated def lacks a passing Test attestation.
pub fn publish_to_store(
adapter: storage.StorageAdapter,
defs: List(#(String, String)),
name: String,
version: String,
) -> Result(String, List(String))
Publish #(name, hash) pairs as a manifest in the DAG. The turnstile runs first: any def without passing-test evidence refuses the whole publish (Error names them). Success stores the manifest and returns its hex — the shareable name of the package.