pub struct LoopGovernance { /* private fields */ }Expand description
Governance over Engine::with_builtins() plus an optional host policy.
LLM backends deliberately have no seam here: RUN LOOP from CAL is the
deterministic pass — model-attached runs stay on the host surfaces where
credentials live.
Implementations§
Source§impl LoopGovernance
impl LoopGovernance
pub fn new() -> Self
Sourcepub fn with_policy(policy: Policy) -> Self
pub fn with_policy(policy: Policy) -> Self
Attach the same loop-policy.json the CLI takes (--policy) — a
CAL-triggered run honors the same auto-apply grants, denies, and
severity floors.
Trait Implementations§
Source§impl Default for LoopGovernance
impl Default for LoopGovernance
Source§impl GovernanceHost for LoopGovernance
impl GovernanceHost for LoopGovernance
Source§fn run_loop(
&self,
store: &dyn CalStoreFacade,
opts: &RunLoopOptions,
) -> Result<Value>
fn run_loop( &self, store: &dyn CalStoreFacade, opts: &RunLoopOptions, ) -> Result<Value>
RUN LOOP — run the analysis pass. Returns the run result as JSON.Source§fn review(
&self,
store: &dyn CalStoreFacade,
rec_hash: &str,
decision: ReviewDecision,
because: &str,
) -> Result<()>
fn review( &self, store: &dyn CalStoreFacade, rec_hash: &str, decision: ReviewDecision, because: &str, ) -> Result<()>
APPROVE/REJECT <hash> BECAUSE "…".Source§fn apply(
&self,
store: &dyn CalStoreFacade,
rec_hash: &str,
because: &str,
destructive_cap: bool,
) -> Result<bool>
fn apply( &self, store: &dyn CalStoreFacade, rec_hash: &str, because: &str, destructive_cap: bool, ) -> Result<bool>
APPLY <hash> BECAUSE "…". Returns whether the apply is
rollbackable. Read moreAuto Trait Implementations§
impl Freeze for LoopGovernance
impl RefUnwindSafe for LoopGovernance
impl Send for LoopGovernance
impl Sync for LoopGovernance
impl Unpin for LoopGovernance
impl UnsafeUnpin for LoopGovernance
impl UnwindSafe for LoopGovernance
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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