pub struct Config {Show 23 fields
pub ultra_compact: bool,
pub tee_mode: TeeMode,
pub output_density: OutputDensity,
pub checkpoint_interval: u32,
pub excluded_commands: Vec<String>,
pub passthrough_urls: Vec<String>,
pub custom_aliases: Vec<AliasEntry>,
pub slow_command_threshold_ms: u64,
pub theme: String,
pub cloud: CloudConfig,
pub autonomy: AutonomyConfig,
pub buddy_enabled: bool,
pub redirect_exclude: Vec<String>,
pub disabled_tools: Vec<String>,
pub loop_detection: LoopDetectionConfig,
pub rules_scope: Option<String>,
pub extra_ignore_patterns: Vec<String>,
pub terse_agent: TerseAgent,
pub archive: ArchiveConfig,
pub allow_paths: Vec<String>,
pub content_defined_chunking: bool,
pub minimal_overhead: bool,
pub shell_hook_disabled: bool,
}Fields§
§ultra_compact: bool§tee_mode: TeeMode§output_density: OutputDensity§checkpoint_interval: u32§excluded_commands: Vec<String>§passthrough_urls: Vec<String>§custom_aliases: Vec<AliasEntry>§slow_command_threshold_ms: u64Commands taking longer than this threshold (ms) are recorded in the slow log. Set to 0 to disable slow logging.
theme: String§cloud: CloudConfig§autonomy: AutonomyConfig§buddy_enabled: bool§redirect_exclude: Vec<String>§disabled_tools: Vec<String>Tools to exclude from the MCP tool list returned by list_tools. Accepts exact tool names (e.g. [“ctx_graph”, “ctx_agent”]). Empty by default — all tools listed, no behaviour change.
loop_detection: LoopDetectionConfig§rules_scope: Option<String>Controls where lean-ctx installs agent rule files. Values: “both” (default), “global” (home-dir only), “project” (repo-local only). Override via LEAN_CTX_RULES_SCOPE env var.
extra_ignore_patterns: Vec<String>Extra glob patterns to ignore in graph/overview/preload (repo-local). Example: [“externals/”, “target/”, “temp/**”]
terse_agent: TerseAgentControls agent output verbosity via instructions injection. Values: “off” (default), “lite”, “full”, “ultra”. Override via LEAN_CTX_TERSE_AGENT env var.
archive: ArchiveConfigArchive configuration for zero-loss compression.
allow_paths: Vec<String>Additional paths allowed by PathJail (absolute). Useful for multi-project workspaces where the jail root is a parent directory. Override via LEAN_CTX_ALLOW_PATH env var (path-list separator).
content_defined_chunking: boolEnable content-defined chunking (Rabin-Karp) for cache-optimal output ordering. Stable chunks are emitted first to maximize prompt cache hits.
minimal_overhead: boolSkip session/knowledge/gotcha blocks in MCP instructions to minimize token overhead. Override via LEAN_CTX_MINIMAL env var.
shell_hook_disabled: boolDisable shell hook injection (the _lc() function that wraps CLI commands). Override via LEAN_CTX_NO_HOOK env var.
Implementations§
Source§impl Config
impl Config
pub fn rules_scope_effective(&self) -> RulesScope
pub fn disabled_tools_effective(&self) -> Vec<String>
pub fn minimal_overhead_effective(&self) -> bool
pub fn shell_hook_disabled_effective(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
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>
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 more