Skip to main content

Module config

Module config 

Source

Modules§

schema
Auto-generated config schema from Config struct metadata.

Structs§

AliasEntry
A user-defined command alias mapping for shell compression patterns.
ArchiveConfig
Settings for the zero-loss compression archive (large tool outputs saved to disk).
AutonomyConfig
Controls autonomous background behaviors (preload, dedup, consolidation).
CloudConfig
Cloud sync and contribution settings (pattern sharing, model pulls).
Config
Global lean-ctx configuration loaded from config.toml, merged with project-local overrides.
LoopDetectionConfig
Thresholds for detecting and throttling repetitive agent tool call loops.
MemoryGuardConfig
RSS-based memory guardian configuration.
ProxyConfig
API proxy upstream overrides. None = use provider default.
SecretDetectionConfig
UpdatesConfig
Controls automatic update behavior. All defaults are OFF — auto-updates require explicit opt-in via lean-ctx setup or lean-ctx update --schedule.

Enums§

CompressionLevel
Each level maps to specific component settings via to_components().
MemoryCleanup
Controls how aggressively lean-ctx frees memory when idle.
MemoryProfile
Controls RAM usage vs. feature richness trade-off.
OutputDensity
Legacy: Controls how dense/compact MCP tool output is formatted. Superseded by CompressionLevel. Kept for backward compatibility with old config.toml files. New setups use compression_level instead. See CompressionLevel::effective().
ProxyProvider
ResponseVerbosity
Unified compression level that replaces the 4 separate legacy concepts: terse_agent, output_density, terse_mode, and crp_mode.
RulesScope
Where agent rule files are installed: global home dir, project-local, or both.
SavingsFooter
Controls visibility of token savings footers in tool output.
ShellActivation
Controls when the shell hook auto-activates command aliases.
TeeMode
Controls when shell output is tee’d to disk for later retrieval.
TerseAgent
Legacy: Controls agent output verbosity level injected into MCP instructions. Superseded by CompressionLevel. Kept for backward compatibility with old config.toml files. New setups use compression_level instead. See CompressionLevel::effective().

Functions§

default_bm25_max_cache_mb
Default BM25 cache cap from config (also used by bm25_index heuristics).
is_local_proxy_url
normalize_url
normalize_url_opt