pub struct SessionMetadata {Show 16 fields
pub schema_version: u32,
pub model: String,
pub max_tokens: u32,
pub structured_output_retries: u32,
pub provider: Provider,
pub self_hosted_server_id: Option<String>,
pub provider_params: Option<Value>,
pub tooling: SessionTooling,
pub keep_alive: bool,
pub comms_name: Option<String>,
pub peer_meta: Option<PeerMeta>,
pub realm_id: Option<String>,
pub instance_id: Option<String>,
pub backend: Option<String>,
pub config_generation: Option<u64>,
pub auth_binding: Option<AuthBindingRef>,
}Expand description
Metadata required to reliably resume a session across interfaces.
Fields§
§schema_version: u32Per-entity schema version byte.
Defaults to 1 on read so pre-wave-c rows without the field
deserialize cleanly; rewritten as SESSION_METADATA_SCHEMA_VERSION
on the next save() after a successful migration pass.
model: String§max_tokens: u32§structured_output_retries: u32§provider: Provider§self_hosted_server_id: Option<String>§provider_params: Option<Value>§tooling: SessionTooling§keep_alive: bool§comms_name: Option<String>§peer_meta: Option<PeerMeta>Friendly metadata for peer discovery (populated when comms is enabled).
realm_id: Option<String>Realm identity for cross-surface storage sharing/isolation.
instance_id: Option<String>Optional process/agent instance identifier within a realm.
backend: Option<String>Backend pinned by the realm manifest (e.g. “sqlite”, “jsonl”).
config_generation: Option<u64>Config generation used when this session was created/resumed.
auth_binding: Option<AuthBindingRef>Realm-scoped auth binding (Phase 3 provider-auth redesign).
Persisted intent for the auth/backend binding this session resolved
through. On resume, apply_resumed_session_metadata writes this
back into AgentBuildConfig.auth_binding so the same realm
binding is re-resolved. Never carries secret material — leases
are rebuilt from the active realm connection set at resume time.
Older persisted sessions without the field deserialize as None
(backward compatible via #[serde(default)]).
Implementations§
Source§impl SessionMetadata
impl SessionMetadata
Sourcepub fn llm_identity(&self) -> SessionLlmIdentity
pub fn llm_identity(&self) -> SessionLlmIdentity
Return the current durable LLM identity for this session.
Sourcepub fn apply_llm_identity(&mut self, identity: &SessionLlmIdentity)
pub fn apply_llm_identity(&mut self, identity: &SessionLlmIdentity)
Overwrite the durable LLM identity while preserving unrelated session metadata.
Trait Implementations§
Source§impl Clone for SessionMetadata
impl Clone for SessionMetadata
Source§fn clone(&self) -> SessionMetadata
fn clone(&self) -> SessionMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more