Skip to main content

Gate4AgentKernel

Struct Gate4AgentKernel 

Source
pub struct Gate4AgentKernel { /* private fields */ }
Expand description

Owns the provider catalog and the single session-state writer.

Phase order is fixed: clock advance, ordered ingress, control observations, tool observations, effect/completion drains, atomic snapshot, then ordered event drain. No phase awaits or performs external work. The kernel is intentionally not cloneable: cloning would fork provider binding and sequence authority while preserving otherwise valid runtime identities.

Implementations§

Source§

impl Gate4AgentKernel

Source

pub fn new(catalog: AgentRegistry) -> Self

Source

pub fn with_tool_providers( catalog: AgentRegistry, providers: impl IntoIterator<Item = CapabilityProviderDescriptor>, ) -> Result<Self, ToolEngineError>

Source

pub fn with_builtin_catalog() -> Self

Source

pub fn step( &mut self, commands: impl IntoIterator<Item = CommandEnvelope>, observations: impl IntoIterator<Item = ObservationEnvelope>, ) -> KernelStep

Source

pub fn step_control_plane( &mut self, ingress: impl IntoIterator<Item = BackendIngress>, control_observations: impl IntoIterator<Item = ObservationEnvelope>, ) -> KernelStep

Reduces one backend tick without performing external work.

The phase order is fixed: advance the kernel-owned logical clock; reduce ordered control/tool ingress; reduce control observations while synchronizing the affected tool instance after every observation; reduce provider-bound tool observations; then drain effects, completions, snapshots, and events. A tool integration failure blocks tool ingress and effect release for the rest of the tick.

Source

pub fn snapshot(&self) -> ControlSnapshot

Source

pub fn tool_snapshot(&self) -> ToolEngineSnapshot

Source

pub fn backend_snapshot(&self) -> BackendSnapshot

Source

pub fn catalog(&self) -> &AgentRegistry

Trait Implementations§

Source§

impl Debug for Gate4AgentKernel

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Gate4AgentKernel

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.