pub struct MessageMetadata {
pub visibility: MessageVisibility,
pub compacted_at: Option<i64>,
pub deferred_summary: Option<String>,
pub focus_pinned: bool,
pub focus_marker_id: Option<Uuid>,
pub db_id: Option<i64>,
pub fidelity_tag: Option<ContextFidelity>,
pub embedding: Option<Vec<f32>>,
}Expand description
Per-message visibility and metadata controlling agent context and user display.
Constructors agent_only, user_only,
and focus_pinned cover the most common combinations.
Fields§
§visibility: MessageVisibilityWho can see this message.
compacted_at: Option<i64>Unix timestamp (seconds) when this message was compacted, if applicable.
deferred_summary: Option<String>Pre-computed tool pair summary, applied lazily when context pressure rises. Stored on the tool response message; cleared after application.
focus_pinned: boolWhen true, this message is excluded from all compaction passes (soft pruning, hard summarization, sidequest eviction). Used for the Focus Knowledge block (#1850).
focus_marker_id: Option<Uuid>Unique marker UUID set when start_focus begins a session. Used by complete_focus
to locate the checkpoint without relying on a fragile raw index.
db_id: Option<i64>SQLite row ID for this message. Populated when loading from DB or after persisting.
Never serialized — always re-populated from the database on load.
fidelity_tag: Option<ContextFidelity>Fidelity level assigned by FidelityScorer during context assembly.
None when fidelity scoring is disabled or the message has not yet been scored.
Used for debug tracing and compaction input filtering (INV-02).
embedding: Option<Vec<f32>>Cached embedding vector for semantic fidelity scoring.
In-memory only — not serialized or persisted to the database.
Implementations§
Source§impl MessageMetadata
impl MessageMetadata
Sourcepub fn agent_only() -> Self
pub fn agent_only() -> Self
Message visible only to the agent (e.g. compaction summary).
Sourcepub fn focus_pinned() -> Self
pub fn focus_pinned() -> Self
Pinned Knowledge block — excluded from all compaction passes.
Trait Implementations§
Source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
Source§fn clone(&self) -> MessageMetadata
fn clone(&self) -> MessageMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more