pub struct StreamDelta {Show 20 fields
pub delta_id: StreamDeltaId,
pub run_id: RunId,
pub agent_id: AgentId,
pub turn_id: Option<TurnId>,
pub attempt_id: Option<AttemptId>,
pub message_id: Option<MessageId>,
pub tool_call_id: Option<ToolCallId>,
pub realtime_session_id: Option<RealtimeSessionId>,
pub channel: StreamChannel,
pub direction: Option<StreamDirection>,
pub cursor: StreamCursor,
pub source: SourceRef,
pub destination: Option<DestinationRef>,
pub policy_refs: Vec<PolicyRef>,
pub privacy: PrivacyClass,
pub retention: RetentionClass,
pub content_ref: Option<ContentRef>,
pub marker_id: Option<MarkerId>,
pub redacted_summary: String,
pub runtime_package_fingerprint: String,
/* private fields */
}Expand description
Carries the stream delta 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§
§delta_id: StreamDeltaIdStable delta id used for typed lineage, lookup, or dedupe.
run_id: RunIdRun identifier used for lineage, filtering, replay, and dedupe.
agent_id: AgentIdAgent 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.
tool_call_id: Option<ToolCallId>Stable tool call id used for typed lineage, lookup, or dedupe.
realtime_session_id: Option<RealtimeSessionId>Stable realtime session id used for typed lineage, lookup, or dedupe.
channel: StreamChannelChannel used by this record or request.
direction: Option<StreamDirection>Optional direction value. When absent, callers should use the documented default or skip that optional behavior.
cursor: StreamCursorCursor identifying a replay, export, or subscription position. Use it to resume without widening the original scope.
source: SourceRefSource 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.
privacy: PrivacyClassPrivacy class used for projection, telemetry, and raw-content access decisions.
retention: RetentionClassRetention class used by hosts and sinks when storing or exporting this item.
content_ref: Option<ContentRef>Content reference where payload bytes or structured tool output are stored.
marker_id: Option<MarkerId>Stable marker id used for typed lineage, lookup, or dedupe.
redacted_summary: StringRedacted human-readable summary safe for events, telemetry, and logs.
runtime_package_fingerprint: StringFingerprint 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 StreamDelta
impl StreamDelta
Sourcepub fn visible_text(
delta_id: impl Into<String>,
channel: StreamChannel,
cursor: StreamCursor,
text: impl Into<String>,
source: SourceRef,
) -> Self
pub fn visible_text( delta_id: impl Into<String>, channel: StreamChannel, cursor: StreamCursor, text: impl Into<String>, source: SourceRef, ) -> Self
Builds the visible text value with the documented defaults. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn marker(
delta_id: impl Into<String>,
channel: StreamChannel,
cursor: StreamCursor,
marker_id: impl Into<String>,
source: SourceRef,
) -> Self
pub fn marker( delta_id: impl Into<String>, channel: StreamChannel, cursor: StreamCursor, marker_id: impl Into<String>, source: SourceRef, ) -> Self
Marker. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn with_run(self, run_id: RunId, agent_id: AgentId) -> Self
pub fn with_run(self, run_id: RunId, agent_id: AgentId) -> Self
Returns this value with its run setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_turn(self, turn_id: TurnId) -> Self
pub fn with_turn(self, turn_id: TurnId) -> Self
Returns this value with its turn setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_attempt(self, attempt_id: AttemptId) -> Self
pub fn with_attempt(self, attempt_id: AttemptId) -> Self
Returns this value with its attempt setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_direction(self, direction: StreamDirection) -> Self
pub fn with_direction(self, direction: StreamDirection) -> Self
Returns this value with its direction setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_destination(self, destination: DestinationRef) -> Self
pub fn with_destination(self, destination: DestinationRef) -> Self
Returns this value with its destination setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_content_ref(self, content_ref: ContentRef) -> Self
pub fn with_content_ref(self, content_ref: ContentRef) -> Self
Returns this value with its content ref setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn matcher_text(&self) -> Option<&str>
pub fn matcher_text(&self) -> Option<&str>
Returns the matcher text currently held by this value. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn serialized_raw_text_absent(&self) -> bool
pub fn serialized_raw_text_absent(&self) -> bool
Returns whether serialized raw text absent applies for this contract. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Trait Implementations§
Source§impl Clone for StreamDelta
impl Clone for StreamDelta
Source§fn clone(&self) -> StreamDelta
fn clone(&self) -> StreamDelta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamDelta
impl Debug for StreamDelta
Source§impl<'de> Deserialize<'de> for StreamDelta
impl<'de> Deserialize<'de> for StreamDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StreamDelta
impl PartialEq for StreamDelta
Source§fn eq(&self, other: &StreamDelta) -> bool
fn eq(&self, other: &StreamDelta) -> bool
self and other values to be equal, and is used by ==.