Skip to main content

CoreSection

Struct CoreSection 

Source
pub struct CoreSection {
Show 35 fields pub model: Option<String>, pub base_url: Option<String>, pub api_key_env: Option<String>, pub api_key_cmd: Option<String>, pub effort: Option<String>, pub temperature: Option<f32>, pub max_tokens: Option<u32>, pub max_iterations: Option<usize>, pub max_total_output_tokens: Option<u64>, pub max_tool_output_bytes: Option<usize>, pub parallel_tool_calls: Option<bool>, pub shell_env_snapshot: Option<bool>, pub system_prompt: Option<String>, pub append_system_prompt: Option<String>, pub project_context: Option<bool>, pub env_context: Option<bool>, pub context_injections: Option<bool>, pub nested_instructions: Option<bool>, pub instruction_imports: Option<bool>, pub project_root_markers: Option<Vec<String>>, pub hot_reload: Option<bool>, pub project_doc_max_bytes: Option<usize>, pub additional_dirs: Option<Vec<String>>, pub extra_headers: Option<HashMap<String, String>>, pub extra_body: Option<Map<String, Value>>, pub doom_loop_threshold: Option<u32>, pub model_switch: CoreModelSwitchConfig, pub retry: CoreRetryConfig, pub tools: CoreToolsConfig, pub skills: CoreSkillsConfig, pub prompts: BTreeMap<String, String>, pub compaction: CoreCompactionConfig, pub session: CoreSessionConfig, pub steering: CoreSteeringConfig, pub output: CoreOutputConfig,
}
Expand description

[core] (§3.1 lines 581-609 + the named subtables that follow).

Fields§

§model: Option<String>

Config.model (config.rs).

§base_url: Option<String>

Config.base_url (config.rs). [project-forbidden] (§3.3).

§api_key_env: Option<String>

Config.api_key_env (config.rs). [project-forbidden] (§3.3).

§api_key_cmd: Option<String>

NEW: credential helper (!command form, pi§6 / D6 row). [project-forbidden]. P4: consumed by the CLI’s credential resolution (userconfig::resolve_api_key) — captured, not yet wired.

§effort: Option<String>

Config.effort (config.rs).

§temperature: Option<f32>

Config.temperature (config.rs).

§max_tokens: Option<u32>

Config.max_tokens (config.rs).

§max_iterations: Option<usize>

Config.max_iterations (config.rs).

§max_total_output_tokens: Option<u64>

Config.max_total_output_tokens (config.rs); 0/absent = off.

§max_tool_output_bytes: Option<usize>

Config.max_tool_output_bytes (config.rs).

§parallel_tool_calls: Option<bool>

NEW: universal parallel tool-call execution (catalog:59). P4e: consumed by Agent::run_tools_concurrently — see Config::parallel_tool_calls’s doc comment.

§shell_env_snapshot: Option<bool>

NEW: shell-env snapshotting (catalog:338). P3/P4: consumed by the bash tool module.

§system_prompt: Option<String>

Config.system_prompt (config.rs). [project-forbidden] (§3.3).

§append_system_prompt: Option<String>

NEW: append lever (D2 row 1). [project-forbidden]. P4: consumed by prompt assembly, alongside system_prompt.

§project_context: Option<bool>

Config.load_project_context (config.rs).

§env_context: Option<bool>

NEW: environment block (catalog §4a). P4: consumed by prompt assembly.

§context_injections: Option<bool>

NEW: synthetic nudge blocks (catalog:91). P4: consumed by prompt assembly.

§nested_instructions: Option<bool>

NEW: on-demand subdir instruction loading (catalog:84). P4: consumed by the skills/instructions subsystem.

§instruction_imports: Option<bool>

NEW: @path / instructions[] imports (catalog:85). P4: consumed by the skills/instructions subsystem.

§project_root_markers: Option<Vec<String>>

NEW: directory-walk stop markers (catalog:232). P4: consumed by project-context discovery.

§hot_reload: Option<bool>

NEW: live-apply config edits (catalog:221). ASPIRATIONAL / UNIMPLEMENTED (P4e assessment): a genuine config-file-watch + live-reload subsystem — detecting the resolved file changing on disk, re-resolving the full extends/layering chain, and safely swapping a live Agent’s Config mid-run without corrupting in-flight state — is M+ (an architecturally significant addition per catalog:221’s “COMMON row” classification, not a small runtime gap), not the S-sized “NEW: small” a config-plumbing-only key would be. This field parses and round-trips through every merge/overlay step (so a config file setting it is never silently dropped or misinterpreted) but has NO consumer: setting it does nothing. Needs explicit scheduling as its own unit (P5+), not a half-built watcher here.

§project_doc_max_bytes: Option<usize>

P4b (design §5.2 “P4” “instruction-walk nuances”, cx§2 project_doc_max_bytes analog, §3.1 core.project_doc_max_bytes): hygiene cap on the total bytes of assembled instruction-file content — see Config::project_doc_max_bytes. Consumed by prompt assembly.

§additional_dirs: Option<Vec<String>>

Config.additional_dirs (config.rs). Project files may only ADD under the repo root (§3.3) — enforced by sanitize_for_project’s is_safe_project_dir check (LOW-1, Fable-5 P4a review), which strips absolute/~/..-escaping/${VAR}-expanding entries from a project layer before this is expanded (to_config_profile). User/global layers are unrestricted.

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

Config.extra_headers (config.rs). [project-forbidden]: exfil channel (§3.3).

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

Config.extra_body (config.rs). [project-forbidden] (§3.3).

§doom_loop_threshold: Option<u32>

P4c (design §5.2 “P4”, §5.2 P4 “doom-loop breaker”, oc doom_loop UNIQUE row, catalog D3): repeated-identical-tool-call threshold — see Config::doom_loop_threshold. None/absent = off (today’s behavior).

§model_switch: CoreModelSwitchConfig

[core.model_switch] — see the module-level doc comment on the [core.model] naming conflict.

§retry: CoreRetryConfig

[core.retry] (obligation 1; pi§3 naming).

§tools: CoreToolsConfig

[core.tools] — registry shaping.

§skills: CoreSkillsConfig

[core.skills] (obligation 4, D-7).

§prompts: BTreeMap<String, String>

[core.prompts] — maps directly onto Config.prompts (config.rs); a table merged key-wise onto the built-ins, not a wholesale replace (§3.3), via ConfigBuilder::apply_profile.

§compaction: CoreCompactionConfig

[core.compaction] (obligation 5).

§session: CoreSessionConfig

[core.session] (obligation 6).

§steering: CoreSteeringConfig

[core.steering] (obligation 7; pi§3 semantics).

§output: CoreOutputConfig

[core.output] (obligation 9).

Trait Implementations§

Source§

impl Clone for CoreSection

Source§

fn clone(&self) -> CoreSection

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 CoreSection

Source§

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

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

impl Default for CoreSection

Source§

fn default() -> CoreSection

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

impl<'de> Deserialize<'de> for CoreSection

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CoreSection

Source§

fn eq(&self, other: &CoreSection) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CoreSection

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CoreSection

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