#[non_exhaustive]pub enum OrchestrationMode {
Deterministic,
SandboxedAutonomous {
budget: ResourceBudget,
acknowledgement: SandboxAcknowledgement,
},
}Expand description
How much autonomy the model gets: which risk classes are eligible at all (§11.4).
| Risk class | Deterministic | SandboxedAutonomous |
|---|---|---|
ReadOnly, ReversibleLowRisk, SensitiveDataChange | yes | yes |
Destructive, Irreversible, ExternalRegulated | yes | no |
A domain that classifies a money movement as ReversibleLowRisk has mislabelled it,
and no mode can rescue that.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Deterministic
Understanding proposes, the reducer and policy decide. The default.
SandboxedAutonomous
Experimental mode for sandboxed, reversible domains only (§11.4). Build it with
Self::sandboxed_autonomous; the acknowledgement cannot be built elsewhere.
Fields
budget: ResourceBudgetWhat the turn may spend.
acknowledgement: SandboxAcknowledgementProof the operator knows what this gives up.
Implementations§
Source§impl OrchestrationMode
impl OrchestrationMode
Sourcepub const fn sandboxed_autonomous(
budget: ResourceBudget,
acknowledgement: SandboxAcknowledgement,
) -> OrchestrationMode
pub const fn sandboxed_autonomous( budget: ResourceBudget, acknowledgement: SandboxAcknowledgement, ) -> OrchestrationMode
Builds the sandboxed autonomous mode.
The acknowledgement argument is the whole point: obtaining one means
calling SandboxAcknowledgement::i_accept_unreviewed_autonomous_writes,
which logs a warning.
Sourcepub fn allows_risk(&self, risk: RiskClass) -> bool
pub fn allows_risk(&self, risk: RiskClass) -> bool
Whether commands of risk are eligible in this mode (§11.4).
See the table on OrchestrationMode.
Sourcepub fn forbidden_risk_classes(&self) -> Vec<RiskClass>
pub fn forbidden_risk_classes(&self) -> Vec<RiskClass>
The risk classes this mode refuses, in ladder order.
Feed them to PolicySnapshot::forbidden_risk_classes — or let
OrchestratorConfig::policy_snapshot do it.
Sourcepub fn budget(&self) -> Option<&ResourceBudget>
pub fn budget(&self) -> Option<&ResourceBudget>
The resource budget, for the sandboxed mode only.
Sourcepub fn is_sandboxed(&self) -> bool
pub fn is_sandboxed(&self) -> bool
Returns true for Self::SandboxedAutonomous.
Trait Implementations§
Source§impl Clone for OrchestrationMode
impl Clone for OrchestrationMode
Source§fn clone(&self) -> OrchestrationMode
fn clone(&self) -> OrchestrationMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrchestrationMode
impl Debug for OrchestrationMode
Source§impl Default for OrchestrationMode
impl Default for OrchestrationMode
Source§fn default() -> OrchestrationMode
fn default() -> OrchestrationMode
Source§impl<'de> Deserialize<'de> for OrchestrationMode
impl<'de> Deserialize<'de> for OrchestrationMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrchestrationMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrchestrationMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for OrchestrationMode
Source§impl PartialEq for OrchestrationMode
impl PartialEq for OrchestrationMode
Source§impl Serialize for OrchestrationMode
impl Serialize for OrchestrationMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for OrchestrationMode
Auto Trait Implementations§
impl Freeze for OrchestrationMode
impl RefUnwindSafe for OrchestrationMode
impl Send for OrchestrationMode
impl Sync for OrchestrationMode
impl Unpin for OrchestrationMode
impl UnsafeUnpin for OrchestrationMode
impl UnwindSafe for OrchestrationMode
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,
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> ⓘ
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