pub struct Config {Show 26 fields
pub settings_dir: PathBuf,
pub soul_path: Option<PathBuf>,
pub skills_dir: Option<PathBuf>,
pub workspace_dir: Option<PathBuf>,
pub credentials_dir: Option<PathBuf>,
pub messengers: Vec<MessengerConfig>,
pub use_secrets: bool,
pub gateway_url: Option<String>,
pub model: Option<ModelProvider>,
pub secrets_password_protected: bool,
pub totp_enabled: bool,
pub agent_access: bool,
pub agent_name: String,
pub message_spacing: u16,
pub tab_width: u16,
pub sandbox: SandboxConfig,
pub clawhub_url: Option<String>,
pub clawhub_token: Option<String>,
pub system_prompt: Option<String>,
pub messenger_poll_interval_ms: Option<u32>,
pub tool_permissions: HashMap<String, ToolPermission>,
pub tls_cert: Option<PathBuf>,
pub tls_key: Option<PathBuf>,
pub memory_flush: MemoryFlushConfig,
pub workspace_context: WorkspaceContextConfig,
pub mnemo: Option<MnemoConfig>,
}Fields§
§settings_dir: PathBufRoot state directory (e.g. ~/.rustyclaw).
All other paths are derived from this unless explicitly overridden.
soul_path: Option<PathBuf>Path to SOUL.md file (default: <workspace_dir>/SOUL.md)
skills_dir: Option<PathBuf>Skills directory (default: <workspace_dir>/skills)
workspace_dir: Option<PathBuf>Agent workspace directory (default: <settings_dir>/workspace)
credentials_dir: Option<PathBuf>Credentials directory (default: <settings_dir>/credentials)
messengers: Vec<MessengerConfig>Messenger configurations
use_secrets: boolWhether to use secrets storage
gateway_url: Option<String>Gateway WebSocket URL for the TUI to connect to
model: Option<ModelProvider>Selected model provider and default model
secrets_password_protected: boolWhether the secrets vault is encrypted with a user password (as opposed to an auto-generated key file).
totp_enabled: boolWhether TOTP two-factor authentication is enabled for the vault.
agent_access: boolWhether the agent is allowed to access secrets on behalf of the user.
agent_name: StringUser-chosen name for this agent instance (shown in TUI title, authenticator app labels, etc.). Defaults to “RustyClaw”.
message_spacing: u16Number of blank lines inserted between messages in the TUI. Set to 0 for compact output, 1 (default) for comfortable spacing.
tab_width: u16Number of spaces a tab character occupies in the TUI. Defaults to 5.
sandbox: SandboxConfigSandbox configuration for agent isolation.
clawhub_url: Option<String>ClawHub registry URL (default: https://registry.clawhub.dev/api/v1).
clawhub_token: Option<String>ClawHub API token for publishing / authenticated downloads.
system_prompt: Option<String>System prompt for the agent (used for messenger conversations).
messenger_poll_interval_ms: Option<u32>Messenger polling interval in milliseconds (default: 2000).
tool_permissions: HashMap<String, ToolPermission>Per-tool permission overrides. Tools not listed here default to Allow.
tls_cert: Option<PathBuf>Path to TLS certificate file (PEM) for WSS gateway connections.
tls_key: Option<PathBuf>Path to TLS private key file (PEM) for WSS gateway connections.
memory_flush: MemoryFlushConfigPre-compaction memory flush configuration.
workspace_context: WorkspaceContextConfigWorkspace context injection configuration.
mnemo: Option<MnemoConfig>Native memory coprocessor (mnemo) configuration.
Implementations§
Source§impl Config
impl Config
Sourcepub fn workspace_dir(&self) -> PathBuf
pub fn workspace_dir(&self) -> PathBuf
Agent workspace directory — holds SOUL.md, skills/, etc.
Default: <settings_dir>/workspace
Sourcepub fn credentials_dir(&self) -> PathBuf
pub fn credentials_dir(&self) -> PathBuf
Credentials directory — holds secrets vault, key file, OAuth tokens.
Default: <settings_dir>/credentials
Sourcepub fn agent_dir(&self) -> PathBuf
pub fn agent_dir(&self) -> PathBuf
Default agent directory — per-agent state (sessions, etc.).
Default: <settings_dir>/agents/main
Sourcepub fn sessions_dir(&self) -> PathBuf
pub fn sessions_dir(&self) -> PathBuf
Sessions directory for the default agent.
Sourcepub fn skills_dir(&self) -> PathBuf
pub fn skills_dir(&self) -> PathBuf
Skills directory — inside the workspace.
Sourcepub fn skills_dirs(&self) -> Vec<PathBuf>
pub fn skills_dirs(&self) -> Vec<PathBuf>
Returns all skills directories in priority order (lowest to highest). Order: bundled OpenClaw → user OpenClaw → user RustyClaw
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Ensure the entire directory skeleton exists on disk.