Skip to main content

ConfigProfile

Struct ConfigProfile 

Source
pub struct ConfigProfile {
Show 57 fields pub model: Option<String>, pub base_url: Option<String>, pub api_key_env: Option<String>, pub api_key_cmd: Option<String>, pub system_prompt: Option<String>, pub append_system_prompt: Option<String>, pub temperature: Option<f32>, pub max_tokens: Option<u32>, pub effort: Option<String>, pub sandbox: Option<String>, pub approval: Option<String>, pub project_context: Option<bool>, pub max_iterations: Option<usize>, pub additional_dirs: Option<Vec<String>>, pub compact_after_messages: Option<usize>, pub cache_plan: Option<String>, pub tool_advertising: Option<String>, pub tool_advertising_core: Option<Vec<String>>, pub schema_tier: Option<String>, pub auto_approved_tools: Option<Vec<String>>, pub tool_deny_patterns: Option<Vec<String>>, pub tool_allow_patterns: Option<Vec<String>>, pub extra_headers: Option<HashMap<String, String>>, pub extra_body: Option<Map<String, Value>>, pub max_tool_output_bytes: Option<usize>, pub max_total_output_tokens: Option<u64>, pub prompts: Option<HashMap<String, String>>, pub tool_overrides: Option<HashMap<String, ToolOverrideProfile>>, pub env_context: Option<bool>, pub project_root_markers: Option<Vec<String>>, pub project_doc_max_bytes: Option<usize>, pub instruction_imports: Option<bool>, pub retry_enabled: Option<bool>, pub retry_max_retries: Option<u32>, pub retry_base_delay_ms: Option<u64>, pub compaction_reserve_tokens: Option<u64>, pub compaction_keep_recent_tokens: Option<u64>, pub compaction_focus_instructions: Option<String>, pub auto_title: Option<bool>, pub steering_mode: Option<String>, pub follow_up_mode: Option<String>, pub read_file_multimodal: Option<bool>, pub edit_file_require_read_before_edit: Option<bool>, pub edit_file_notebook_aware: Option<bool>, pub shell_env_snapshot: Option<bool>, pub doom_loop_threshold: Option<u32>, pub nested_instructions: Option<bool>, pub model_switch_allow_switch: Option<bool>, pub context_injections: Option<bool>, pub compaction_enabled: Option<bool>, pub parallel_tool_calls: Option<bool>, pub session_git_metadata: Option<bool>, pub session_dir: Option<String>, pub session_persist: Option<bool>, pub session_name: Option<String>, pub session_retention_days: Option<u32>, pub session_export_format: Option<String>,
}
Expand description

The serializable subset of a Config that can live in a config file. (Callbacks/handlers are code-only and are not represented here.)

Grown from its original 9 fields to the P1 §3.2 surface (COMPOSABLE-HARNESS-DESIGN.md §5.2 “P1” migration step): every [core] scalar/table/array Config maps to lives here so it becomes file-settable for the first time, per the design’s stated framing gap (§3.0).

Fields§

§model: Option<String>

Model id.

§base_url: Option<String>

Endpoint base URL.

§api_key_env: Option<String>

Environment variable to read the API key from (§3.1 core.api_key_env; §3.2: “today absent from BOTH files”).

§api_key_cmd: Option<String>

Credential-helper command (§3.1 core.api_key_cmd, D6 row) — see Config::api_key_cmd.

§system_prompt: Option<String>

System prompt.

§append_system_prompt: Option<String>

P4 (§3.1 core.append_system_prompt, D2 row 1): an additive suffix composed onto whatever Self::system_prompt resolves to (the profile’s own value if set, else whatever the builder already had — see ConfigBuilder::apply_profile’s composition order), distinct from REPLACING it. [project-forbidden], same trust boundary as system_prompt (§3.3: prompt injection).

§temperature: Option<f32>

Sampling temperature.

§max_tokens: Option<u32>

Output token cap per request.

§effort: Option<String>

Reasoning/effort level.

§sandbox: Option<String>

Sandbox policy: read_only | workspace_write | danger_full_access.

§approval: Option<String>

Approval policy: never | on_request | untrusted.

§project_context: Option<bool>

Auto-load CLAUDE.md / AGENTS.md.

§max_iterations: Option<usize>

Per-send iteration budget (§3.1 core.max_iterations).

§additional_dirs: Option<Vec<String>>

Extra roots beyond cwd (§3.1 core.additional_dirs); arrays replace wholesale on overlay (§3.3).

§compact_after_messages: Option<usize>

Compact once the conversation exceeds this many messages (§3.1 core.compaction.after_messages; 0 = trigger off).

§cache_plan: Option<String>

Prompt-caching plan: off | imported_prefix (§3.1 capabilities.cache.plan).

§tool_advertising: Option<String>

How tools are advertised: full | deferred (§3.1 capabilities.deferred_tools).

§tool_advertising_core: Option<Vec<String>>

The eagerly-advertised core allowlist when tool_advertising = "deferred" (§3.1 capabilities.deferred_tools.core); arrays replace.

§schema_tier: Option<String>

Global tool-schema tier: full | medium | minimal (§3.1 core.tools.schema_tier).

§auto_approved_tools: Option<Vec<String>>

Tools that never require approval under ApprovalPolicy::OnRequest (§3.1 capabilities.permissions.auto_approved_tools); arrays replace.

§tool_deny_patterns: Option<Vec<String>>

P4: deny-pattern generalization of auto_approved_tools (§3.1 capabilities.permissions.rules.deny) — see Config::tool_deny_patterns. Arrays replace.

§tool_allow_patterns: Option<Vec<String>>

P4: allow-pattern generalization of auto_approved_tools (§3.1 capabilities.permissions.rules.allow) — see Config::tool_allow_patterns. Arrays replace.

§extra_headers: Option<HashMap<String, String>>

Extra HTTP headers merged in (§3.1 core.extra_headers); a table, merged key-wise on overlay (§3.3).

§extra_body: Option<Map<String, Value>>

Extra request-body fields merged in (§3.1 core.extra_body); a table, merged key-wise on overlay (§3.3).

§max_tool_output_bytes: Option<usize>

Max bytes of a single tool result (§3.1 core.max_tool_output_bytes).

§max_total_output_tokens: Option<u64>

Cap on cumulative output tokens per send loop (§3.1 core.max_total_output_tokens).

§prompts: Option<HashMap<String, String>>

Named prompt templates (§3.1 [core.prompts]); a table, merged key-wise (new/overridden names layer onto the built-ins, they don’t wholesale-replace them).

§tool_overrides: Option<HashMap<String, ToolOverrideProfile>>

Per-tool enable/disable + description/schema-tier overrides, keyed by tool name (§3.1 [core.tools.<name>], §3.2 “today in no file”); a table, merged key-wise per tool.

§env_context: Option<bool>

P4b (S3.1 core.env_context) – see Config::env_context.

§project_root_markers: Option<Vec<String>>

P4b (S3.1 core.project_root_markers) – see Config::project_root_markers; arrays replace.

§project_doc_max_bytes: Option<usize>

P4b (S3.1 core.project_doc_max_bytes) – see Config::project_doc_max_bytes.

§instruction_imports: Option<bool>

P4b (S3.1 core.instruction_imports) – see Config::instruction_imports.

§retry_enabled: Option<bool>

P4b (S3.1 core.retry.enabled) – see Config::retry_enabled.

§retry_max_retries: Option<u32>

P4b (S3.1 core.retry.max_retries) – see Config::retry_max_retries.

§retry_base_delay_ms: Option<u64>

P4b (S3.1 core.retry.base_delay_ms) – see Config::retry_base_delay_ms.

§compaction_reserve_tokens: Option<u64>

P4b (S3.1 core.compaction.reserve_tokens) – see Config::compaction_reserve_tokens.

§compaction_keep_recent_tokens: Option<u64>

P4b (S3.1 core.compaction.keep_recent_tokens) – see Config::compaction_keep_recent_tokens.

§compaction_focus_instructions: Option<String>

P4b (S3.1 core.compaction.focus_instructions) – see Config::compaction_focus_instructions.

§auto_title: Option<bool>

P4b (S3.1 core.session.auto_title) – see Config::auto_title.

§steering_mode: Option<String>

P4b (S3.1 core.steering.steering_mode) – see Config::steering_mode.

§follow_up_mode: Option<String>

P4b (S3.1 core.steering.follow_up_mode) – see Config::follow_up_mode.

§read_file_multimodal: Option<bool>

P4c (S3.1 core.tools.read_file.multimodal) – see Config::read_file_multimodal.

§edit_file_require_read_before_edit: Option<bool>

P4c (S3.1 core.tools.edit_file.require_read_before_edit) – see Config::edit_file_require_read_before_edit.

§edit_file_notebook_aware: Option<bool>

P4c (S3.1 core.tools.edit_file.notebook_aware) – see Config::edit_file_notebook_aware.

§shell_env_snapshot: Option<bool>

P4c (S3.1 core.shell_env_snapshot) – see Config::shell_env_snapshot.

§doom_loop_threshold: Option<u32>

P4c (S3.1 core.doom_loop_threshold) – see Config::doom_loop_threshold.

§nested_instructions: Option<bool>

P4c (S3.1 core.nested_instructions) – see Config::nested_instructions.

§model_switch_allow_switch: Option<bool>

P4c (S3.1 core.model_switch.allow_switch) – see Config::model_switch_allow_switch.

§context_injections: Option<bool>

P4e (S3.1 core.context_injections) – see Config::context_injections. Only the boolean gate is file/profile-settable; Config::context_injection_blocks’ actual content is code-only (see its doc comment).

§compaction_enabled: Option<bool>

P4e (S3.1 core.compaction.enabled) – see Config::compaction_enabled.

§parallel_tool_calls: Option<bool>

P4e (S3.1 core.parallel_tool_calls) – see Config::parallel_tool_calls.

§session_git_metadata: Option<bool>

P4e (S3.1 core.session.git_metadata) – see Config::session_git_metadata.

§session_dir: Option<String>

P4e (S3.1 core.session.dir) – see Config::session_dir.

§session_persist: Option<bool>

P4e (S3.1 core.session.persist) – see Config::session_persist.

§session_name: Option<String>

P4e (S3.1 core.session.name) – see Config::session_name.

§session_retention_days: Option<u32>

P4e (S3.1 core.session.retention_days) – see Config::session_retention_days.

§session_export_format: Option<String>

P4e (S3.1 core.session.export_format) – see Config::session_export_format. "text" | "html"; an unrecognized string is a no-op warning, like steering_mode.

Trait Implementations§

Source§

impl Clone for ConfigProfile

Source§

fn clone(&self) -> ConfigProfile

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConfigProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConfigProfile

Source§

fn default() -> ConfigProfile

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ConfigProfile

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more