pub struct SessionConfig {
pub workspace: WorkspaceConfig,
pub workspace_ref: Option<WorkspaceRef>,
pub workspace_id: Option<WorkspaceId>,
pub repo_ref: Option<RepoRef>,
pub parent_session_id: Option<SessionId>,
pub workspace_name: Option<String>,
pub tool_config: SessionToolConfig,
pub system_prompt: Option<String>,
pub primary_agent_id: Option<String>,
pub policy_overrides: SessionPolicyOverrides,
pub metadata: HashMap<String, String>,
pub default_model: ModelId,
}Expand description
Session configuration - immutable once created
Fields§
§workspace: WorkspaceConfig§workspace_ref: Option<WorkspaceRef>§workspace_id: Option<WorkspaceId>§repo_ref: Option<RepoRef>§parent_session_id: Option<SessionId>§workspace_name: Option<String>§tool_config: SessionToolConfig§system_prompt: Option<String>Optional custom system prompt to use for the session. If None, Steer will
fall back to its built-in default prompt.
primary_agent_id: Option<String>Primary agent mode for this session. Defaults to “normal” if unset.
policy_overrides: SessionPolicyOverridesUser-controlled policy overrides that apply on top of the primary agent base policy.
metadata: HashMap<String, String>§default_model: ModelIdImplementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub async fn build_registry(
&self,
) -> Result<(BackendRegistry, HashMap<String, McpServerInfo>)>
pub async fn build_registry( &self, ) -> Result<(BackendRegistry, HashMap<String, McpServerInfo>)>
Build a BackendRegistry from MCP server configurations. Returns the registry and a map of MCP server connection states.
Sourcepub fn filter_tools_by_visibility(
&self,
tools: Vec<ToolSchema>,
) -> Vec<ToolSchema>
pub fn filter_tools_by_visibility( &self, tools: Vec<ToolSchema>, ) -> Vec<ToolSchema>
Filter tools based on visibility settings
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionConfig
impl Debug for SessionConfig
Source§impl<'de> Deserialize<'de> for SessionConfig
impl<'de> Deserialize<'de> for SessionConfig
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
Source§impl JsonSchema for SessionConfig
impl JsonSchema for SessionConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::Request