Skip to content

vox-package API Reference (generated)

Crate: vox-package · Version: 0.6.0 · Target: Library (lib.rs)

Vox package manager: Vox.toml manifests, vox.lock, content-addressed artifact cache, registry client, dependency resolver.

Package and schema management for Vox projects (hashing, namespaces, normalized paths, storage).

The CodeStore API (Arca internal storage) is backed by Turso (libSQL-compatible). Application code should use vox_db::Codex / VoxDb as the public facade (see ADR 004).

FeatureDefault / Enables
defaultlocal
localvox-db/local
replicationvox-db/replication
DependencyKind
vox-configNormal
vox-dbNormal
vox-db-typesNormal
vox-http-clientNormal
vox-package-typesNormal
ModuleDescription
artifact_cacheContent-addressed artifact cache (.vox-cache).
bundleContent-addressed bundle store for compiled workflow / activity functions (P2-T1).
model_bundleSafeTensors model bundle metadata + aggregate CAS hash (Mn-T3).
registryHTTP client for the package registry API.
workspaceMulti-package workspace discovery from Vox.toml / members.
Dependency Topology, diagram 113 nodes, 12 edges: vox-package → vox-config; vox-package → vox-db; vox-package → vox-db-types; vox-package → vox-http-client; vox-package → vox-package-types; vox-audit → vox-package; vox-cli → vox-package; vox-cli-research → vox-package; vox-orchestrator → vox-package; vox-orchestrator-mcp → vox-…vox-packagevox-configvox-dbvox-db-typesvox-http-clientvox-package-typesvox-auditvox-clivox-cli-researchvox-orchestratorvox-orchestrator-mcpvox-populivox-skills
Diagram source
graph {
direction: right
node vox_package: "vox-package"
node vox_config: "vox-config"
vox_package -> vox_config
node vox_db: "vox-db"
vox_package -> vox_db
node vox_db_types: "vox-db-types"
vox_package -> vox_db_types
node vox_http_client: "vox-http-client"
vox_package -> vox_http_client
node vox_package_types: "vox-package-types"
vox_package -> vox_package_types
node vox_audit: "vox-audit"
vox_audit -> vox_package
node vox_cli: "vox-cli"
vox_cli -> vox_package
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_package
node vox_orchestrator: "vox-orchestrator"
vox_orchestrator -> vox_package
node vox_orchestrator_mcp: "vox-orchestrator-mcp"
vox_orchestrator_mcp -> vox_package
node vox_populi: "vox-populi"
vox_populi -> vox_package
node vox_skills: "vox-skills"
vox_skills -> vox_package
}
Consumer CrateRole
vox-auditDirect workspace dependent
vox-cliDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-populiDirect workspace dependent
vox-skillsDirect workspace dependent
KindSymbolSignatureSourceDescription
structartifact_cache::ArtifactCachepub struct ArtifactCachecrates/vox-package/src/artifact_cache.rs#L30-L33A content-addressed cache for Vox build artifacts. Uses SHA3-512 over all build inputs as the cache key. Artifacts are stored under .vox-cache/artifacts/<hash>/.
structartifact_cache::CacheManifestpub struct CacheManifestcrates/vox-package/src/artifact_cache.rs#L37-L46Metadata recorded alongside a cached artifact.
enumartifact_cache::CacheLookuppub enum CacheLookupcrates/vox-package/src/artifact_cache.rs#L49-L57Outcome of a cache lookup.
fnartifact_cache::newpub fn new(root: PathBuf) -> io::Result<Self>crates/vox-package/src/artifact_cache.rs#L63-L67Create (or open) a cache rooted at root. Typically root is <project-root>/.vox-cache.
fnartifact_cache::default_forpub fn default_for(project_root: &Path) -> io::Result<Self>crates/vox-package/src/artifact_cache.rs#L70-L72Open the default project-local cache at <project_root>/.vox-cache.
fnartifact_cache::compute_input_hashpub fn compute_input_hash(crates/vox-package/src/artifact_cache.rs#L81Compute a cache key from a set of input paths. Reads every file listed in input_paths, appends their contents together with their relative path as a separator, then returns the SHA3-512 hash. Includes extra_inputs (e.g. serialized config strings) to capture non-file inputs such as CLI flags or dependency versions.
fnartifact_cache::lookuppub fn lookup(&self, input_hash: &str) -> CacheLookupcrates/vox-package/src/artifact_cache.rs#L110-L132Look up whether artifacts exist for the given input hash.
fnartifact_cache::record_buildpub fn record_build(crates/vox-package/src/artifact_cache.rs#L137Record a completed build, copying output_files into the artifact directory. output_files is a list of (source_path, filename_in_cache) pairs.
fnartifact_cache::prunepub fn prune(&self, max_age_secs: u64) -> io::Result<usize>crates/vox-package/src/artifact_cache.rs#L170-L211Delete all cached artifacts older than max_age_secs seconds.
fnartifact_cache::manifest_pathpub fn manifest_path(&self, input_hash: &str) -> PathBufcrates/vox-package/src/artifact_cache.rs#L214-L218Path to the manifest JSON file for a given input hash.
fnartifact_cache::artifact_dirpub fn artifact_dir(&self, input_hash: &str) -> PathBufcrates/vox-package/src/artifact_cache.rs#L221-L224Path to the artifact directory for a given input hash.
typebundle::ContentBytespub type ContentBytes = Arc<Vec<u8>>crates/vox-package/src/bundle.rs#L18Raw bytes of a compiled bundle. Arc<Vec<u8>> because clones cross async tasks (mesh dispatch) and we don’t want to allocate per-clone.
structbundle::BundleRefpub struct BundleRefcrates/vox-package/src/bundle.rs#L25-L29Stable content-address of a workflow / activity bundle. This is the SHA3-512 over the input set: source bytes, vox version, transitive dep hashes. Computed by the HIR lowering pass (P2-T1d).
fnbundle::to_hexpub fn to_hex(&self) -> Stringcrates/vox-package/src/bundle.rs#L33-L39Hex-encode the 64-byte digest. Used for filesystem keys.
structbundle::Bundlepub struct Bundlecrates/vox-package/src/bundle.rs#L45-L58A content-addressed bundle: hash, transitive dep hashes, compiled bytes, and a free-form manifest the runtime uses to dispatch.
fnbundle::serializepub fn serialize<S: Serializer>(bytes: &[u8; 64], s: S) -> Result<S::Ok, S::Error>crates/vox-package/src/bundle.rs#L63-L69—
fnbundle::deserializepub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<[u8; 64], D::Error>crates/vox-package/src/bundle.rs#L71-L84—
structbundle::BundleStorepub struct BundleStorecrates/vox-package/src/bundle.rs#L93-L95A bundle store rooted at a directory. Layout under root: - bundles/<first-64-hex-chars>/bundle.bin — compiled bytes - bundles/<first-64-hex-chars>/manifest.json — JSON manifest - bundles/<first-64-hex-chars>/deps.json — serialised Vec<BundleRef>
fnbundle::openpub fn open(root: PathBuf) -> io::Result<Self>crates/vox-package/src/bundle.rs#L99-L102Open (or create) a bundle store under root.
fnbundle::lookuppub fn lookup(&self, r: &BundleRef) -> io::Result<Option<Bundle>>crates/vox-package/src/bundle.rs#L112-L134Look up a bundle by reference. Ok(None) for cache miss; Err for IO.
fnbundle::putpub fn put(&self, bundle: &Bundle) -> io::Result<BundleRef>crates/vox-package/src/bundle.rs#L137-L149Store a bundle by its self-asserted hash. Idempotent.
traitbundle::Sealedpub trait Sealedcrates/vox-package/src/bundle.rs#L153—
traitbundle::BundleMetapub trait BundleMeta: sealed::Sealedcrates/vox-package/src/bundle.rs#L160-L163Sealed trait for content-addressed bundle metadata. Downstream crates may read hash and kind but cannot introduce new implementations.
typemodel_bundle::Sha3_512pub type Sha3_512 = [u8; 64]crates/vox-package/src/model_bundle.rs#L11Raw SHA3-512 digest (64 bytes), hex-serialised for JSON.
fnmodel_bundle::serializepub fn serialize<S: Serializer>(bytes: &Sha3_512, s: S) -> Result<S::Ok, S::Error>crates/vox-package/src/model_bundle.rs#L18-L24—
fnmodel_bundle::deserializepub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Sha3_512, D::Error>crates/vox-package/src/model_bundle.rs#L26-L29—
fnmodel_bundle::serializepub fn serialize<S: Serializer>(v: &Option<Vec<Sha3_512>>, s: S) -> Result<S::Ok, S::Error>crates/vox-package/src/model_bundle.rs#L50-L61—
fnmodel_bundle::deserializepub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Option<Vec<Sha3_512>>, D::Error>crates/vox-package/src/model_bundle.rs#L63-L77—
enummodel_bundle::WeightFormatpub enum WeightFormatcrates/vox-package/src/model_bundle.rs#L83-L89On-disk SafeTensors layout for this bundle.
structmodel_bundle::BundleProvenancepub struct BundleProvenancecrates/vox-package/src/model_bundle.rs#L93-L97Human / registry-facing provenance — not trusted for integrity (hashes are).
structmodel_bundle::ModelBundlepub struct ModelBundlecrates/vox-package/src/model_bundle.rs#L101-L119Immutable description of a SafeTensors model suitable for mesh CAS routing.
fnmodel_bundle::compute_model_bundle_content_hashpub fn compute_model_bundle_content_hash(bundle: &ModelBundle) -> Sha3_512crates/vox-package/src/model_bundle.rs#L123-L147Deterministic SHA3-512 over semantic bundle fields excluding bundle_hash.
fnmodel_bundle::verify_bundle_hashpub fn verify_bundle_hash(&self) -> boolcrates/vox-package/src/model_bundle.rs#L152-L154Returns true when bundle_hash matches the semantic digest.
structregistry::RegistryClientpub struct RegistryClientcrates/vox-package/src/registry.rs#L5-L9Client for the VoxPM package registry. Handles search, download, publish, and info operations.
structregistry::RegistryPackageInfopub struct RegistryPackageInfocrates/vox-package/src/registry.rs#L12-L21—
structregistry::SearchResultpub struct SearchResultcrates/vox-package/src/registry.rs#L24-L27—
structregistry::PublishRequestpub struct PublishRequestcrates/vox-package/src/registry.rs#L30-L39—
structregistry::PublishDependencypub struct PublishDependencycrates/vox-package/src/registry.rs#L42-L45—
structregistry::DownloadResponsepub struct DownloadResponsecrates/vox-package/src/registry.rs#L48-L51—
enumregistry::PmRegistryErrorpub enum PmRegistryErrorcrates/vox-package/src/registry.rs#L54-L64—
fnregistry::newpub fn new(base_url: &str) -> Selfcrates/vox-package/src/registry.rs#L89-L95Create a new registry client.
fnregistry::with_authpub fn with_auth(base_url: &str, token: &str) -> Selfcrates/vox-package/src/registry.rs#L98-L104Create a client with authentication.
fnregistry::set_tokenpub fn set_token(&mut self, token: &str)crates/vox-package/src/registry.rs#L107-L109Set or update the auth token.
fnregistry::searchpub async fn search(crates/vox-package/src/registry.rs#L129Search the registry for packages matching a query.
fnregistry::infopub async fn info(&self, name: &str) -> Result<RegistryPackageInfo, PmRegistryError>crates/vox-package/src/registry.rs#L156-L169Get info about a specific package.