Skip to main content

Crate waitprims_core

Crate waitprims_core 

Source
Expand description

Types, errors, validation, digest, and time helpers for waitprims.

This is the foundation crate. It has no async runtime and does not open sockets. Public JSON is exactly the six agent-wait/v0 message kinds: registration_set, live_wait_request, live_wait_outcome, poll_cycle_request, poll_cycle_outcome, poll_cycle_ack. Runtime-only types, including caller-owned delivery/activation evidence, must not serialize as that contract.

Pin: CAPABILITY at Crucible PINNED_CRUCIBLE_SHA. Resolve through vendored contract.json, then the relative entry_schema. Schema $id is not the contract-entry mechanism.

Contract admission is only validate_message / validate_raw_documents. serde_json::from_str on AgentWaitMessage is not admission. RFC3339 comparison pads and truncates fractions to six digits.

Re-exports§

pub use contract::bundled_entry_schema;
pub use contract::bundled_message_schema;
pub use contract::resolve_bundled;
pub use contract::resolve_from_dir;
pub use contract::ResolvedContract;
pub use contract::CAPABILITY;
pub use contract::PINNED_CRUCIBLE_SHA;
pub use digest::registration_digest;
pub use error::Error;
pub use error::NormativeReason;
pub use error::Result;
pub use error::ValidationError;
pub use receipts::attach_event_refs;
pub use receipts::ActivationEvidence;
pub use receipts::DeliveryEvidence;
pub use refs::ActorRef;
pub use refs::CapabilityToken;
pub use refs::IdToken;
pub use refs::OpaqueRef;
pub use refs::PredicateRef;
pub use rfc3339::Timestamp;
pub use types::AgentWaitMessage;
pub use types::Anchor;
pub use types::AnchorKind;
pub use types::ArmStatus;
pub use types::AuthnMode;
pub use types::BaselinePolicy;
pub use types::Canonicalization;
pub use types::ContentDigest;
pub use types::CoverageArm;
pub use types::DigestAlgorithm;
pub use types::JcsDigest;
pub use types::LiveWaitOutcome;
pub use types::LiveWaitRequest;
pub use types::MessageType;
pub use types::OutcomeKind;
pub use types::PayloadRef;
pub use types::PollBound;
pub use types::PollCycleAck;
pub use types::PollCycleOutcome;
pub use types::PollCycleRequest;
pub use types::Registration;
pub use types::RegistrationSet;
pub use types::ReplayStatus;
pub use types::WaitBound;
pub use types::WaitEvent;
pub use validate::validate_message;
pub use validate::validate_raw_documents;
pub use validate::AdmittedMessage;

Modules§

contract
Resolve contract: agent-wait/v0 through the vendored pin.
digest
SHA-256 helpers for registration digests.
error
Shared error type for waitprims-core.
jcs
RFC 8785 JSON Canonicalization Scheme (JCS).
receipts
Caller-owned delivery and activation evidence.
refs
Identifier and reference newtypes.
rfc3339
Fail-closed RFC3339 profile used by contract: agent-wait/v0.
types
Public JSON types for the six agent-wait/v0 message kinds.
validate
Structural, normative, and set validation for contract: agent-wait/v0.