pub struct FeatureFlags {Show 26 fields
pub enable_mcp_server: bool,
pub enable_classic_tree: bool,
pub enable_formatters: bool,
pub enable_ai_modes: bool,
pub enable_consciousness: bool,
pub enable_memory_manager: bool,
pub enable_context_absorption: bool,
pub enable_smart_search: bool,
pub enable_activity_logging: bool,
pub enable_telemetry: bool,
pub enable_file_watching: bool,
pub enable_auto_context: bool,
pub enable_tui: bool,
pub enable_hooks: bool,
pub enable_tips: bool,
pub enable_quantum_modes: bool,
pub enable_wave_signatures: bool,
pub enable_mega_sessions: bool,
pub enable_q8_caster: bool,
pub mcp_tools: McpToolFlags,
pub privacy_mode: bool,
pub disable_external_connections: bool,
pub disable_home_directory_access: bool,
pub compliance_mode: Option<ComplianceMode>,
pub allowed_paths: Vec<String>,
pub blocked_paths: Vec<String>,
}Expand description
Feature flags for controlling Smart Tree capabilities Organizations can disable features via config file or environment variables
Fields§
§enable_mcp_server: bool§enable_classic_tree: bool§enable_formatters: bool§enable_ai_modes: bool§enable_consciousness: bool§enable_memory_manager: bool§enable_context_absorption: bool§enable_smart_search: bool§enable_activity_logging: bool§enable_telemetry: bool§enable_file_watching: bool§enable_auto_context: bool§enable_tui: bool§enable_hooks: bool§enable_tips: bool§enable_quantum_modes: bool§enable_wave_signatures: bool§enable_mega_sessions: bool§enable_q8_caster: bool§mcp_tools: McpToolFlags§privacy_mode: bool§disable_external_connections: bool§disable_home_directory_access: bool§compliance_mode: Option<ComplianceMode>§allowed_paths: Vec<String>§blocked_paths: Vec<String>Implementations§
Source§impl FeatureFlags
impl FeatureFlags
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load feature flags from multiple sources (in priority order):
- Environment variables (highest priority)
- Local config file (.st/features.toml)
- System config (/etc/smart-tree/features.toml)
- Default values (lowest priority)
Sourcepub fn is_enabled(&self, feature: &str) -> bool
pub fn is_enabled(&self, feature: &str) -> bool
Check if a feature is enabled
Sourcepub fn get_enabled_mcp_tools(&self) -> Vec<String>
pub fn get_enabled_mcp_tools(&self) -> Vec<String>
Get filtered MCP tools based on flags
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate a features report
Trait Implementations§
Source§impl Clone for FeatureFlags
impl Clone for FeatureFlags
Source§fn clone(&self) -> FeatureFlags
fn clone(&self) -> FeatureFlags
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 FeatureFlags
impl Debug for FeatureFlags
Source§impl Default for FeatureFlags
impl Default for FeatureFlags
Source§impl<'de> Deserialize<'de> for FeatureFlags
impl<'de> Deserialize<'de> for FeatureFlags
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 FeatureFlags
impl RefUnwindSafe for FeatureFlags
impl Send for FeatureFlags
impl Sync for FeatureFlags
impl Unpin for FeatureFlags
impl UnsafeUnpin for FeatureFlags
impl UnwindSafe for FeatureFlags
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 more