pub struct ContextProjection {
pub projection_id: ContextProjectionId,
pub source_messages: Vec<AgentMessage>,
pub items: Vec<ContextItem>,
pub projected_parts: Vec<ProjectedContextPart>,
pub audit: ContextProjectionAudit,
pub provider_destination: DestinationRef,
}Expand description
Carries the context projection 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§
§projection_id: ContextProjectionIdStable projection id used for typed lineage, lookup, or dedupe.
source_messages: Vec<AgentMessage>Collection of source messages values. Ordering and membership should be treated as part of the serialized contract when relevant.
items: Vec<ContextItem>Bounded items included in this record. Limits and truncation are represented by companion metadata when applicable.
projected_parts: Vec<ProjectedContextPart>Collection of projected parts values. Ordering and membership should be treated as part of the serialized contract when relevant.
audit: ContextProjectionAuditAudit used by this record or request.
provider_destination: DestinationRefProvider destination used by this record or request.
Implementations§
Source§impl ContextProjection
impl ContextProjection
Sourcepub fn build(
projection_id: ContextProjectionId,
source_messages: Vec<AgentMessage>,
items: Vec<ContextItem>,
omitted: Vec<ContextSelectionDecision>,
provider_destination: DestinationRef,
budget: ContextBudgetSummary,
redaction_policy_id: PolicyRef,
runtime_package_fingerprint: impl Into<String>,
) -> Result<Self, AgentError>
pub fn build( projection_id: ContextProjectionId, source_messages: Vec<AgentMessage>, items: Vec<ContextItem>, omitted: Vec<ContextSelectionDecision>, provider_destination: DestinationRef, budget: ContextBudgetSummary, redaction_policy_id: PolicyRef, runtime_package_fingerprint: impl Into<String>, ) -> Result<Self, AgentError>
Finishes builder validation and returns the configured value. This is data-only unless the surrounding builder explicitly documents adapter or store access.
Sourcepub fn provider_visible_content_ids(&self) -> Vec<ContentId>
pub fn provider_visible_content_ids(&self) -> Vec<ContentId>
Computes or returns provider visible content ids for the records::context contract without external I/O or side effects.
Trait Implementations§
Source§impl Clone for ContextProjection
impl Clone for ContextProjection
Source§fn clone(&self) -> ContextProjection
fn clone(&self) -> ContextProjection
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 ContextProjection
impl Debug for ContextProjection
Source§impl Default for ContextProjection
impl Default for ContextProjection
Source§impl<'de> Deserialize<'de> for ContextProjection
impl<'de> Deserialize<'de> for ContextProjection
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 ContextProjection
impl PartialEq for ContextProjection
Source§fn eq(&self, other: &ContextProjection) -> bool
fn eq(&self, other: &ContextProjection) -> bool
self and other values to be equal, and is used by ==.