pub struct ConfigToml {Show 29 fields
pub api_key: Option<String>,
pub base_url: Option<String>,
pub http_headers: BTreeMap<String, String>,
pub default_text_model: Option<String>,
pub provider: ProviderKind,
pub model: Option<String>,
pub auth_mode: Option<String>,
pub output_mode: Option<String>,
pub verbosity: Option<String>,
pub log_level: Option<String>,
pub telemetry: Option<bool>,
pub telemetry_endpoint: Option<String>,
pub approval_policy: Option<String>,
pub sandbox_mode: Option<String>,
pub tools: Option<ToolsToml>,
pub providers: ProvidersToml,
pub fallback_providers: Vec<ProviderKind>,
pub network: Option<NetworkPolicyToml>,
pub verifier: Option<VerifierConfigToml>,
pub skills: Option<SkillsToml>,
pub snapshots: Option<SnapshotsToml>,
pub lsp: Option<LspConfigToml>,
pub harness_profiles: Vec<HarnessProfile>,
pub hotbar: Option<Vec<HotbarBindingToml>>,
pub hook_sinks: Option<HookSinksToml>,
pub fleet: Option<FleetConfigToml>,
pub fleets: BTreeMap<String, NamedFleetConfigToml>,
pub workflow: Option<WorkflowConfigToml>,
pub extras: BTreeMap<String, Value>,
/* private fields */
}Fields§
§api_key: Option<String>TUI-compatible DeepSeek API key. Kept at the root so both deepseek
and codewhale-tui can share a single config file.
base_url: Option<String>TUI-compatible DeepSeek base URL.
http_headers: BTreeMap<String, String>Optional extra HTTP headers forwarded to model API requests.
default_text_model: Option<String>TUI-compatible default DeepSeek model.
provider: ProviderKind§model: Option<String>§auth_mode: Option<String>§output_mode: Option<String>§verbosity: Option<String>§log_level: Option<String>§telemetry: Option<bool>§telemetry_endpoint: Option<String>Where telemetry batches are sent, when telemetry is enabled at all.
Unset here means “take the shipped default”,
DEFAULT_TELEMETRY_ENDPOINT — not “send nowhere”. Setting it to the
empty string is the way to say send nowhere: that resolves to no
endpoint, which appends batches to dryrun.jsonl and constructs no HTTP
client. Either way a persistent or run-scoped opt-out still prevents any
batch from being constructed.
Kept as a scalar sibling of telemetry rather than folded into a
[telemetry] table. telemetry is already a scalar and every section
table is declared after it, so a table of that name would be a hard
toml::from_str failure — and one whose cause ConfigStore::load
deliberately hides, leaving the user with an unloadable config and no
explanation. It would also be a ValueAfterTable serialization hazard
against the scalars that follow.
approval_policy: Option<String>§sandbox_mode: Option<String>§tools: Option<ToolsToml>Native tool catalog controls shared with codewhale-tui.
providers: ProvidersToml§fallback_providers: Vec<ProviderKind>Provider fallback chain (#2574). TUI runtime code may advance through these providers after recoverable provider errors; config resolution itself still reports the selected primary provider.
network: Option<NetworkPolicyToml>Per-domain network policy (#135). When absent, network tools fall back to a permissive default that mirrors pre-v0.7.0 behavior.
verifier: Option<VerifierConfigToml>Verifier-preview behavior (#2093). When absent, verifier tools keep the shipped defaults: disabled automatic preview and hunt verdict mapping.
skills: Option<SkillsToml>Community skill installer settings (#140). Mirrors
SkillsToml from the TUI side; the dispatcher consults
registry_url when running deepseek skill install.
snapshots: Option<SnapshotsToml>Workspace side-git snapshots (#137). The live TUI defaults this to enabled with 7-day retention when absent.
lsp: Option<LspConfigToml>Post-edit LSP diagnostics injection (#136). When absent, the engine
applies the defaults documented in LspConfigToml.
harness_profiles: Vec<HarnessProfile>Per-model harness profiles (#2693). Runtime wiring lands in follow-up v0.9 slices; this is the durable config data model.
hotbar: Option<Vec<HotbarBindingToml>>Optional 1-8 hotbar slot bindings (#2064). When absent, the TUI falls back to the built-in default slots.
hook_sinks: Option<HookSinksToml>App-server hook sink configuration. Kept separate from the TUI
lifecycle [hooks] table so config rewrites preserve existing hooks.
fleet: Option<FleetConfigToml>Agent Fleet trust and security policy (#3165). When absent, fleet workers inherit conservative Sandbox defaults.
fleets: BTreeMap<String, NamedFleetConfigToml>Multiple named operator-scoped Fleet configurations (#5039).
Each key is a unique fleet name; the associated value is a
NamedFleetConfigToml that carries the operator identity and its
own trust/role/profile/exec policy. The existing [fleet] table is the
backward-compatible default and is always accessible without a name.
Use ConfigToml::resolve_fleet to select a fleet by name,
ConfigToml::resolve_fleet_for_operator to select by operator identity.
workflow: Option<WorkflowConfigToml>Workflow automatic-launch, approval, isolation, and activity
persistence knobs (#4128 / Section 2.11). When absent, consumers use
WorkflowConfigToml::default.
extras: BTreeMap<String, Value>Implementations§
Source§impl ConfigToml
impl ConfigToml
Sourcepub fn resolve_harness_profile(
&self,
provider_route: &str,
model: &str,
) -> Option<&HarnessProfile>
pub fn resolve_harness_profile( &self, provider_route: &str, model: &str, ) -> Option<&HarnessProfile>
Resolve the first configured harness profile for a provider/model route.
This helper is deliberately dormant for v0.9: callers may display or test the resolved profile, but runtime provider/model routing and prompt shaping remain unchanged until a later, explicit integration slice.
Sourcepub fn resolve_hotbar_bindings(
&self,
known_action_ids: &[&str],
) -> HotbarConfigResolution
pub fn resolve_hotbar_bindings( &self, known_action_ids: &[&str], ) -> HotbarConfigResolution
Resolve durable hotbar config into normalized 1-8 slot bindings.
known_action_ids is supplied by the TUI action registry in later
slices. Unknown actions are preserved so the UI can render a disabled
? cell instead of silently deleting user config.
Sourcepub fn resolve_fleet(
&self,
name: &str,
) -> Result<&NamedFleetConfigToml, FleetResolutionError>
pub fn resolve_fleet( &self, name: &str, ) -> Result<&NamedFleetConfigToml, FleetResolutionError>
Resolve a named Fleet configuration by fleet name (#5039).
§Precedence
- If
namematches a key in[fleets.*], returns that fleet. - Returns
FleetResolutionError::UnknownFleetwith the list of available fleet names so the user can correct the reference.
To access the global default fleet use config.fleet directly.
§Errors
Returns FleetResolutionError::UnknownFleet if name is not defined.
Sourcepub fn resolve_fleet_for_operator(
&self,
operator: &str,
) -> Result<(&str, &NamedFleetConfigToml), FleetResolutionError>
pub fn resolve_fleet_for_operator( &self, operator: &str, ) -> Result<(&str, &NamedFleetConfigToml), FleetResolutionError>
Resolve the unique Fleet owned by operator (#5039).
§Precedence
- Collects every
[fleets.*]entry whoseoperatorfield matches (case-sensitive). - If exactly one fleet matches, returns it.
- If zero match, returns
FleetResolutionError::UnknownOperatorwith the list of operators that do own a fleet. - If more than one match, returns
FleetResolutionError::AmbiguousOperatorwith the fleet names so the caller can request a specific one.
§Errors
Returns FleetResolutionError::UnknownOperator or
FleetResolutionError::AmbiguousOperator on failure.
Source§impl ConfigToml
impl ConfigToml
Sourcepub fn provider_id(&self) -> &str
pub fn provider_id(&self) -> &str
Exact configured provider id, including a dynamically named custom provider selected by the TUI.
Sourcepub fn named_custom_provider_id(&self) -> Option<&str>
pub fn named_custom_provider_id(&self) -> Option<&str>
Return the exact id only when the root selection names a dynamic custom
provider rather than the legacy literal custom route.
Sourcepub fn merge_project_overrides(&mut self, project: ConfigToml)
pub fn merge_project_overrides(&mut self, project: ConfigToml)
Merge safe project-level overrides from $WORKSPACE/.codewhale/config.toml
or legacy $WORKSPACE/.deepseek/config.toml.
Repo-local config is untrusted input. This helper intentionally ignores credentials, endpoints, provider selection, auth/session values, telemetry, network policy, skill registry, LSP command tables, and unknown extras. Approval and sandbox values may only tighten the existing user/global posture.
pub fn get_value(&self, key: &str) -> Option<String>
Sourcepub fn get_raw_string(&self, key: &str) -> Option<&str>
pub fn get_raw_string(&self, key: &str) -> Option<&str>
The unquoted contents of an extras key that holds a TOML string.
ConfigToml::get_value renders extras through toml::Value::to_string,
which re-applies TOML quoting — and switches to a single-quoted literal
string whenever the payload contains a ". A JSON blob written with
ConfigToml::set_value therefore comes back as '[{"a":1}]' and no
longer parses as JSON (#4727). Callers that stored structured text want
the payload, not its TOML rendering.
pub fn get_display_value(&self, key: &str) -> Option<String>
pub fn stream_chunk_timeout_secs(&self) -> u64
pub fn set_value(&mut self, key: &str, value: &str) -> Result<()>
pub fn unset_value(&mut self, key: &str) -> Result<()>
pub fn list_values(&self) -> BTreeMap<String, String>
Sourcepub fn resolve_runtime_options(
&self,
cli: &CliRuntimeOverrides,
) -> ResolvedRuntimeOptions
pub fn resolve_runtime_options( &self, cli: &CliRuntimeOverrides, ) -> ResolvedRuntimeOptions
Resolve runtime options without touching platform credential stores.
This method keeps library callers prompt-free: CLI flag → config file
→ environment. Call resolve_runtime_options_with_secrets when a
user-facing dispatcher should recover credentials from the configured
secret store.
Sourcepub fn resolve_runtime_options_with_secrets(
&self,
cli: &CliRuntimeOverrides,
secrets: &Secrets,
) -> ResolvedRuntimeOptions
pub fn resolve_runtime_options_with_secrets( &self, cli: &CliRuntimeOverrides, secrets: &Secrets, ) -> ResolvedRuntimeOptions
Resolve runtime options using an explicit secrets façade.
API-key precedence is CLI flag → config-file → secret store → environment.
Trait Implementations§
Source§impl Clone for ConfigToml
impl Clone for ConfigToml
Source§fn clone(&self) -> ConfigToml
fn clone(&self) -> ConfigToml
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more