#[repr(C)]pub struct AgiContainerHeader {
pub magic: u32,
pub version: u16,
pub flags: u16,
pub container_id: [u8; 16],
pub build_id: [u8; 16],
pub created_ns: u64,
pub model_id_hash: [u8; 8],
pub policy_hash: [u8; 8],
}Expand description
Wire-format AGI container header (exactly 64 bytes, repr(C)).
Offset Type Field
0x00 u32 magic (0x52564147 "RVAG")
0x04 u16 version
0x06 u16 flags
0x08 [u8; 16] container_id (UUID)
0x18 [u8; 16] build_id (UUID)
0x28 u64 created_ns (UNIX epoch nanoseconds)
0x30 [u8; 8] model_id_hash (SHA-256 truncated)
0x38 [u8; 8] policy_hash (SHA-256 truncated)Fields§
§magic: u32Magic bytes: AGI_MAGIC.
version: u16Format version (currently 1).
flags: u16Bitfield flags indicating which segments are present.
container_id: [u8; 16]Unique container identifier (UUID).
build_id: [u8; 16]Build identifier (UUID, changes on each repackaging).
created_ns: u64Creation timestamp (nanoseconds since UNIX epoch).
model_id_hash: [u8; 8]SHA-256 of the pinned model identifier, truncated to 8 bytes.
policy_hash: [u8; 8]SHA-256 of the governance policy, truncated to 8 bytes.
Implementations§
Source§impl AgiContainerHeader
impl AgiContainerHeader
Sourcepub const fn is_valid_magic(&self) -> bool
pub const fn is_valid_magic(&self) -> bool
Check magic bytes.
Sourcepub const fn has_kernel(&self) -> bool
pub const fn has_kernel(&self) -> bool
Check if the container has a micro Linux kernel.
Sourcepub const fn has_orchestrator(&self) -> bool
pub const fn has_orchestrator(&self) -> bool
Check if the container has an orchestrator config.
Sourcepub const fn is_replay_capable(&self) -> bool
pub const fn is_replay_capable(&self) -> bool
Check if the container supports replay mode.
Sourcepub const fn is_offline_capable(&self) -> bool
pub const fn is_offline_capable(&self) -> bool
Check if the container can run offline.
Sourcepub const fn has_world_model(&self) -> bool
pub const fn has_world_model(&self) -> bool
Check if the container has a world model (VEC + INDEX segments).
Sourcepub const fn has_coherence_gates(&self) -> bool
pub const fn has_coherence_gates(&self) -> bool
Check if the container has coherence gate configuration.
Sourcepub const fn has_domain_expansion(&self) -> bool
pub const fn has_domain_expansion(&self) -> bool
Check if the container has domain expansion data.
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self, RvfError>
pub fn from_bytes(data: &[u8]) -> Result<Self, RvfError>
Deserialize header from a byte slice (>= 64 bytes).
Trait Implementations§
Source§impl Clone for AgiContainerHeader
impl Clone for AgiContainerHeader
Source§fn clone(&self) -> AgiContainerHeader
fn clone(&self) -> AgiContainerHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more