pub trait Scorer: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn score(
&self,
cmd: &ProposedCommand,
class: Class,
rule: &str,
) -> ModelOutput;
}Expand description
A Tier-2 scorer. Kept warm in the daemon and shared across requests.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
A stable identifier for the backend ("heuristic", "llama:qwen2.5-3b", …).
Sourcefn score(&self, cmd: &ProposedCommand, class: Class, rule: &str) -> ModelOutput
fn score(&self, cmd: &ProposedCommand, class: Class, rule: &str) -> ModelOutput
Explain and score a command. rule is the Tier-1 rule id that fired, used
for a faithful summary. The score is only consulted for the ambiguous band.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".