pub struct SessionMeta {Show 23 fields
pub session_id: SessionId,
pub id: ThreadId,
pub forked_from_id: Option<ThreadId>,
pub parent_thread_id: Option<ThreadId>,
pub timestamp: String,
pub cwd: PathBuf,
pub originator: String,
pub cli_version: String,
pub source: SessionSource,
pub thread_source: Option<ThreadSource>,
pub agent_nickname: Option<String>,
pub agent_role: Option<String>,
pub agent_path: Option<String>,
pub model_provider: Option<String>,
pub base_instructions: Option<BaseInstructions>,
pub dynamic_tools: Option<Vec<DynamicToolSpec>>,
pub selected_capability_roots: Vec<SelectedCapabilityRoot>,
pub memory_mode: Option<String>,
pub history_mode: ThreadHistoryMode,
pub history_base: Option<HistoryPosition>,
pub subagent_history_start_ordinal: Option<u64>,
pub multi_agent_version: Option<MultiAgentVersion>,
pub context_window: Option<SessionContextWindow>,
}Expand description
SessionMeta contains session-level data that doesn’t correspond to a specific turn.
NOTE: There used to be an instructions field here, which stored user_instructions, but we
now save that on TurnContext. base_instructions stores the base instructions for the session,
and should be used when there is no config override.
Fields§
§session_id: SessionId§id: ThreadId§forked_from_id: Option<ThreadId>§parent_thread_id: Option<ThreadId>§timestamp: String§cwd: PathBuf§originator: String§cli_version: String§source: SessionSource§thread_source: Option<ThreadSource>Optional analytics source classification for this thread.
agent_nickname: Option<String>Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
agent_role: Option<String>Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
agent_path: Option<String>Optional canonical agent path assigned to an AgentControl-spawned sub-agent.
model_provider: Option<String>§base_instructions: Option<BaseInstructions>base_instructions for the session. This should always be present when creating a new session, but may be missing for older sessions. If not present, fall back to rendering the base_instructions from ModelsManager.
dynamic_tools: Option<Vec<DynamicToolSpec>>§selected_capability_roots: Vec<SelectedCapabilityRoot>Capability roots selected for this thread by the hosting platform.
memory_mode: Option<String>§history_mode: ThreadHistoryMode§history_base: Option<HistoryPosition>Exclusive prefix of another paginated rollout inherited by this thread.
subagent_history_start_ordinal: Option<u64>First rollout ordinal that belongs to this subagent’s own projected history.
Earlier rollout records are inherited model context and stay out of child turn/item projection.
multi_agent_version: Option<MultiAgentVersion>§context_window: Option<SessionContextWindow>Initial context-window identity for consumers that tail rollout JSONL before compaction.
Trait Implementations§
Source§impl Clone for SessionMeta
impl Clone for SessionMeta
Source§fn clone(&self) -> SessionMeta
fn clone(&self) -> SessionMeta
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 SessionMeta
impl Debug for SessionMeta
Source§impl Default for SessionMeta
impl Default for SessionMeta
Source§fn default() -> SessionMeta
fn default() -> SessionMeta
Source§impl<'de> Deserialize<'de> for SessionMeta
impl<'de> Deserialize<'de> for SessionMeta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SessionMeta
impl JsonSchema for SessionMeta
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Serialize for SessionMeta
impl Serialize for SessionMeta
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,
Source§impl TS for SessionMeta
impl TS for SessionMeta
Source§type WithoutGenerics = SessionMeta
type WithoutGenerics = SessionMeta
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = SessionMeta
type OptionInnerType = SessionMeta
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
SessionMeta: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
SessionMeta: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
SessionMeta: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
SessionMeta: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for SessionMeta
impl RefUnwindSafe for SessionMeta
impl Send for SessionMeta
impl Sync for SessionMeta
impl Unpin for SessionMeta
impl UnsafeUnpin for SessionMeta
impl UnwindSafe for SessionMeta
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request