pub struct RuntimeRequestV1 {
pub protocol_version: String,
pub session_id: String,
pub request_id: String,
pub sequence: u64,
pub deadline_unix_ms: u64,
pub invocation: EngineInvocationV1,
pub input: String,
pub lease_b64: Option<String>,
}Expand description
One admitted invocation plus its exact bounded input projection. No Debug implementation: the projection may contain private user content.
Fields§
§protocol_version: String§session_id: String§request_id: String§sequence: u64Strictly increasing within the authenticated session; zero is reserved.
deadline_unix_ms: u64§invocation: EngineInvocationV1§input: String§lease_b64: Option<String>The Hive runtime lease (leanctx.hive.runtime-lease/v1, standard
base64), sent only to a package that declares lease support. Absent,
the request is byte-identical to one without leases.
Implementations§
Source§impl RuntimeRequestV1
impl RuntimeRequestV1
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate structure and input binding; this does not grant authorization.
Sourcepub fn validate_in(
&self,
profile: RuntimeExchangeProfile,
) -> Result<(), ValidationError>
pub fn validate_in( &self, profile: RuntimeExchangeProfile, ) -> Result<(), ValidationError>
Self::validate under a locally admitted profile.
Sourcepub fn validate_at(&self, now_unix_ms: u64) -> Result<(), ValidationError>
pub fn validate_at(&self, now_unix_ms: u64) -> Result<(), ValidationError>
Deterministically check time admission using the receiver’s clock. The transport also enforces a monotonic I/O deadline for the entire call.
Sourcepub fn validate_at_in(
&self,
now_unix_ms: u64,
profile: RuntimeExchangeProfile,
) -> Result<(), ValidationError>
pub fn validate_at_in( &self, now_unix_ms: u64, profile: RuntimeExchangeProfile, ) -> Result<(), ValidationError>
Self::validate_at under a locally admitted profile.
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn to_bytes(&self) -> Result<Vec<u8>, ValidationError>
Encode the exact stable representation used by response correlation.
Sourcepub fn to_bytes_in(
&self,
profile: RuntimeExchangeProfile,
) -> Result<Vec<u8>, ValidationError>
pub fn to_bytes_in( &self, profile: RuntimeExchangeProfile, ) -> Result<Vec<u8>, ValidationError>
Self::to_bytes under a locally admitted profile: the same bytes,
refused once they would pass that profile’s request ceiling.
Sourcepub fn from_bytes(
bytes: &[u8],
now_unix_ms: u64,
) -> Result<Self, ValidationError>
pub fn from_bytes( bytes: &[u8], now_unix_ms: u64, ) -> Result<Self, ValidationError>
Decode bounded JSON, rejecting unknown fields, duplicates and bad bindings. Equivalent JSON whitespace/key order is accepted after authentication of the exact received bytes; decoding is not transport authentication.
Sourcepub fn from_bytes_in(
bytes: &[u8],
now_unix_ms: u64,
profile: RuntimeExchangeProfile,
) -> Result<Self, ValidationError>
pub fn from_bytes_in( bytes: &[u8], now_unix_ms: u64, profile: RuntimeExchangeProfile, ) -> Result<Self, ValidationError>
Self::from_bytes under a locally admitted profile.
Sourcepub fn digest(&self) -> Result<Sha256Digest, ValidationError>
pub fn digest(&self) -> Result<Sha256Digest, ValidationError>
Bind all request fields, not merely a caller-provided invocation ID. This is a semantic correlation digest of stable re-encoding, not a MAC of the received representation. Transport authenticates bytes separately.
Sourcepub fn digest_in(
&self,
profile: RuntimeExchangeProfile,
) -> Result<Sha256Digest, ValidationError>
pub fn digest_in( &self, profile: RuntimeExchangeProfile, ) -> Result<Sha256Digest, ValidationError>
Self::digest under a locally admitted profile. The digest is of
the same bytes whatever the profile; the profile only bounds them.