waitprims-core 0.1.3

Core types, errors, and contract helpers for waitprims
Documentation
//! 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.

pub mod contract;
pub mod digest;
pub mod error;
pub mod jcs;
pub mod receipts;
pub mod refs;
pub mod rfc3339;
pub mod types;
pub mod validate;

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