pub struct SessionOptions {
pub model: Option<String>,
pub agent_dirs: Vec<PathBuf>,
pub queue_config: Option<SessionQueueConfig>,
pub security_provider: Option<Arc<dyn SecurityProvider>>,
pub context_providers: Vec<Arc<dyn ContextProvider>>,
pub confirmation_manager: Option<Arc<dyn ConfirmationProvider>>,
pub permission_checker: Option<Arc<dyn PermissionChecker>>,
pub planning_enabled: bool,
pub goal_tracking: bool,
pub skill_registry: Option<Arc<SkillRegistry>>,
}Expand description
Optional per-session overrides.
Fields§
§model: Option<String>Override the default model. Format: "provider/model" (e.g., "openai/gpt-4o").
agent_dirs: Vec<PathBuf>Extra directories to scan for agent files.
Merged with any global agent_dirs from CodeConfig.
queue_config: Option<SessionQueueConfig>Optional queue configuration for lane-based tool execution.
When set, enables priority-based tool scheduling with parallel execution of read-only (Query-lane) tools, DLQ, metrics, and external task handling.
security_provider: Option<Arc<dyn SecurityProvider>>Optional security provider for taint tracking and output sanitization
context_providers: Vec<Arc<dyn ContextProvider>>Optional context providers for RAG
confirmation_manager: Option<Arc<dyn ConfirmationProvider>>Optional confirmation manager for HITL
permission_checker: Option<Arc<dyn PermissionChecker>>Optional permission checker
planning_enabled: boolEnable planning
goal_tracking: boolEnable goal tracking
skill_registry: Option<Arc<SkillRegistry>>Optional skill registry for instruction injection
Implementations§
Source§impl SessionOptions
impl SessionOptions
pub fn new() -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_agent_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_queue_config(self, config: SessionQueueConfig) -> Self
Sourcepub fn with_default_security(self) -> Self
pub fn with_default_security(self) -> Self
Enable default security provider with taint tracking and output sanitization
Sourcepub fn with_security_provider(self, provider: Arc<dyn SecurityProvider>) -> Self
pub fn with_security_provider(self, provider: Arc<dyn SecurityProvider>) -> Self
Set a custom security provider
Sourcepub fn with_fs_context(self, root_path: impl Into<PathBuf>) -> Self
pub fn with_fs_context(self, root_path: impl Into<PathBuf>) -> Self
Add a file system context provider for simple RAG
Sourcepub fn with_context_provider(self, provider: Arc<dyn ContextProvider>) -> Self
pub fn with_context_provider(self, provider: Arc<dyn ContextProvider>) -> Self
Add a custom context provider
Sourcepub fn with_confirmation_manager(
self,
manager: Arc<dyn ConfirmationProvider>,
) -> Self
pub fn with_confirmation_manager( self, manager: Arc<dyn ConfirmationProvider>, ) -> Self
Set a confirmation manager for HITL
Sourcepub fn with_permission_checker(
self,
checker: Arc<dyn PermissionChecker>,
) -> Self
pub fn with_permission_checker( self, checker: Arc<dyn PermissionChecker>, ) -> Self
Set a permission checker
Sourcepub fn with_planning(self, enabled: bool) -> Self
pub fn with_planning(self, enabled: bool) -> Self
Enable planning
Sourcepub fn with_goal_tracking(self, enabled: bool) -> Self
pub fn with_goal_tracking(self, enabled: bool) -> Self
Enable goal tracking
Sourcepub fn with_builtin_skills(self) -> Self
pub fn with_builtin_skills(self) -> Self
Add a skill registry with built-in skills
Sourcepub fn with_skill_registry(self, registry: Arc<SkillRegistry>) -> Self
pub fn with_skill_registry(self, registry: Arc<SkillRegistry>) -> Self
Add a custom skill registry
Sourcepub fn with_skills_from_dir(self, dir: impl AsRef<Path>) -> Self
pub fn with_skills_from_dir(self, dir: impl AsRef<Path>) -> Self
Load skills from a directory
Trait Implementations§
Source§impl Clone for SessionOptions
impl Clone for SessionOptions
Source§fn clone(&self) -> SessionOptions
fn clone(&self) -> SessionOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more