pub struct KernelConfig {Show 16 fields
pub state_path: Option<String>,
pub autosave: bool,
pub auto_checkpoint_on_patch: bool,
pub error_threshold: f64,
pub min_steps_between_patches: u64,
pub max_risk: f64,
pub default_goal: Option<String>,
pub intervention: InterventionPolicy,
pub self_modify_enabled: bool,
pub l1_shadow_mode: bool,
pub dump_trajectory: bool,
pub privacy: PrivacyConfig,
pub bandit: BanditConfig,
pub l2: L2Config,
pub layers: LayerSwitches,
pub policy_schema: Option<PolicySchema>,
}std only.Expand description
Serializable product config (omega.toml).
Fields§
§state_path: Option<String>Path for state.json (relative or absolute).
autosave: boolWhether autosave is enabled or active.
auto_checkpoint_on_patch: boolWhether auto checkpoint on patch is enabled or active.
error_threshold: f64L1 reflector: mean-error threshold that can trigger a patch.
min_steps_between_patches: u64L1 reflector: minimum steps between accepted patches.
max_risk: f64L0 constraint: max_risk used in decision scoring.
default_goal: Option<String>Optional initial goal string for CLI convenience (not enforced by Kernel).
intervention: InterventionPolicyOptional strategy-governance policy (friction + domain mode).
self_modify_enabled: boolMaster switch for autonomous cognitive code / rule evolution (L1 patches). Default false — self-modification only when explicitly enabled.
l1_shadow_mode: boolWhether L1 shadow mode is enabled or active.
dump_trajectory: boolIf true, every step appends a full trajectory record to trajectory.jsonl beside the state file. Default true for auditability.
privacy: PrivacyConfigOptional privacy controls for user-provided text persisted to disk.
bandit: BanditConfigHysteresis and consequence costs for UCB-backed bandit decisions.
l2: L2ConfigResident L2 controller. Monitoring is always on; bounded interventions
are enabled by default and can be disabled with l2.enabled = false.
layers: LayerSwitchesLayers for this value.
policy_schema: Option<PolicySchema>Optional policy schema.
Implementations§
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn resolved_state_path(&self) -> PathBuf
pub fn resolved_state_path(&self) -> PathBuf
Returns the configured state path, or the crate’s default path when none is set.
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn with_policy_schema(self, schema: PolicySchema) -> Self
pub fn with_policy_schema(self, schema: PolicySchema) -> Self
Sets the schema used to initialize and validate named policy parameters.
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn with_loop_preset(self, preset: LoopPreset) -> Self
pub fn with_loop_preset(self, preset: LoopPreset) -> Self
Creates or updates a value with loop preset.
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn effective_switches(&self) -> LayerSwitches
pub fn effective_switches(&self) -> LayerSwitches
Returns the effective settings after applying defaults and safety gates.