pub struct SessionConfig {Show 19 fields
pub session_id: Option<String>,
pub model: Option<String>,
pub reasoning_effort: Option<ReasoningEffort>,
pub config_dir: Option<String>,
pub tools: Option<Vec<ToolDefinition>>,
pub system_message: Option<SystemMessageConfig>,
pub available_tools: Option<Vec<String>>,
pub excluded_tools: Option<Vec<String>>,
pub provider: Option<ProviderConfig>,
pub working_directory: Option<String>,
pub streaming: Option<bool>,
pub mcp_servers: Option<HashMap<String, McpServerConfig>>,
pub custom_agents: Option<Vec<CustomAgentConfig>>,
pub skill_directories: Option<Vec<String>>,
pub disabled_skills: Option<Vec<String>>,
pub infinite_sessions: Option<InfiniteSessionConfig>,
pub request_permission: Option<bool>,
pub request_user_input: Option<bool>,
pub hooks: Option<bool>,
}Expand description
Configuration for creating a session.
This struct holds the parameters sent to the server via session.create.
Tool handlers, permission handlers, user input handlers, and hooks
are registered separately on the Rust side and are not serialized.
Fields§
§session_id: Option<String>§model: Option<String>§reasoning_effort: Option<ReasoningEffort>§config_dir: Option<String>§tools: Option<Vec<ToolDefinition>>§system_message: Option<SystemMessageConfig>§available_tools: Option<Vec<String>>§excluded_tools: Option<Vec<String>>§provider: Option<ProviderConfig>§working_directory: Option<String>§streaming: Option<bool>§mcp_servers: Option<HashMap<String, McpServerConfig>>§custom_agents: Option<Vec<CustomAgentConfig>>§skill_directories: Option<Vec<String>>§disabled_skills: Option<Vec<String>>§infinite_sessions: Option<InfiniteSessionConfig>§request_permission: Option<bool>Set by the SDK based on whether handlers are registered (not user-set).
request_user_input: Option<bool>Set by the SDK based on whether handlers are registered (not user-set).
hooks: Option<bool>Set by the SDK based on whether hooks are registered (not user-set).
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 Default for SessionConfig
impl Default for SessionConfig
Source§fn default() -> SessionConfig
fn default() -> SessionConfig
Returns the “default value” for a type. Read more
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
Auto 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