loom-hub · entry
Source declarations, signatures and documentation for entry.
Source: sigil/weave/tools/loom-hub/src/entry.rs. SHA-256: 69db2ac127bc1265fe6c168af77cb96b9512f5b220664d82884642cc0db189bb.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
entry::RepositoryVisibility
Explicit repository visibility carried inside signed registry and share records. The field is intentionally non-defaulting at the policy layer: legacy records that omit it are never inferred to be public.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum RepositoryVisibility {
/// Public repository whose discovery metadata may be enumerated.
Public,
/// Private repository whose recipient-scoped bundle is exchanged directly.
Private,
}Source line: 15.
entry::RegistryEntry
A registered repository — what loom search and loom-web consume.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RegistryEntry {
/// Schema version; bump when backwards-incompatible fields change.
pub version: u32,
/// Explicit signed visibility. `None` represents an untrusted legacy entry
/// and is never accepted by public registry read or write surfaces.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub visibility: Option<RepositoryVisibility>,
/// Repo name component, e.g. `agent-fabric`. Combined with the owner
/// DID this is `<owner>/<name>`.
pub name: String,
/// Optional one-line description, plain text.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Default branch for the registered HEAD ref (mirrors the bundle).
pub default_branch: String,
/// The seven resource pubkeys needed by `loom clone --pubkeys`.
pub bundle: ShareBundle,
/// UNIX millis when the entry was first published.
pub registered_ms: u64,
/// UNIX millis when the entry was last refreshed (e.g. on commit).
pub updated_ms: u64,
/// Local-machine path to the repo's workdir (the directory containing
/// `.loom/`). Recorded at register-time so the gateway can route
/// per-repo `/api/v1/repos/:name/...` requests to the correct
/// per-repo `WeaveNode`.
///
/// Optional + default-empty so on-disk entries written before this
/// field existed continue to deserialize cleanly. Local-machine-
/// only; v2 cross-machine registry replication will move this to a
/// per-machine cache instead of inlining it here.
#[serde(default, skip_serializing_if = "String::is_empty")]
pub workdir: String
}Source line: 24.
entry::ShareBundle
Public bundle published by a source so a fresh receiver can call
WeaveNode::open_remote_* on each resource. This is the same shape
the loom CLI emits via loom identity share.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShareBundle {
/// Bundle schema version.
pub version: u32,
/// Explicit signed visibility. Readers fail closed when this is absent or
/// inconsistent with the attached private access material.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub visibility: Option<RepositoryVisibility>,
/// Owner agent DID (e.g. `did:oas:l1fe:agent:...`).
pub agent_did: String,
/// Per-resource source pubkeys.
pub resources: ShareResources,
/// Repo-stable id (BLAKE3 prefix of agent pubkey).
pub repo_id: String,
/// Default branch name on the source.
pub default_branch: String,
/// Optional private-repo access material for a specific authorized
/// recipient. Public repos and generic registry entries omit this field.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub access: Option<ShareAccess>
}Source line: 62.
entry::ShareAccess
Recipient-scoped private access material attached to a share bundle.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShareAccess {
/// Access bundle schema version.
pub version: u32,
/// Private discovery handle; this is a blinded handle, not the repo id.
pub private_discovery_handle: String,
/// Serialized Loom access manifest.
pub manifest: serde_json::Value,
/// Wrapped repository-key epochs for the intended recipient. A recovery
/// or delayed peer can receive every epoch it is entitled to without a
/// central key service.
#[serde(default)]
pub wrapped_keys: Vec<serde_json::Value>,
/// Legacy single-epoch envelope. Readers accept this only when
/// `wrapped_keys` is empty.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub wrapped_key: Option<serde_json::Value>,
/// DID of the active repository admin who authenticated this exact bundle.
#[serde(default)]
pub key_bundle_signer_did: String,
/// Authentication public key of the bundle signer (32-byte hex).
#[serde(default)]
pub key_bundle_signer_auth_key: String,
/// Ed25519 signature over the full share bundle with this field empty.
#[serde(default)]
pub key_bundle_signature: String
}Source line: 85.
entry::ShareResources
Per-resource hex-encoded Ed25519 32-byte pubkeys.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShareResources {
/// Commits strand writer pubkey (hex).
pub commits_strand: String,
/// Actual commits strand name. Private repos use a blinded per-member
/// strand rather than the legacy canonical `loom.commits` strand.
#[serde(default)]
pub commits_strand_name: Option<String>,
/// Refs Lens writer pubkey for public repositories. Private bundles omit
/// this resource because refs are local projections derived from encrypted
/// commit strands.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub refs_lens: Option<String>,
/// Index Lens writer pubkey for public repositories. Private indexes are
/// local workspace state and are never replication resources.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub index_lens: Option<String>,
/// Public-repository Locus keys. Private commit strands carry encrypted
/// sparse blob payloads and therefore omit the Locus from replication.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub blobs_locus: Option<BlobsLocusKeys>
}Source line: 114.
entry::BlobsLocusKeys
The three underlying-strand pubkeys for a Locus drive.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct BlobsLocusKeys {
/// Metadata Lens strand pubkey (hex).
pub meta: String,
/// Blob metadata strand pubkey (hex).
pub blob_meta: String,
/// Blob data strand pubkey (hex).
pub blob_data: String
}Source line: 138.