pub enum ApprovalDecision {
Allow,
Deny,
AllowForSession,
DenyForSession,
}Expand description
What an Approver decided.
§How long “for the session” lasts
A …ForSession answer is remembered against the conversation and answers
every later call of that tool on the live session: further calls in the
same turn, and further runs on the same PreparedRun
in the same process. It dies at the next attach — resuming the
conversation (Workspace::resume) starts it with none
remembered, so a later process that picks the conversation back up asks
again rather than replaying an answer nobody in that process gave.
That boundary is inherent now, not enforced. mentra 0.27’s
PermissionRuleScope::Process (mentra#53) is what basis remembers a
…ForSession answer into: a rung owned by the live session’s own
permission handle, never written to the runtime store, so a resumed
session — a fresh handle, even for the same conversation — simply starts
with an empty one. Nothing basis runs has to clear it. (One resume-time
clear does still exist, in Runtime::resume_minted, but it is a one-way
migration for rows a pre-0.12 basis binary remembered into the durable
Session scope before this change; it plays no part in the guarantee
documented here for an answer given today.)
Variants§
Allow
Deny
The default: when in doubt, do not.
AllowForSession
Allow, and stop asking about this tool for the rest of the live session — see the duration rule above.
DenyForSession
Deny, and stop asking about this tool for the rest of the live session — see the duration rule above.
Trait Implementations§
Source§impl Clone for ApprovalDecision
impl Clone for ApprovalDecision
Source§fn clone(&self) -> ApprovalDecision
fn clone(&self) -> ApprovalDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ApprovalDecision
Source§impl Debug for ApprovalDecision
impl Debug for ApprovalDecision
Source§impl Default for ApprovalDecision
impl Default for ApprovalDecision
Source§fn default() -> ApprovalDecision
fn default() -> ApprovalDecision
impl Eq for ApprovalDecision
Source§impl From<ApprovalDecision> for ApprovalAnswer
impl From<ApprovalDecision> for ApprovalAnswer
Source§fn from(decision: ApprovalDecision) -> Self
fn from(decision: ApprovalDecision) -> Self
Source§impl PartialEq for ApprovalDecision
impl PartialEq for ApprovalDecision
impl StructuralPartialEq for ApprovalDecision
Auto Trait Implementations§
impl Freeze for ApprovalDecision
impl RefUnwindSafe for ApprovalDecision
impl Send for ApprovalDecision
impl Sync for ApprovalDecision
impl Unpin for ApprovalDecision
impl UnsafeUnpin for ApprovalDecision
impl UnwindSafe for ApprovalDecision
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.