pub struct TurnContinuation { /* private fields */ }Expand description
Continuation state for one provider-agnostic agent turn.
The concrete representation keeps provider-runtime recovery details out of
TurnRequest while allowing CLI channels to consume only replay text.
Implementations§
Source§impl TurnContinuation
impl TurnContinuation
Sourcepub fn replaying(replay_transcript: String) -> Self
pub fn replaying(replay_transcript: String) -> Self
Creates continuation state for a stateless turn that replays prior text.
Sourcepub fn with_usage_checkpoint(self, usage_checkpoint: Option<String>) -> Self
pub fn with_usage_checkpoint(self, usage_checkpoint: Option<String>) -> Self
Carries the totals of the crate::TurnUsage::checkpoint the
conversation this turn continues left, from which the agent derives
this turn’s own usage.
Sourcepub fn usage_checkpoint(&self) -> Option<&str>
pub fn usage_checkpoint(&self) -> Option<&str>
Returns the usage checkpoint totals of the conversation this turn continues, when the host stored one.
Sourcepub fn provider(
live_transcript: Option<Arc<dyn LiveTranscript>>,
persisted_instruction_conversation_id: Option<String>,
provider_conversation_id: Option<String>,
replay_transcript: Option<String>,
) -> Self
pub fn provider( live_transcript: Option<Arc<dyn LiveTranscript>>, persisted_instruction_conversation_id: Option<String>, provider_conversation_id: Option<String>, replay_transcript: Option<String>, ) -> Self
Creates continuation state for a provider runtime that may resume a native conversation and reconstruct context from a live transcript.
Sourcepub fn replay_transcript(&self) -> Option<&str>
pub fn replay_transcript(&self) -> Option<&str>
Returns replayable transcript text when this turn carries it.
Sourcepub fn provider_conversation_id(&self) -> Option<&str>
pub fn provider_conversation_id(&self) -> Option<&str>
Returns the provider-native conversation identifier when available.
Sourcepub fn persisted_instruction_conversation_id(&self) -> Option<&str>
pub fn persisted_instruction_conversation_id(&self) -> Option<&str>
Returns the conversation identifier that received the instruction bootstrap when available.
Sourcepub fn into_parts(self) -> TurnContinuationParts
pub fn into_parts(self) -> TurnContinuationParts
Consumes continuation state for a runtime adapter.