Skip to main content

DecisionRunnerAdapter

Struct DecisionRunnerAdapter 

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

Executes decision commands without moving policy into the runner.

Implementations§

Source§

impl DecisionRunnerAdapter

Source

pub fn new(executors: DecisionExecutorRegistry) -> Self

Creates an adapter backed by the supplied executor registry.

Source

pub fn executors(&self) -> &DecisionExecutorRegistry

Returns the configured executor registry.

Source

pub fn execution_class_for_command( &self, command: &DecisionLoopCommand, ) -> Result<DecisionExecutionClass, DecisionRunnerError>

Resolves the execution class of the executor that would run this command, using the same registry route authority as execution. Lets a host decide which resource-accounting boundary to apply before it reserves resources.

Source

pub async fn execute_command( &self, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, ) -> Result<DecisionEvidenceReceipt, DecisionRunnerError>

Resolves and executes one evidence-producing command.

The complete evidence batch is validated before it is atomically committed. Active requests capture their baseline immediately before executor invocation.

Source

pub async fn execute_command_with_limits( &self, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, limits: DecisionExecutionLimits, ) -> Result<DecisionEvidenceReceipt, DecisionRunnerError>

Resolves and executes one command under a host-owned resource allowance.

Source

pub async fn drive_command( &self, decision_loop: &DecisionLoop, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, experience: &mut ExperienceStore, session: &mut DecisionSession, ) -> Result<DecisionRunnerTurn, DecisionRunnerError>

Executes a command and resumes the matching decision-loop transition.

ExecuteAction submits passive evidence, CollectActiveEvidence submits the captured before/after snapshots, and Replan invokes the reasoner and utility planner. Terminal commands are returned unchanged. Adaptive, retry, active, and replan continuations fail before execution; use Self::drive_command_with_suppressed_actions to reauthorize them.

Source

pub async fn drive_command_with_suppressed_actions( &self, decision_loop: &DecisionLoop, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, experience: &mut ExperienceStore, session: &mut DecisionSession, host_suppressed_actions: &BTreeSet<String>, ) -> Result<DecisionRunnerTurn, DecisionRunnerError>

Executes and resumes a command under explicit current host policy.

Current suppressions are checked before executor work and remain in force through verification, adaptive authorization, and replanning.

Source

pub async fn drive_command_with_limits( &self, decision_loop: &DecisionLoop, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, experience: &mut ExperienceStore, session: &mut DecisionSession, limits: DecisionExecutionLimits, ) -> Result<DecisionRunnerTurn, DecisionRunnerError>

Drives one command under a host-owned execution allowance.

Source

pub async fn drive_command_with_limits_and_suppressed_actions( &self, decision_loop: &DecisionLoop, command: &DecisionLoopCommand, knowledge: &KnowledgeBase, experience: &mut ExperienceStore, session: &mut DecisionSession, limits: DecisionExecutionLimits, host_suppressed_actions: &BTreeSet<String>, ) -> Result<DecisionRunnerTurn, DecisionRunnerError>

Drives one command under explicit host policy and execution allowance.

Current suppressions are checked before executor work and remain in force through verification, adaptive authorization, and replanning.

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more