pub struct KernelPolicy {
pub adapter_id: Option<String>,
pub recall_enabled: bool,
pub recall_max_candidates: usize,
pub recall_min_score: f32,
pub seed: Option<u64>,
pub requires_human: bool,
pub required_truths: Vec<String>,
}Expand description
Policy controlling kernel behavior.
This is the policy contract from the platform/runtime to the kernel. It controls adapter selection, recall behavior, determinism, and human gates.
§Axiom: Explicit Authority
Adapter selection comes from KernelPolicy, not emergent kernel behavior.
This ensures the platform maintains control over which capabilities are used.
Fields§
§adapter_id: Option<String>Which adapter to use (explicit authority from outside)
recall_enabled: boolWhether recall is enabled for this run
recall_max_candidates: usizeMaximum recall candidates to consider
recall_min_score: f32Minimum relevance score for recall results
seed: Option<u64>Seed for deterministic execution (None = random)
requires_human: boolWhether proposals from this run require human approval
required_truths: Vec<String>Truth targets that must pass for auto-promotion
Implementations§
Source§impl KernelPolicy
impl KernelPolicy
Sourcepub fn deterministic(seed: u64) -> Self
pub fn deterministic(seed: u64) -> Self
Create a deterministic policy with a fixed seed.
Sourcepub fn with_adapter(self, adapter_id: impl Into<String>) -> Self
pub fn with_adapter(self, adapter_id: impl Into<String>) -> Self
Set the adapter to use.
Sourcepub fn with_recall(self, enabled: bool) -> Self
pub fn with_recall(self, enabled: bool) -> Self
Enable or disable recall.
Sourcepub fn with_human_required(self) -> Self
pub fn with_human_required(self) -> Self
Mark proposals as requiring human approval.
Sourcepub fn with_required_truth(self, truth: impl Into<String>) -> Self
pub fn with_required_truth(self, truth: impl Into<String>) -> Self
Add a required truth for auto-promotion.
Trait Implementations§
Source§impl Clone for KernelPolicy
impl Clone for KernelPolicy
Source§fn clone(&self) -> KernelPolicy
fn clone(&self) -> KernelPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more