#[non_exhaustive]pub enum AutonomyCap {
Read,
Propose,
WithinPlaybook,
WithinBudget,
AlwaysHeld,
}Expand description
How far a job goes with a tool before a person decides, by default (spec 3.5 §7.13, “Default autonomy cap”; §7.11 autonomy ladder).
The cap is the level a job using the tool starts at and is offered promotion from;
promotion is an owner’s decision (A-I13). AlwaysHeld is an
invariant, not a level: no mode, standing rule or promotion lifts it (A-I21), and
DriverCapPolicy enforces it on every call.
§Example
use adk_drivers::AutonomyCap;
assert!(AutonomyCap::AlwaysHeld.is_invariant());
assert!(!AutonomyCap::Propose.is_invariant());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Read
Reads only.
Propose
The job proposes; a person decides each call.
WithinPlaybook
Within the job’s playbook and the recipient’s consent.
WithinBudget
Within the owner’s budget; a call beyond it is held.
AlwaysHeld
Held for a person in every mode (A-I21).
Implementations§
Source§impl AutonomyCap
impl AutonomyCap
Sourcepub fn is_invariant(self) -> bool
pub fn is_invariant(self) -> bool
Whether the cap holds in every mode, whatever the job’s level.
Sourcepub fn starting_level(self) -> AutonomyLevel
pub fn starting_level(self) -> AutonomyLevel
The autonomy level a job using the tool starts at (spec 3.5 §7.11, §7.20): Observe
for reads, Propose, “act within budget” for the playbook and budget caps, and “act
with approval” for a held tool — whose calls DriverCapPolicy
holds on every rung.
§Example
use adk_drivers::AutonomyCap;
use awp_types::AutonomyLevel;
assert_eq!(AutonomyCap::Propose.starting_level(), AutonomyLevel::Propose);
assert_eq!(AutonomyCap::AlwaysHeld.starting_level(), AutonomyLevel::ActWithApproval);Trait Implementations§
Source§impl Clone for AutonomyCap
impl Clone for AutonomyCap
impl Copy for AutonomyCap
Source§impl Debug for AutonomyCap
impl Debug for AutonomyCap
Source§impl<'de> Deserialize<'de> for AutonomyCap
impl<'de> Deserialize<'de> for AutonomyCap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AutonomyCap
Source§impl Hash for AutonomyCap
impl Hash for AutonomyCap
Source§impl Ord for AutonomyCap
impl Ord for AutonomyCap
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AutonomyCap
impl PartialEq for AutonomyCap
Source§impl PartialOrd for AutonomyCap
impl PartialOrd for AutonomyCap
Source§impl Serialize for AutonomyCap
impl Serialize for AutonomyCap
impl StructuralPartialEq for AutonomyCap
Auto Trait Implementations§
impl Forget for AutonomyCap
impl Freeze for AutonomyCap
impl Move for AutonomyCap
impl RefUnwindSafe for AutonomyCap
impl Send for AutonomyCap
impl Sync for AutonomyCap
impl Unpin for AutonomyCap
impl UnsafeUnpin for AutonomyCap
impl UnwindSafe for AutonomyCap
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
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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