pub struct IntelligenceLoop { /* private fields */ }Expand description
Intelligence loop connecting differential analysis with evolutionary tuning.
Implementations§
Source§impl IntelligenceLoop
impl IntelligenceLoop
Sourcepub fn new(population_size: usize) -> Self
pub fn new(population_size: usize) -> Self
Create a new intelligence loop with the given evolution population size.
Sourcepub fn with_budget(
population_size: usize,
min_probes: usize,
budget: Budget,
) -> Self
pub fn with_budget( population_size: usize, min_probes: usize, budget: Budget, ) -> Self
Create with configurable minimum probes and budget.
Sourcepub fn generate_probes(&self) -> Vec<Probe>
pub fn generate_probes(&self) -> Vec<Probe>
Generate the full set of differential analysis probes, respecting budget.
Sourcepub fn generate_quick_probes(&self) -> Vec<Probe>
pub fn generate_quick_probes(&self) -> Vec<Probe>
Generate a minimal probe set for quick analysis.
Sourcepub fn record_probe(&mut self, probe: &Probe, was_blocked: bool)
pub fn record_probe(&mut self, probe: &Probe, was_blocked: bool)
Record a differential probe result.
Sourcepub fn differential_results(&self) -> &DifferentialResult
pub fn differential_results(&self) -> &DifferentialResult
Get the differential analysis results.
Sourcepub fn suggested_evasions(&self) -> Vec<String>
pub fn suggested_evasions(&self) -> Vec<String>
Get recommended evasion strategies based on differential analysis.
Sourcepub fn waf_report(&self) -> String
pub fn waf_report(&self) -> String
Get a human-readable report of what the WAF blocks.
Sourcepub fn next_candidate(&mut self) -> Option<(usize, &Chromosome)>
pub fn next_candidate(&mut self) -> Option<(usize, &Chromosome)>
Get the next technique combination to try from the evolution engine.
Sourcepub fn batch_candidates(&mut self, n: usize) -> Vec<(usize, Chromosome)>
pub fn batch_candidates(&mut self, n: usize) -> Vec<(usize, Chromosome)>
Request a batch of evolved candidates.
Sourcepub fn record_feedback(&mut self, chromosome_index: usize, passed: bool)
pub fn record_feedback(&mut self, chromosome_index: usize, passed: bool)
Record evolution feedback. An out-of-range chromosome_index
indicates a state-machine bug between caller and engine — log
loudly via tracing rather than swallowing the error silently.
Sourcepub fn record_verdict(
&mut self,
chromosome_index: usize,
verdict: &OracleVerdict,
)
pub fn record_verdict( &mut self, chromosome_index: usize, verdict: &OracleVerdict, )
Record rich verdict feedback. Same error semantics as
record_feedback.
Sourcepub fn best_combination(&self) -> Option<&Chromosome>
pub fn best_combination(&self) -> Option<&Chromosome>
Get the best-performing technique combination.
Sourcepub fn probes_completed(&self) -> usize
pub fn probes_completed(&self) -> usize
Number of differential probes completed.
Sourcepub fn feedback_count(&self) -> usize
pub fn feedback_count(&self) -> usize
Number of evolution feedback events recorded.
Sourcepub fn has_sufficient_data(&self) -> bool
pub fn has_sufficient_data(&self) -> bool
Check if enough probes have been completed for a meaningful analysis.
Sourcepub fn step(&mut self, feedback: Feedback) -> LoopAction
pub fn step(&mut self, feedback: Feedback) -> LoopAction
Step the state machine forward given the latest feedback.
This is the primary orchestration API. Call it repeatedly, performing the action it returns and feeding the result back as the next feedback.
Sourcepub fn suggested_delay_ms(&self) -> u64
pub fn suggested_delay_ms(&self) -> u64
Suggested delay before the next request, based on target health.
Trait Implementations§
Source§impl Clone for IntelligenceLoop
impl Clone for IntelligenceLoop
Source§fn clone(&self) -> IntelligenceLoop
fn clone(&self) -> IntelligenceLoop
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more