pub struct LearningConfig {Show 43 fields
pub enabled: bool,
pub auto_activate: bool,
pub min_failures: u32,
pub improve_threshold: f64,
pub rollback_threshold: f64,
pub min_evaluations: u32,
pub max_versions: u32,
pub cooldown_minutes: u64,
pub correction_detection: bool,
pub correction_confidence_threshold: f32,
pub detector_mode: DetectorMode,
pub judge_model: String,
pub feedback_provider: ProviderName,
pub judge_adaptive_low: f32,
pub judge_adaptive_high: f32,
pub correction_recall_limit: u32,
pub correction_min_similarity: f32,
pub auto_promote_min_uses: u32,
pub auto_promote_threshold: f64,
pub auto_demote_min_uses: u32,
pub auto_demote_threshold: f64,
pub cross_session_rollout: bool,
pub min_sessions_before_promote: u32,
pub min_sessions_before_demote: u32,
pub max_auto_sections: u32,
pub domain_success_gate: bool,
pub arise_enabled: bool,
pub arise_min_tool_calls: u32,
pub arise_trace_provider: ProviderName,
pub stem_enabled: bool,
pub stem_min_occurrences: u32,
pub stem_min_success_rate: f64,
pub stem_provider: ProviderName,
pub stem_retention_days: u32,
pub stem_pattern_window_days: u32,
pub erl_enabled: bool,
pub erl_extract_provider: ProviderName,
pub erl_max_heuristics_per_skill: u32,
pub erl_dedup_threshold: f32,
pub erl_min_confidence: f64,
pub d2skill_enabled: bool,
pub d2skill_max_corrections: u32,
pub d2skill_provider: ProviderName,
}Fields§
§enabled: bool§auto_activate: bool§min_failures: u32§improve_threshold: f64§rollback_threshold: f64§min_evaluations: u32§max_versions: u32§cooldown_minutes: u64§correction_detection: bool§correction_confidence_threshold: f32§detector_mode: DetectorModeDetector strategy: “regex” (default) or “judge”.
judge_model: StringModel for the judge detector (e.g. “claude-sonnet-4-6”). Empty = use primary provider.
feedback_provider: ProviderNameProvider name from [[llm.providers]] for detector_mode = "model" (LlmClassifier).
Empty = use the primary provider. Named but not found in registry = log warning, degrade to regex-only. Never fails startup.
judge_adaptive_low: f32Regex confidence below this value is treated as “not a correction” — judge not invoked.
judge_adaptive_high: f32Regex confidence at or above this value is accepted without judge confirmation.
correction_recall_limit: u32§correction_min_similarity: f32§auto_promote_min_uses: u32§auto_promote_threshold: f64§auto_demote_min_uses: u32§auto_demote_threshold: f64§cross_session_rollout: boolWhen true, auto-promote and auto-demote decisions require the skill to have been used
across at least min_sessions_before_promote (for promotion) or
min_sessions_before_demote (for demotion) distinct conversation sessions.
Prevents trust transitions from a single long session.
min_sessions_before_promote: u32Minimum number of distinct conversation_id values in skill_outcomes before
auto-promotion is eligible. Only checked when cross_session_rollout = true.
min_sessions_before_demote: u32Minimum distinct sessions before auto-demotion when cross_session_rollout = true.
Default 1 (demotion can happen after a single bad session by default). Separate from
min_sessions_before_promote because demotion should be fast (low threshold) while
promotion benefits from conservative validation (higher threshold).
max_auto_sections: u32Maximum number of top-level content sections (markdown H2 headers) allowed in
auto-generated skill bodies. Bodies exceeding this limit are rejected by
validate_body_sections().
domain_success_gate: boolWhen true, auto-generated skill versions must pass a domain-conditioned evaluation before promotion. If the improved body drifts from the original skill’s domain, activation is skipped (the version is still saved for manual review).
arise_enabled: boolEnable ARISE trace-based skill improvement (disabled by default).
arise_min_tool_calls: u32Minimum tool calls in a turn to trigger ARISE trace improvement.
arise_trace_provider: ProviderNameProvider name from [[llm.providers]] for ARISE trace summarization.
Empty = fall back to primary provider.
stem_enabled: boolEnable STEM automatic tool pattern detection and skill generation (disabled by default).
stem_min_occurrences: u32Minimum occurrences of a tool sequence before generating a skill candidate.
stem_min_success_rate: f64Minimum success rate of the pattern before generating a skill candidate.
stem_provider: ProviderNameProvider name from [[llm.providers]] for STEM skill generation.
Empty = fall back to primary provider.
stem_retention_days: u32Days to retain rows in skill_usage_log before pruning.
stem_pattern_window_days: u32Window in days for pattern detection queries (limits scan cost on large tables).
erl_enabled: boolEnable ERL post-task heuristic extraction (disabled by default).
erl_extract_provider: ProviderNameProvider name from [[llm.providers]] for ERL heuristic extraction.
Empty = fall back to primary provider.
erl_max_heuristics_per_skill: u32Maximum heuristics prepended per skill at match time.
erl_dedup_threshold: f32Text similarity threshold (Jaccard) for heuristic deduplication.
When exact text match exceeds this, increment use_count instead of inserting.
erl_min_confidence: f64Minimum confidence to include a heuristic at match time.
d2skill_enabled: boolEnable D2Skill step-level error correction (disabled by default).
Requires arise_enabled = true to populate corrections from ARISE traces.
If d2skill_enabled = true and arise_enabled = false, existing corrections
are still applied but no new ones are generated via ARISE.
d2skill_max_corrections: u32Maximum corrections to inject per failure event.
d2skill_provider: ProviderNameProvider name from [[llm.providers]] for correction extraction from ARISE traces.
Empty = fall back to primary provider.
Trait Implementations§
Source§impl Clone for LearningConfig
impl Clone for LearningConfig
Source§fn clone(&self) -> LearningConfig
fn clone(&self) -> LearningConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LearningConfig
impl Debug for LearningConfig
Source§impl Default for LearningConfig
impl Default for LearningConfig
Source§impl<'de> Deserialize<'de> for LearningConfig
impl<'de> Deserialize<'de> for LearningConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LearningConfig
impl RefUnwindSafe for LearningConfig
impl Send for LearningConfig
impl Sync for LearningConfig
impl Unpin for LearningConfig
impl UnsafeUnpin for LearningConfig
impl UnwindSafe for LearningConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request