pub struct ApprovalsBundle {
pub grants: Vec<(String, Vec<u8>)>,
pub uses: Vec<ApprovalUse>,
pub checkpoints: Vec<JournalCheckpoint>,
pub revocations: Vec<ApprovalRevocation>,
}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.
Trait Implementations§
Source§impl Clone for ApprovalsBundle
impl Clone for ApprovalsBundle
Source§fn clone(&self) -> ApprovalsBundle
fn clone(&self) -> ApprovalsBundle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more