sua-registry is the static metadata catalog for the Software Use ecosystem. It
describes immutable package releases and their capability relationships; it does
not download, install, load, execute, or serve package code.
The project contains:
- the
sua-registryRust library for strict JSON parsing, validation, and deterministic directory loading; - the narrowly scoped
sua-registry-checkbinary for offline catalog checks; - clearly synthetic catalog examples under
examples/catalog.
| Component | Owns | Does not own |
|---|---|---|
sua-sdk |
Capability IDs and stable provider-facing contracts | Package discovery or execution policy |
sua-registry |
Versioned package metadata, artifact integrity declarations, and deterministic catalog loading | Network access, package code, installation, trust policy, dependency resolution, or execution |
sua-runtime |
Runtime policy, capability-version matching, provider lifecycle, and execution | The SDK's public capability contract or registry publication |
Registry entries reference sua_sdk::CapabilityId directly. The registry does
not maintain a competing capability namespace.
A valid entry is a structurally valid publisher assertion, not an endorsement. Consumers must establish authenticity before acting on it:
- obtain the catalog through a signed release or signed source revision and verify that signature against an independently trusted catalog key;
- apply publisher allowlists, revocation, runtime compatibility, and platform policy in the runtime;
- download an artifact only through an explicitly authorized component;
- recompute SHA-256 over the exact downloaded bytes and compare it to the lowercase digest in the entry;
- verify any publisher artifact signature required by runtime policy before installation or execution.
HTTPS is required for repository and artifact locations, but HTTPS alone is not
publisher authentication. sua-registry-check intentionally performs no
network calls and cannot prove that an artifact, publisher, or license claim is
trustworthy.
Pass Catalog::load_directory or sua-registry-check an authenticated catalog
tree that remains immutable for the entire load. Directory discovery, metadata
inspection, and file reads are separate operations. If another process can
rename, replace, or modify entries while loading, the result is not a trusted
snapshot.
JSON symlink rejection keeps source paths explicit and catches common catalog misconfiguration. It is not a sandbox for a hostile writable directory and does not eliminate time-of-check/time-of-use (TOCTOU) races. First materialize the catalog in an isolated location where no concurrent writer can mutate it, then validate that snapshot. See SECURITY.md for the full input and diagnostic-disclosure contract.
Each lowercase .json file below a catalog directory contains exactly one
package release. Unknown fields are rejected. The current schema_version is
1.
Identifiers use 1–64 lowercase ASCII letters, digits, and single hyphens. They
start with a letter and end with a letter or digit. package_id is globally
unique in a catalog; consequently, the pair (package_id, version) identifies
one immutable release even if two files name different publishers.
Required fields are:
package_idandpublisher_id;kind:provider,skill,profile, oradapter;- semantic
versionandruntime_requirement; - absolute, credential-free HTTPS
repository_urlandartifact_urlwithout query strings or fragments; - an exact 64-character lowercase hexadecimal
sha256; - a trimmed, bounded license assertion (SPDX expressions are recommended);
- one or more bounded
platforms; provided_capabilitiesas SDK-owned capability IDs paired with exact semantic contract versions;required_capabilitiesas capability/version-requirement pairs.
Within an entry, repeated platforms, repeated provided (capability_id, version) pairs, and repeated required capability IDs are rejected. One package
may provide multiple versions of the same capability contract. The any
platform cannot be mixed with a platform-specific selector. See
the example catalog for complete synthetic entries.
Untrusted input is bounded before it can grow memory or recursion without limit: one load inspects at most 50,000 filesystem items, accepts at most 10,000 JSON files totaling 64 MiB, descends at most 16 directories below its root, reads at most 1 MiB per JSON entry, and accepts at most 256 provided and 256 required capabilities per entry. JSON symlinks are rejected.
Use the repository's pinned Rust toolchain through vx:
vx cargo run --locked --bin sua-registry-check -- examples/catalog
vx cargo run --locked --bin sua-registry-check -- --json examples/catalogExit codes are stable: 0 for a valid catalog, 1 for a loading or validation
failure, and 64 for command-line misuse. JSON output has its own
schema_version and is one object on standard output.
Local quality gates:
vx cargo fmt --all -- --check
vx cargo check --locked --all-targets
vx cargo test --locked --all-targets
vx cargo clippy --locked --all-targets -- -D warningsThe trust and ownership decision is recorded in ADR 0001.
MIT