pub struct Settings {Show 19 fields
pub last_provider: ProviderKind,
pub last_provider_url: Option<String>,
pub last_model: Option<String>,
pub preferred_mode: AgentMode,
pub ollama_api_key: Option<String>,
pub openai_compat_api_key: Option<String>,
pub sockudo_app_id: Option<String>,
pub sockudo_app_key: Option<String>,
pub sockudo_app_secret: Option<String>,
pub ollama_timeout_secs: u64,
pub ollama_max_retries: u32,
pub ollama_think_type: OllamaThinkType,
pub show_thinking: bool,
pub context_limit: Option<u32>,
pub auto_accept_safe_commands: bool,
pub skip_health_check: bool,
pub safe_command_prefixes: Option<Vec<String>>,
pub denied_command_prefixes: Option<Vec<String>>,
pub project_md_files: Option<Vec<String>>,
}Expand description
Persisted application settings — pure data type with no I/O.
Use SettingsStore to load and save instances of this type.
Fields§
§last_provider: ProviderKind§last_provider_url: Option<String>Last URL used for the active provider. Set automatically by --config
or by passing --url. Persisted so subsequent runs don’t re-prompt.
(default: None)
last_model: Option<String>§preferred_mode: AgentMode§ollama_api_key: Option<String>§openai_compat_api_key: Option<String>API key sent as Authorization: Bearer <key> by the OpenAI-compatible
provider (--openai-compat). Set via --api-key or OPENAI_API_KEY
env var. Not used by Ollama, llama.cpp, vLLM, or Sockudo.
sockudo_app_id: Option<String>Sockudo app ID for the AI Transport provider.
sockudo_app_key: Option<String>Sockudo app key (used as auth_key in signed API requests and WebSocket URL).
sockudo_app_secret: Option<String>Sockudo app secret (used to sign API requests via HMAC-SHA256).
ollama_timeout_secs: u64Timeout in seconds for Ollama requests (default: 5)
ollama_max_retries: u32Maximum number of retries for Ollama requests (default: 3)
ollama_think_type: OllamaThinkTypeControls the think/reasoning level for Ollama (default: Medium)
show_thinking: boolShow the model’s thinking/reasoning chain inline during streaming (default: false)
context_limit: Option<u32>Context limit for warning calculations only (default: None, uses model default)
auto_accept_safe_commands: boolAutomatically accept safe read-only commands in the run tool (default: true)
skip_health_check: boolSkip the provider health check at startup (default: false).
Useful for the --openai-compat provider when the gateway requires a
separate scope on /health, or for any server without a /health
endpoint. When true, the agent proceeds straight to model selection
and reports any connection error on the first real request instead.
safe_command_prefixes: Option<Vec<String>>List of command prefixes considered safe for auto-accept (default: see get_default_safe_commands)
denied_command_prefixes: Option<Vec<String>>List of command prefixes that are always denied auto-accept, even if they match a safe prefix. Takes priority over the safe list. (default: empty)
project_md_files: Option<Vec<String>>Override the project instruction file discovery list.
When set, replaces the hardcoded default list (TINYHARNESS.md, AGENTS.md, etc.).
Use TINYHARNESS_MD_FILES env var for the highest priority override.
(default: None → use hardcoded defaults)
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn get_safe_commands(&self) -> Vec<String>
pub fn get_safe_commands(&self) -> Vec<String>
Returns the list of safe command prefixes, using defaults if not configured.
Sourcepub fn get_denied_commands(&self) -> Vec<String>
pub fn get_denied_commands(&self) -> Vec<String>
Returns the list of always-denied command prefixes. These take priority over the safe list — if a command matches both a safe prefix and a denied prefix, it is denied. Defaults to an empty list (nothing denied).