pub struct ExecutionLifecycle { /* private fields */ }Expand description
Sole owner of task admission, ordered completion, and exact-once side effects.
Implementations§
Source§impl ExecutionLifecycle
impl ExecutionLifecycle
pub fn global() -> &'static ExecutionLifecycle
pub fn with_triage(triage: TriageEngine) -> ExecutionLifecycle
pub fn with_components( triage: TriageEngine, value_gate: ValueGate, ) -> ExecutionLifecycle
pub fn begin( &self, request: ToolRequest, runtime: RuntimeContext, entitlements: ProductEntitlements, ) -> TaskContext
pub async fn run<D>(
&self,
request: ToolRequest,
runtime: RuntimeContext,
entitlements: ProductEntitlements,
driver: D,
) -> Result<<D as ExecutionDriver>::Output, LifecycleRunError<<D as ExecutionDriver>::Error>>where
D: ExecutionDriver,
Sourcepub async fn run_with_task_identity<D>(
&self,
request: ToolRequest,
runtime: RuntimeContext,
entitlements: ProductEntitlements,
driver: D,
identity: Option<AdmittedTaskIdentity>,
) -> Result<<D as ExecutionDriver>::Output, LifecycleRunError<<D as ExecutionDriver>::Error>>where
D: ExecutionDriver,
pub async fn run_with_task_identity<D>(
&self,
request: ToolRequest,
runtime: RuntimeContext,
entitlements: ProductEntitlements,
driver: D,
identity: Option<AdmittedTaskIdentity>,
) -> Result<<D as ExecutionDriver>::Output, LifecycleRunError<<D as ExecutionDriver>::Error>>where
D: ExecutionDriver,
Preserve the sole lifecycle owner while accepting an explicit host identity.
pub fn complete( &self, context: &TaskContext, observation: CompletionObservation, ) -> LifecycleOutcome
Sourcepub fn complete_once(
&self,
context: &TaskContext,
observation: CompletionObservation,
) -> Option<LifecycleOutcome>
pub fn complete_once( &self, context: &TaskContext, observation: CompletionObservation, ) -> Option<LifecycleOutcome>
Complete an open run and report whether this call owned finalization.
Compatibility adapters use this to preserve their historic duplicate
suppression while the lifecycle still returns a stable cached outcome
through Self::complete.
pub fn profile_for_session(&self, session_id: &str) -> Option<TaskProfileLocal>
pub fn assessment_for(&self, task_id: &str) -> Option<ValueAssessment>
pub fn outcome_for(&self, task_id: &str) -> Option<LifecycleOutcome>
Trait Implementations§
Source§impl Clone for ExecutionLifecycle
impl Clone for ExecutionLifecycle
Source§fn clone(&self) -> ExecutionLifecycle
fn clone(&self) -> ExecutionLifecycle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionLifecycle
impl Debug for ExecutionLifecycle
Source§impl Default for ExecutionLifecycle
impl Default for ExecutionLifecycle
Source§fn default() -> ExecutionLifecycle
fn default() -> ExecutionLifecycle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionLifecycle
impl !UnwindSafe for ExecutionLifecycle
impl Forget for ExecutionLifecycle
impl Freeze for ExecutionLifecyclewhere
*const ArcInner<DecisionSpine> is !null: Freeze,
PhantomData<ArcInner<DecisionSpine>>: Freeze,
impl Move for ExecutionLifecycle
impl Send for ExecutionLifecycle
impl Sync for ExecutionLifecycle
impl Unpin for ExecutionLifecycle
impl UnsafeUnpin for ExecutionLifecyclewhere
*const ArcInner<DecisionSpine> is !null: UnsafeUnpin,
PhantomData<ArcInner<DecisionSpine>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more