Skip to content

vox-mesh-types API Reference (generated)

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

Shared types for the Vox federated GPU mesh: worker registration, dispatch, and capability negotiation.

Pure-types L0 leaf for the populi/mesh subsystem (a2a envelopes, donation policy, federation, kudos).

ModuleDescription
a2a—
attestationSigned result attestation envelope (P5-T4).
attestation_manifestPublic attestation manifest + cache (P6-T2).
bundleA2A wire types for content-addressed bundle requests/responses (P2-T4).
donation_policy—
federation—
kudos—
model_inventoryMesh-wide model inventory snapshot (P5-T8).
model_registry—
op_fragmentSigned federation op-fragment envelope (P6-T1).
quorum—
redundancyRedundancy policy and voting helpers (P6-T4).
secret_sync—
task—
tee_attestationTEE attestation envelope (P6-T5).
trace—
Dependency Topology, diagram 113 nodes, 12 edges: vox-cli → vox-mesh-types; vox-cli-research → vox-mesh-types; vox-db → vox-mesh-types; vox-gamify → vox-mesh-types; vox-mesh-policy → vox-mesh-types; vox-mesh-transport → vox-mesh-types; vox-ml-cli → vox-mesh-types; vox-orchestrator → vox-mesh-types; vox-orchestrator-mcp → vox-me…vox-mesh-typesvox-clivox-cli-researchvox-dbvox-gamifyvox-mesh-policyvox-mesh-transportvox-ml-clivox-orchestratorvox-orchestrator-mcpvox-plugin-populi-meshvox-populivox-populi-types
Diagram source
graph {
direction: right
node vox_mesh_types: "vox-mesh-types"
node vox_cli: "vox-cli"
vox_cli -> vox_mesh_types
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_mesh_types
node vox_db: "vox-db"
vox_db -> vox_mesh_types
node vox_gamify: "vox-gamify"
vox_gamify -> vox_mesh_types
node vox_mesh_policy: "vox-mesh-policy"
vox_mesh_policy -> vox_mesh_types
node vox_mesh_transport: "vox-mesh-transport"
vox_mesh_transport -> vox_mesh_types
node vox_ml_cli: "vox-ml-cli"
vox_ml_cli -> vox_mesh_types
node vox_orchestrator: "vox-orchestrator"
vox_orchestrator -> vox_mesh_types
node vox_orchestrator_mcp: "vox-orchestrator-mcp"
vox_orchestrator_mcp -> vox_mesh_types
node vox_plugin_populi_mesh: "vox-plugin-populi-mesh"
vox_plugin_populi_mesh -> vox_mesh_types
node vox_populi: "vox-populi"
vox_populi -> vox_mesh_types
node vox_populi_types: "vox-populi-types"
vox_populi_types -> vox_mesh_types
}
Consumer CrateRole
vox-cliDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-dbDirect workspace dependent
vox-gamifyDirect workspace dependent
vox-mesh-policyDirect workspace dependent
vox-mesh-transportDirect workspace dependent
vox-ml-cliDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-plugin-populi-meshDirect workspace dependent
vox-populiDirect workspace dependent
vox-populi-typesDirect workspace dependent
vox-scaling-policyDirect workspace dependent
KindSymbolSignatureSourceDescription
structa2a::A2ADeliverRequestpub struct A2ADeliverRequestcrates/vox-mesh-types/src/a2a.rs#L7-L43Request to deliver an A2A message to a local agent.
structattestation::Attestationpub struct Attestationcrates/vox-mesh-types/src/attestation.rs#L8-L37Signed result attestation produced by a worker for each completed task. The worker signs a canonical JSON payload containing all fields except signature_b64 itself, using a per-job ephemeral Ed25519 key.
structattestation_manifest::SupportedTaskpub struct SupportedTaskcrates/vox-mesh-types/src/attestation_manifest.rs#L16-L25A task kind + capability declaration inside a manifest.
structattestation_manifest::PublicAttestationManifestpub struct PublicAttestationManifestcrates/vox-mesh-types/src/attestation_manifest.rs#L30-L47Signed public attestation manifest published by a node to announce its identity, capabilities, and trust relationships.
fnattestation_manifest::canonical_signing_bytespub fn canonical_signing_bytes(&self) -> serde_json::Result<Vec<u8>>crates/vox-mesh-types/src/attestation_manifest.rs#L51-L60Return the canonical bytes to sign (all fields, signature_b64 zeroed).
enumattestation_manifest::ManifestVerifyErrorpub enum ManifestVerifyErrorcrates/vox-mesh-types/src/attestation_manifest.rs#L87-L100Errors that can occur when verifying a PublicAttestationManifest.
structattestation_manifest::AttestationCachepub struct AttestationCachecrates/vox-mesh-types/src/attestation_manifest.rs#L109-L113In-memory cache of fetched and verified attestation manifests, keyed by node_id. Callers should re-fetch after the ttl_secs window.
fnattestation_manifest::with_ttlpub fn with_ttl(ttl_secs: u64) -> Selfcrates/vox-mesh-types/src/attestation_manifest.rs#L124-L129Create a new cache with the given TTL.
fnattestation_manifest::insertpub fn insert(&mut self, manifest: PublicAttestationManifest, now_unix_s: u64)crates/vox-mesh-types/src/attestation_manifest.rs#L132-L140Insert or replace a manifest for the given node_id.
fnattestation_manifest::getpub fn get(&self, node_id: &str, now_unix_s: u64) -> Option<&PublicAttestationManifest>crates/vox-mesh-types/src/attestation_manifest.rs#L143-L152Retrieve a non-expired manifest by node_id.
fnattestation_manifest::evict_stalepub fn evict_stale(&mut self, now_unix_s: u64)crates/vox-mesh-types/src/attestation_manifest.rs#L155-L161Evict all entries older than ttl_secs.
fnattestation_manifest::lenpub fn len(&self, now_unix_s: u64) -> usizecrates/vox-mesh-types/src/attestation_manifest.rs#L164-L172Return the number of live (non-expired) entries.
fnattestation_manifest::is_emptypub fn is_empty(&self, now_unix_s: u64) -> boolcrates/vox-mesh-types/src/attestation_manifest.rs#L175-L177Returns true when there are no live entries.
structbundle::BundleRequestpub struct BundleRequestcrates/vox-mesh-types/src/bundle.rs#L13-L18Sent worker → originator: “I received envelope idempotency_key and I don’t have the bundle for fn_hash_hex. Please send the bytes.”
structbundle::BundleResponsepub struct BundleResponsecrates/vox-mesh-types/src/bundle.rs#L22-L33Sent originator → worker: “Here are the bytes for fn_hash_hex.”
structdonation_policy::DonationSlotpub struct DonationSlotcrates/vox-mesh-types/src/donation_policy.rs#L5-L9—
structdonation_policy::WorkerDonationPolicypub struct WorkerDonationPolicycrates/vox-mesh-types/src/donation_policy.rs#L37-L79Default is derived deliberately. Every field added since the original shape carries #[serde(default)], but a struct literal must still name every field — so the Mn-T7 additions silently broke vox-ml-cli’s populi up initializer, and vox populi stopped compiling with no test covering it. Constructors should spread ..Default::default() so the next field is additive rather than breaking. The derived defaults are the conservative ones: accept nothing, advertise nothing. A node opts in explicitly. Why that matters, and why it is tested here rather than at the call site. This struct governs what a node donates to a public mesh. accepts_inference_workloads currently has no consumer at all — a2a.rs gates on public_mesh_opt_in, min_priority, slots and the user lists — so the day a planner starts honouring it, a true default would silently make every vox populi up node an inference donor. The obvious guard is to construct the struct explicitly at the call site, so a new field breaks the build and forces a decision. That guard is an illusion here: vox-ml-cli’s mod populi_lifecycle is #[cfg(feature = "populi")] and that crate’s default is ["mens-base"], so the call site is compiled by neither the default build nor the release builder. It is exactly why the Mn-T7 break sat unnoticed. vox-mesh-types has no [features] section, so the test below always compiles and always runs — which is what a consent-relevant invariant needs.
structfederation::MeshDirectoryEntrypub struct MeshDirectoryEntrycrates/vox-mesh-types/src/federation.rs#L5-L21—
fnfederation::canonical_bytespub fn canonical_bytes(&self) -> Vec<u8>crates/vox-mesh-types/src/federation.rs#L25-L30Returns the canonical JSON representation for signing.
enumkudos::RewardPrimitivepub enum RewardPrimitivecrates/vox-mesh-types/src/kudos.rs#L8-L21Primitives for the contribution reward system. Collapses compute donation and code contribution into one system.
fnkudos::as_strpub fn as_str(&self) -> &'static strcrates/vox-mesh-types/src/kudos.rs#L25-L34Return the human-readable slug for database storage.
fnkudos::gpu_compute_ms_from_attestationpub fn gpu_compute_ms_from_attestation(a: &Attestation) -> u64crates/vox-mesh-types/src/kudos.rs#L41-L43Convert an Attestation’s gpu_seconds into integer milliseconds for the GpuComputeMs kudos primitive. The conversion is (gpu_seconds * 1000.0) as u64, saturating at u64::MAX.
structkudos::CreditJobRequestpub struct CreditJobRequestcrates/vox-mesh-types/src/kudos.rs#L47-L54Request to credit a user for a contribution.
structmodel_inventory::ModelInventoryEntrypub struct ModelInventoryEntrycrates/vox-mesh-types/src/model_inventory.rs#L5-L14A single model available on a specific mesh node.
structmodel_inventory::MeshModelInventorypub struct MeshModelInventorycrates/vox-mesh-types/src/model_inventory.rs#L18-L23Mesh-wide snapshot of all advertised models across all visible nodes.
structmodel_registry::ModelAdvertisementpub struct ModelAdvertisementcrates/vox-mesh-types/src/model_registry.rs#L5-L11—
structop_fragment::OpFragmentEnvelopepub struct OpFragmentEnvelopecrates/vox-mesh-types/src/op_fragment.rs#L19-L34Signed envelope wrapping a single federation operation fragment. The object field carries the serialised payload; signature covers the canonical JSON of all fields except signature itself.
fnop_fragment::canonical_signing_bytespub fn canonical_signing_bytes(&self) -> Vec<u8>crates/vox-mesh-types/src/op_fragment.rs#L42-L55Return the canonical bytes to sign: everything except signature.signature_b64. The canonical form is the JSON of a copy of this envelope with signature.signature_b64 replaced by "", serialised with sorted keys via serde_json. This is deterministic across platforms and Rust versions.
enumop_fragment::OpFragmentKindpub enum OpFragmentKindcrates/vox-mesh-types/src/op_fragment.rs#L81-L95Discriminant for the op-fragment envelope type.
structop_fragment::FederationEnvelopepub struct FederationEnvelope<O>crates/vox-mesh-types/src/op_fragment.rs#L105-L120Generic signed federation envelope parameterised by the object type O. Use this when the object type is known at compile time.
enumop_fragment::FederationEnvelopeKindpub enum FederationEnvelopeKindcrates/vox-mesh-types/src/op_fragment.rs#L125-L137Discriminant for a [FederationEnvelope].
structop_fragment::FederationSignaturepub struct FederationSignaturecrates/vox-mesh-types/src/op_fragment.rs#L145-L155Ed25519 signature block embedded in federation envelopes.
fnop_fragment::placeholderpub fn placeholder(creator: impl Into<String>) -> Selfcrates/vox-mesh-types/src/op_fragment.rs#L159-L166Construct an unsigned placeholder (used for testing before signing).
enumquorum::ComparisonModepub enum ComparisonModecrates/vox-mesh-types/src/quorum.rs#L4-L8—
structquorum::QuorumPolicypub struct QuorumPolicycrates/vox-mesh-types/src/quorum.rs#L11-L14—
enumredundancy::TrustTierpub enum TrustTiercrates/vox-mesh-types/src/redundancy.rs#L19-L30Trust tier assigned to a peer node. Higher tiers mean more trust; the policy can skip redundant execution for sufficiently trusted peers.
enumredundancy::RedundancyModepub enum RedundancyModecrates/vox-mesh-types/src/redundancy.rs#L35-L44Redundancy dispatch mode.
structredundancy::RedundancyPolicypub struct RedundancyPolicycrates/vox-mesh-types/src/redundancy.rs#L52-L66Redundancy policy attached to a WorkerDonationPolicy or a task spec.
enumredundancy::VoteOutcomepub enum VoteOutcomecrates/vox-mesh-types/src/redundancy.rs#L86-L101Outcome of a majority vote over replica outputs.
fnredundancy::decide_replicaspub fn decide_replicas(policy: &RedundancyPolicy, peer_tier: TrustTier) -> u8crates/vox-mesh-types/src/redundancy.rs#L104-L111Decide how many replicas to dispatch given a policy and the peer’s trust tier.
fnredundancy::decide_replicas_with_seedpub fn decide_replicas_with_seed(crates/vox-mesh-types/src/redundancy.rs#L117Seeded variant for deterministic testing. _seed is reserved for future adaptive logic that randomises peer selection in the N-replica set to avoid correlated failures.
fnredundancy::vote_majoritypub fn vote_majority(outputs: &[(String, String)]) -> VoteOutcomecrates/vox-mesh-types/src/redundancy.rs#L129-L167Vote on a set of output BLAKE3 digests and return the outcome. outputs is a slice of (node_id, output_blake3_hex) pairs. The vote picks the most common hash; ties are reported as Split.
structsecret_sync::SecretsSyncEnvelopepub struct SecretsSyncEnvelopecrates/vox-mesh-types/src/secret_sync.rs#L8-L18Envelope for synchronizing secrets across the mesh. Encapsulates a sealed (encrypted) secret payload along with metadata required for routing and verification.
enumtask::TaskKindpub enum TaskKindcrates/vox-mesh-types/src/task.rs#L7-L15—
fntask::as_strpub fn as_str(&self) -> &'static strcrates/vox-mesh-types/src/task.rs#L25-L34Return the canonical snake_case string for this task kind.