Skip to main content

EvoKernel

Struct EvoKernel 

Source
pub struct EvoKernel<S: KernelState> {
    pub kernel: Arc<Kernel<S>>,
    pub sandbox: Arc<dyn Sandbox>,
    pub validator: Arc<dyn Validator>,
    pub store: Arc<dyn EvolutionStore>,
    pub selector: Arc<dyn Selector>,
    pub governor: Arc<dyn Governor>,
    pub economics: Arc<Mutex<EvuLedger>>,
    pub remote_publishers: Arc<Mutex<BTreeMap<String, String>>>,
    pub stake_policy: StakePolicy,
    pub sandbox_policy: SandboxPolicy,
    pub validation_plan: ValidationPlan,
}

Fields§

§kernel: Arc<Kernel<S>>§sandbox: Arc<dyn Sandbox>§validator: Arc<dyn Validator>§store: Arc<dyn EvolutionStore>§selector: Arc<dyn Selector>§governor: Arc<dyn Governor>§economics: Arc<Mutex<EvuLedger>>§remote_publishers: Arc<Mutex<BTreeMap<String, String>>>§stake_policy: StakePolicy§sandbox_policy: SandboxPolicy§validation_plan: ValidationPlan

Implementations§

Source§

impl<S: KernelState> EvoKernel<S>

Source

pub fn new( kernel: Arc<Kernel<S>>, sandbox: Arc<dyn Sandbox>, validator: Arc<dyn Validator>, store: Arc<dyn EvolutionStore>, ) -> Self

Source

pub fn with_selector(self, selector: Arc<dyn Selector>) -> Self

Source

pub fn with_sandbox_policy(self, policy: SandboxPolicy) -> Self

Source

pub fn with_governor(self, governor: Arc<dyn Governor>) -> Self

Source

pub fn with_economics(self, economics: Arc<Mutex<EvuLedger>>) -> Self

Source

pub fn with_stake_policy(self, policy: StakePolicy) -> Self

Source

pub fn with_validation_plan(self, plan: ValidationPlan) -> Self

Source

pub fn select_candidates(&self, input: &SelectorInput) -> Vec<GeneCandidate>

Source

pub fn bootstrap_if_empty( &self, run_id: &RunId, ) -> Result<BootstrapReport, EvoKernelError>

Source

pub async fn capture_successful_mutation( &self, run_id: &RunId, mutation: PreparedMutation, ) -> Result<Capsule, EvoKernelError>

Source

pub async fn capture_mutation_with_governor( &self, run_id: &RunId, mutation: PreparedMutation, ) -> Result<CaptureOutcome, EvoKernelError>

Source

pub async fn capture_from_proposal( &self, run_id: &RunId, proposal: &AgentMutationProposal, diff_payload: String, base_revision: Option<String>, ) -> Result<CaptureOutcome, EvoKernelError>

Source

pub fn feedback_for_agent(outcome: &CaptureOutcome) -> ExecutionFeedback

Source

pub fn replay_feedback_for_agent( signals: &[String], decision: &ReplayDecision, ) -> ReplayFeedback

Source

pub async fn run_supervised_devloop( &self, run_id: &RunId, request: &SupervisedDevloopRequest, diff_payload: String, base_revision: Option<String>, ) -> Result<SupervisedDevloopOutcome, EvoKernelError>

Source

pub fn coordinate(&self, plan: CoordinationPlan) -> CoordinationResult

Source

pub fn export_promoted_assets( &self, sender_id: impl Into<String>, ) -> Result<EvolutionEnvelope, EvoKernelError>

Source

pub fn import_remote_envelope( &self, envelope: &EvolutionEnvelope, ) -> Result<ImportOutcome, EvoKernelError>

Source

pub fn fetch_assets( &self, responder_id: impl Into<String>, query: &FetchQuery, ) -> Result<FetchResponse, EvoKernelError>

Source

pub fn revoke_assets( &self, notice: &RevokeNotice, ) -> Result<RevokeNotice, EvoKernelError>

Source

pub async fn replay_or_fallback( &self, input: SelectorInput, ) -> Result<ReplayDecision, EvoKernelError>

Source

pub async fn replay_or_fallback_for_run( &self, run_id: &RunId, input: SelectorInput, ) -> Result<ReplayDecision, EvoKernelError>

Source

pub fn economics_signal(&self, node_id: &str) -> Option<EconomicsSignal>

Source

pub fn selector_reputation_bias(&self) -> BTreeMap<String, f32>

Source

pub fn metrics_snapshot( &self, ) -> Result<EvolutionMetricsSnapshot, EvoKernelError>

Source

pub fn render_metrics_prometheus(&self) -> Result<String, EvoKernelError>

Source

pub fn health_snapshot(&self) -> Result<EvolutionHealthSnapshot, EvoKernelError>

Auto Trait Implementations§

§

impl<S> Freeze for EvoKernel<S>

§

impl<S> !RefUnwindSafe for EvoKernel<S>

§

impl<S> Send for EvoKernel<S>

§

impl<S> Sync for EvoKernel<S>

§

impl<S> Unpin for EvoKernel<S>

§

impl<S> UnsafeUnpin for EvoKernel<S>

§

impl<S> !UnwindSafe for EvoKernel<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.