Skip to main content

EventEnvelope

Struct EventEnvelope 

Source
pub struct EventEnvelope {
Show 34 fields pub schema_version: u16, pub event_id: EventId, pub event_seq: u64, pub event_family: EventFamily, pub event_kind: EventKind, pub payload_schema_version: u16, pub timestamp: String, pub recorded_at: String, pub run_id: RunId, pub agent_id: AgentId, pub turn_id: Option<TurnId>, pub attempt_id: Option<AttemptId>, pub message_id: Option<MessageId>, pub context_item_id: Option<ContextItemId>, pub trace_id: TraceId, pub span_id: SpanId, pub parent_event_id: Option<EventId>, pub caused_by: Option<CausalRef>, pub subject_ref: EntityRef, pub related_refs: Vec<EntityRef>, pub causal_refs: Vec<CausalRef>, pub correlation: EventCorrelation, pub tags: Vec<EventTag>, pub source: SourceRef, pub destination: Option<DestinationRef>, pub policy_refs: Vec<PolicyRef>, pub journal_cursor: Option<JournalCursor>, pub state_before: Option<String>, pub state_after: Option<String>, pub delivery_semantics: EventDeliverySemantics, pub privacy: PrivacyClass, pub content_capture: ContentCaptureMode, pub redaction_policy_id: String, pub runtime_package_fingerprint: String,
}
Expand description

Carries the event envelope record payload for journal, event, or fixture surfaces. Creating or cloning it only preserves serialized SDK state; append, publish, replay, or export effects are documented on the runtime and port methods that store it.

Fields§

§schema_version: u16

Wire schema version used for compatibility checks.

§event_id: EventId

Event identifier used to correlate live events with journal or replay evidence.

§event_seq: u64

Event seq used by this record or request.

§event_family: EventFamily

Event family used by this record or request.

§event_kind: EventKind

Kind discriminator for event kind. Use it to route finite match arms without parsing display text.

§payload_schema_version: u16

Wire schema version for this record shape. Use it for compatibility checks before deserializing or replaying stored data.

§timestamp: String

Timestamp in milliseconds associated with this record. Use it for ordering and diagnostics; durable causality still comes from ids and cursors.

§recorded_at: String

Recorded at used by this record or request.

§run_id: RunId

Run identifier used for lineage, filtering, replay, and dedupe.

§agent_id: AgentId

Agent identifier used for lineage, filtering, and ownership checks.

§turn_id: Option<TurnId>

Turn identifier for one loop turn within a run.

§attempt_id: Option<AttemptId>

Attempt identifier for retry, repair, provider, or tool execution evidence.

§message_id: Option<MessageId>

Message identifier for transcript, projection, or provider-response lineage.

§context_item_id: Option<ContextItemId>

Stable context item id used for typed lineage, lookup, or dedupe.

§trace_id: TraceId

Stable trace id used for typed lineage, lookup, or dedupe.

§span_id: SpanId

Stable span id used for typed lineage, lookup, or dedupe.

§parent_event_id: Option<EventId>

Stable parent event id used for typed lineage, lookup, or dedupe.

§caused_by: Option<CausalRef>

Optional caused by value. When absent, callers should use the documented default or skip that optional behavior.

§subject_ref: EntityRef

Typed subject ref reference. Resolving or executing it is a separate policy-gated step.

§related_refs: Vec<EntityRef>

Typed related refs references. Resolving them is separate from constructing this record.

§causal_refs: Vec<CausalRef>

Typed causal refs references. Resolving them is separate from constructing this record.

§correlation: EventCorrelation

Correlation used by this record or request.

§tags: Vec<EventTag>

Tag selector for event filtering. Any leaves tags unconstrained; Include restricts matches to listed event tags.

§source: SourceRef

Source label or ref for this item; it is metadata and does not fetch content by itself.

§destination: Option<DestinationRef>

Destination label or ref for this item; it is metadata and does not deliver content by itself.

§policy_refs: Vec<PolicyRef>

Policy references that govern admission, projection, execution, or delivery.

§journal_cursor: Option<JournalCursor>

Cursor identifying a replay, export, or subscription position. Use it to resume without widening the original scope.

§state_before: Option<String>

Optional state before value. When absent, callers should use the documented default or skip that optional behavior.

§state_after: Option<String>

Optional state after value. When absent, callers should use the documented default or skip that optional behavior.

§delivery_semantics: EventDeliverySemantics

Delivery-semantic selector for event filtering. Any leaves delivery semantics unconstrained; Include restricts matches to listed semantics.

§privacy: PrivacyClass

Privacy class used for projection, telemetry, and raw-content access decisions.

§content_capture: ContentCaptureMode

Content capture used by this record or request.

§redaction_policy_id: String

Stable redaction policy id used for typed lineage, lookup, or dedupe.

§runtime_package_fingerprint: String

Fingerprint of the runtime package snapshot in force when this value was produced. Use it for replay, dedupe, and package-lineage checks; the field is evidence and does not execute package behavior.

Implementations§

Source§

impl EventEnvelope

Source

pub fn cursor(&self, scope: EventStreamScope) -> EventCursor

Builds the cursor value. This is data construction and performs no I/O, journal append, event publication, or process work.

Source

pub fn redacted_summary(&self) -> String

Builds the redacted summary value. This is data construction and performs no I/O, journal append, event publication, or process work.

Trait Implementations§

Source§

impl Clone for EventEnvelope

Source§

fn clone(&self) -> EventEnvelope

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 EventEnvelope

Source§

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

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

impl<'de> Deserialize<'de> for EventEnvelope

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EventEnvelope

Source§

fn eq(&self, other: &EventEnvelope) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EventEnvelope

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for EventEnvelope

Source§

impl StructuralPartialEq for EventEnvelope

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,