#[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,
) -> Self
pub const fn sandboxed_autonomous( budget: ResourceBudget, acknowledgement: SandboxAcknowledgement, ) -> Self
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§impl Debug for OrchestrationMode
impl Debug for OrchestrationMode
Source§impl Default for OrchestrationMode
impl Default for OrchestrationMode
Source§impl<'de> Deserialize<'de> for OrchestrationMode
impl<'de> Deserialize<'de> for OrchestrationMode
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 OrchestrationMode
Source§impl PartialEq for OrchestrationMode
impl PartialEq for OrchestrationMode
Source§impl Serialize for OrchestrationMode
impl Serialize for OrchestrationMode
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.