pub struct TranscriptItem {
pub id: EntryId,
pub parent_id: Option<EntryId>,
pub kind: TranscriptKind,
pub message: Option<Message>,
/* private fields */
}Fields§
§id: EntryIdIdentity of this entry within the transcript tree.
parent_id: Option<EntryId>The entry this one continues from. None marks a root.
Set by AgentTranscript::push rather than by the constructors: an
entry’s parent is a property of where it is appended, not of what it
contains.
kind: TranscriptKind§message: Option<Message>Implementations§
Source§impl TranscriptItem
impl TranscriptItem
pub fn user_turn(message: Message) -> Self
pub fn assistant_turn(message: Message) -> Self
pub fn tool_exchange( message: Message, tool_use_id: Option<String>, is_error: bool, ) -> Self
pub fn canonical_context(message: Message) -> Self
pub fn delegation_request( message: Message, delegation: DelegationArtifact, edge: Option<DelegationEdge>, ) -> Self
pub fn delegation_result( message: Message, delegation: DelegationArtifact, edge: Option<DelegationEdge>, ) -> Self
pub fn compaction_summary(summary: CompactionSummary) -> Self
Sourcepub fn with_details(self, details: BTreeMap<String, Value>) -> Self
pub fn with_details(self, details: BTreeMap<String, Value>) -> Self
Attaches opaque per-call host metadata to this item, keyed by
tool_use_id. A no-op for an empty map, so attaching a possibly-empty
collected map never turns a details-free item into one carrying
Some(empty map).
Sourcepub fn details(&self) -> Option<&BTreeMap<String, Value>>
pub fn details(&self) -> Option<&BTreeMap<String, Value>>
This item’s opaque per-call host metadata, if any. mentra never interprets these values — a host recovers its own metadata after a round through this accessor alone, without mentra knowing any host type.
Sourcepub fn detail(&self, tool_use_id: &str) -> Option<&Value>
pub fn detail(&self, tool_use_id: &str) -> Option<&Value>
Looks up this item’s opaque metadata for one tool_use_id.
pub fn project_message(&self) -> Option<Message>
pub fn is_real_user_turn(&self) -> bool
pub fn is_delegation_result(&self) -> bool
pub fn text(&self) -> String
Trait Implementations§
Source§impl Clone for TranscriptItem
impl Clone for TranscriptItem
Source§fn clone(&self) -> TranscriptItem
fn clone(&self) -> TranscriptItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranscriptItem
impl Debug for TranscriptItem
Source§impl<'de> Deserialize<'de> for TranscriptItem
impl<'de> Deserialize<'de> for TranscriptItem
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TranscriptItem
Source§impl PartialEq for TranscriptItem
impl PartialEq for TranscriptItem
Source§impl Serialize for TranscriptItem
impl Serialize for TranscriptItem
impl StructuralPartialEq for TranscriptItem
Auto Trait Implementations§
impl Freeze for TranscriptItem
impl RefUnwindSafe for TranscriptItem
impl Send for TranscriptItem
impl Sync for TranscriptItem
impl Unpin for TranscriptItem
impl UnsafeUnpin for TranscriptItem
impl UnwindSafe for TranscriptItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.