Skip to main content

ApprovalsBundle

Struct ApprovalsBundle 

Source
pub struct ApprovalsBundle {
    pub grants: Vec<(String, Vec<u8>)>,
    pub uses: Vec<ApprovalUse>,
    pub checkpoints: Vec<JournalCheckpoint>,
    pub revocations: Vec<ApprovalRevocation>,
    pub action_envelopes: Vec<(String, Vec<u8>)>,
    pub sealed_envelopes: Vec<(String, Vec<u8>)>,
    pub signer_keys: Vec<(String, String)>,
}
Expand description

Optional approval evidence to embed in the package alongside the receipt + artifacts. None means “no approvals consumed during this session, or none worth exporting.” Empty vectors mean “we looked and found nothing”; the resulting package omits the approvals/ dir entirely so absence is unambiguous.

Ownership of the evidence stays with the caller: session::close gathers the grant envelopes from the chain, the uses from the local journal, and any covering checkpoints, then hands them off here.

Fields§

§grants: Vec<(String, Vec<u8>)>

Bytes of the signed ApprovalStatement envelopes that authorized any consumed uses. Each entry is (grant_id, raw_envelope_json). Stored verbatim so the package’s verifier can re-check the signature without re-serializing.

§uses: Vec<ApprovalUse>

ApprovalUse records pulled from the local journal at close time. action_artifact_id should be backfilled before passing to build_package (see commands/session.rs).

§checkpoints: Vec<JournalCheckpoint>

JournalCheckpoints that cover the included uses. Optional; may be empty even when uses are present (PR 6 fills these in).

§revocations: Vec<ApprovalRevocation>

Explicit revocations we wanted to surface (e.g. a use whose grant was revoked after consumption – the package should still show the consumed evidence and the revocation alongside). Empty in PR 4; reserved.

§action_envelopes: Vec<(String, Vec<u8>)>

Bytes of each action artifact’s signed envelope that consumed an approval. Each entry is (action_artifact_id, raw_envelope_json). v0.9.10 PR A: shipped to close the action↔use binding gap. The verifier extracts meta.approval_use_id from each envelope and cross-checks it against the package’s use records. Empty in pre-v0.9.10 packages; readers must treat absence as “binding not asserted by package” rather than “binding present and OK.”

§sealed_envelopes: Vec<(String, Vec<u8>)>

Every sealed artifact’s signed envelope, (artifact_id, raw_envelope_json), so the package verifies its own signatures instead of asking the reader to trust the sealed set (audit 2026-09, AUD-31). Written to artifacts/<id>.json, the same directory the consuming actions above already use. Empty in pre-0.31.2 packages.

§signer_keys: Vec<(String, String)>

The public half of every key that signed a sealed envelope, (key_id, "ed25519:<base64url>"), written to keys.json. A verifier checks each signature against the key the package names, then separately reports whether that key is one it has pinned.

Trait Implementations§

Source§

impl Clone for ApprovalsBundle

Source§

fn clone(&self) -> ApprovalsBundle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApprovalsBundle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ApprovalsBundle

Source§

fn default() -> ApprovalsBundle

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V