pub struct HarnessConfig {
pub schema_version: u32,
pub extends: Option<String>,
pub core: CoreSection,
pub capabilities: BTreeMap<String, CapabilityConfig>,
pub experimental: Map<String, Value>,
}Expand description
The top-level schema (§3.1): one TOML/JSON document that fully determines the harness’s shape (§3.0: “Everything the harness does is a function of the resolved file”).
Fields§
§schema_version: u32Schema version; 1 is the only version P1 understands.
extends: Option<String>Built-in preset name, or (user/global layer only, §3.3) a file path. Parsed but NOT resolved in P1 — preset resolution is §3.5 / P2.
core: CoreSection[core] — obligation knobs (§1). Per §3.0, the region is always
present in a resolved config even when every knob inside it is
defaulted; #[serde(default)] gives an absent [core] table the
same all-defaulted shape.
capabilities: BTreeMap<String, CapabilityConfig>[capabilities.*] — the §2 modules, keyed by capability name.
Parsed (the surface) but not consumed (the runtime) in P1 — see the
module doc comment.
experimental: Map<String, Value>[experimental] — obligation 8 feature flags, staged gates not yet
promoted to [core]. Untyped: P1 only carries the table through.
LOW-1 (P3 review): a project-layer file may never set ANY key in
this table — sanitize_for_project strips it whole, since future
flags added here aren’t guaranteed narrowing-only the way
module_registry is today. User/global layer only.
Implementations§
Source§impl HarnessConfig
impl HarnessConfig
Sourcepub fn from_toml_str(s: &str) -> Result<Self, HarnessConfigError>
pub fn from_toml_str(s: &str) -> Result<Self, HarnessConfigError>
Parse from TOML text — the CLI’s format (.supercode.toml /
config.toml).
Sourcepub fn from_json_str(s: &str) -> Result<Self, HarnessConfigError>
pub fn from_json_str(s: &str) -> Result<Self, HarnessConfigError>
Parse from JSON text — the SDK mirror (§3.0).
Sourcepub fn to_config_profile(&self) -> ConfigProfile
pub fn to_config_profile(&self) -> ConfigProfile
Resolve the [core] region (§3.1) into a ConfigProfile — the
same per-key overlay type ConfigBuilder::apply_profile already
knows how to fold (§3.3: scalars replace, tables merge, arrays
replace). [capabilities.*] is deliberately NOT read here (P1 scope:
module settings are P3 consumption); extends is deliberately NOT
followed (P2: preset resolution, §3.5).
Sourcepub fn resolve_core(&self) -> Config
pub fn resolve_core(&self) -> Config
Resolve straight into a Config via
ConfigBuilder::apply_profile — a convenience for embedders/tests
that don’t need the intermediate profile. Ignores extends (P2) and
every [capabilities.*] module (P3+); P1 is the [core] config
surface only (design §5.2).
Sourcepub fn overlay(&self, over: &HarnessConfig) -> HarnessConfig
pub fn overlay(&self, over: &HarnessConfig) -> HarnessConfig
§3.3 overlay: over wins wherever it sets a value. Scalars replace,
tables merge key-wise (recursively for [capabilities.*] settings),
arrays replace wholesale — the same semantics
ConfigBuilder::apply_profile already uses for the [core]
region, generalized here to the whole HarnessConfig (§3.5 step 3’s
“fold the chain … with the §3.3 overlay semantics”).
Trait Implementations§
Source§impl Clone for HarnessConfig
impl Clone for HarnessConfig
Source§fn clone(&self) -> HarnessConfig
fn clone(&self) -> HarnessConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more