pub struct CoreSection {Show 47 fields
pub model: Option<String>,
pub base_url: Option<String>,
pub api_key_env: Option<String>,
pub api_key_cmd: Option<String>,
pub api_key_command: Option<Vec<String>>,
pub update_check: Option<bool>,
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 max_budget_usd: Option<f64>,
pub max_steps: Option<usize>,
pub price_input_per_mtok: Option<f64>,
pub price_output_per_mtok: Option<f64>,
pub parallel_tool_calls: Option<bool>,
pub tool_output_spill: 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 project_doc_excludes: Option<Vec<String>>,
pub project_doc_strip_comments: Option<bool>,
pub file_mentions: Option<bool>,
pub output_style: Option<String>,
pub path_rules: Option<bool>,
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.
api_key_command: Option<Vec<String>>BP-9 (D6 row “Credential helpers / keyring”, cx§6 auth{command},
cc§6 apiKeyHelper): an ARGV credential helper — the program is
exec’d directly with the remaining entries as arguments, and its
stdout (trimmed) is the API key. [project-forbidden], the same
credential-redirection trust boundary as api_key_cmd.
Distinct from api_key_cmd on purpose: that one is a SHELL string
(sh -c "…", so the shell’s own quoting/expansion applies), this
one is an exec’d argv with no shell in the path — the form cx and
cc both publish, and the safe one to accept from a config file the
user typed by hand (no word-splitting surprises, no $(…)).
Consumed by Agent::new before api_key_cmd.
update_check: Option<bool>BP-9 (D6 row “Auto-update + channels”, cx§10 “startup check”):
whether the CLI performs a background “is there a newer release?”
check at startup. OPT-IN — absent/false means the CLI never
reaches the network on startup, which is today’s behavior and the
only defensible default for a tool that runs in CI and on airgapped
boxes. supercode update itself is unaffected (an explicit command
is always allowed to check).
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).
max_budget_usd: Option<f64>BP-7 (catalog §4a “Turn/budget caps”, cc’s --max-budget-usd):
Config.max_budget_usd — the SPEND cap. 0/absent = off.
max_steps: Option<usize>BP-7 (catalog §4a “Turn/budget caps”): Config.max_steps — the
STEP cap (tool calls executed), distinct from max_iterations
(model round-trips). 0/absent = off.
price_input_per_mtok: Option<f64>BP-7: Config.price_input_per_mtok — dollars per million input
tokens, overriding crate::pricing’s built-in table for this
model. Set with price_output_per_mtok or not at all.
price_output_per_mtok: Option<f64>BP-7: Config.price_output_per_mtok — dollars per million output
tokens.
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.
tool_output_spill: Option<bool>BP-2 (core.tool_output_spill, catalog:58) — see
Config::tool_output_spill’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.
project_doc_excludes: Option<Vec<String>>BP-4 (catalog:87 “Instruction-file hygiene controls”, cc§2
claudeMdExcludes, core.project_doc_excludes): glob/path patterns
naming instruction files to skip — see Config::project_doc_excludes.
project_doc_strip_comments: Option<bool>BP-4 (catalog:87, cc§2 “HTML comment stripping”,
core.project_doc_strip_comments): drop <!-- … --> spans from
instruction files before injection — see
Config::project_doc_strip_comments.
file_mentions: Option<bool>BP-5 (catalog D2 “@-file mentions / attachments”, cc§2/cx§2):
expand @path tokens in a prompt into the file’s contents — see
Config::file_mentions.
output_style: Option<String>BP-5 (catalog D2 “Output style / personality module”, cc§7/cx§2):
the named response-style layer — see Config::output_style.
path_rules: Option<bool>BP-5 (catalog D2 “Path-scoped rules”, cc§2 .claude/rules/*.md):
load rule files, paths:-scoped ones on demand — see
Config::path_rules.
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
impl Clone for CoreSection
Source§fn clone(&self) -> CoreSection
fn clone(&self) -> CoreSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more