pub struct Config {Show 20 fields
pub mode: OperatingMode,
pub x_api: XApiConfig,
pub auth: AuthConfig,
pub business: BusinessProfile,
pub scoring: ScoringConfig,
pub limits: LimitsConfig,
pub intervals: IntervalsConfig,
pub llm: LlmConfig,
pub targets: TargetsConfig,
pub approval_mode: bool,
pub max_batch_approve: usize,
pub server: ServerConfig,
pub storage: StorageConfig,
pub logging: LoggingConfig,
pub schedule: ScheduleConfig,
pub mcp_policy: McpPolicyConfig,
pub circuit_breaker: CircuitBreakerConfig,
pub content_sources: ContentSourcesConfig,
pub deployment_mode: DeploymentMode,
pub connectors: ConnectorConfig,
}Expand description
Top-level configuration for the Tuitbot agent.
Fields§
§mode: OperatingModeOperating mode: “autopilot” (default) or “composer”.
x_api: XApiConfigX API credentials.
auth: AuthConfigAuthentication settings.
business: BusinessProfileBusiness profile for content targeting.
scoring: ScoringConfigScoring engine weights and threshold.
limits: LimitsConfigSafety limits for API actions.
intervals: IntervalsConfigAutomation interval settings.
llm: LlmConfigLLM provider configuration.
targets: TargetsConfigTarget account monitoring configuration.
approval_mode: boolEnable approval mode: queue posts for human review instead of posting.
max_batch_approve: usizeMaximum items that can be batch-approved at once.
server: ServerConfigServer binding configuration for LAN access.
storage: StorageConfigData storage configuration.
logging: LoggingConfigLogging and observability settings.
schedule: ScheduleConfigActive hours schedule for posting.
mcp_policy: McpPolicyConfigMCP mutation policy enforcement.
circuit_breaker: CircuitBreakerConfigCircuit breaker for X API rate-limit protection.
content_sources: ContentSourcesConfigContent source configuration for the Watchtower.
deployment_mode: DeploymentModeDeployment mode: desktop (default), self_host, or cloud. Controls which source types and features are available.
connectors: ConnectorConfigConnector configuration for remote source OAuth flows.
Implementations§
Source§impl Config
impl Config
Sourcepub fn profile_completeness(&self) -> ProfileCompleteness
pub fn profile_completeness(&self) -> ProfileCompleteness
Compute profile completeness across all enrichment stages.
Source§impl Config
impl Config
Sourcepub fn load(config_path: Option<&str>) -> Result<Config, ConfigError>
pub fn load(config_path: Option<&str>) -> Result<Config, ConfigError>
Load configuration from a TOML file with environment variable overrides.
The loading sequence:
- Determine config file path (argument >
TUITBOT_CONFIGenv var > default) - Parse TOML file (or use defaults if default path doesn’t exist)
- Apply environment variable overrides
Sourcepub fn load_and_validate(
config_path: Option<&str>,
) -> Result<Config, Vec<ConfigError>>
pub fn load_and_validate( config_path: Option<&str>, ) -> Result<Config, Vec<ConfigError>>
Load configuration and validate it, returning all validation errors at once.
Sourcepub fn effective_approval_mode(&self) -> bool
pub fn effective_approval_mode(&self) -> bool
Returns true if approval mode is effectively enabled.
In composer mode, approval mode is implicitly enabled for
autonomous loops so the user controls all automated posting.
Manual compose actions from the dashboard respect the explicit
approval_mode setting — use Config::approval_mode directly
for user-initiated flows.
Sourcepub fn is_composer_mode(&self) -> bool
pub fn is_composer_mode(&self) -> bool
Returns true if the agent is in composer mode.
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