pub struct MessageMeta {
pub created_at_ms: u64,
pub compacted_at_ms: Option<u64>,
pub cache_stable: bool,
pub tags: Vec<String>,
pub extensions: BTreeMap<String, Value>,
}Expand description
Per-message bookkeeping — never sent to the LLM provider, only used by the loop core and registered extensions.
Most extensions should write to strong-typed fields below. The
extensions slot is a last-resort escape hatch for extension-specific
state that isn’t worth adding to core (e.g., a third-party extension
stashing a custom tag). Prefer adding a strong-typed field via PR.
Fields§
§created_at_ms: u64Creation time, as Unix ms. Serialised as integer for stable JSON.
compacted_at_ms: Option<u64>If set, the time at which a compaction policy marked this message as compacted (e.g. OpenCode-style reversible marking). Policies may choose to hide such messages from the provider without deleting them from storage.
cache_stable: boolHint to prompt-cache-aware projection policies: if true, the
message is part of the cache-stable prefix and must not be mutated
for the current turn.
Opaque tags. Extensions may filter / route on these.
extensions: BTreeMap<String, Value>Open extension slot. Key is an extension name, value is any JSON. Use sparingly — prefer strong-typed fields.
Trait Implementations§
Source§impl Clone for MessageMeta
impl Clone for MessageMeta
Source§fn clone(&self) -> MessageMeta
fn clone(&self) -> MessageMeta
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 MessageMeta
impl Debug for MessageMeta
Source§impl Default for MessageMeta
impl Default for MessageMeta
Source§fn default() -> MessageMeta
fn default() -> MessageMeta
Source§impl<'de> Deserialize<'de> for MessageMeta
impl<'de> Deserialize<'de> for MessageMeta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MessageMeta
impl PartialEq for MessageMeta
Source§fn eq(&self, other: &MessageMeta) -> bool
fn eq(&self, other: &MessageMeta) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MessageMeta
impl Serialize for MessageMeta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for MessageMeta
impl StructuralPartialEq for MessageMeta
Auto Trait Implementations§
impl Freeze for MessageMeta
impl RefUnwindSafe for MessageMeta
impl Send for MessageMeta
impl Sync for MessageMeta
impl Unpin for MessageMeta
impl UnsafeUnpin for MessageMeta
impl UnwindSafe for MessageMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.