pub struct ModuleExecutor {
pub charter: Charter,
pub scope: ScopeManager,
pub max_risk: RiskLevel,
pub policy_set: PolicySet,
pub sandbox_required: bool,
pub tier: Tier,
pub audit: HashChain,
pub evidence: Vec<Evidence>,
pub traces: Vec<ReasoningTrace>,
pub memories: Vec<MemoryEntry>,
pub stage: GeeStage,
}Expand description
The execution seam of ICEBOX and its fundamental execution primitive: every action runs as a Governed Execution Environment (GEE). This type owns the GEE lifecycle (policy evaluation, sandbox provisioning, approval gating, execution, evidence collection, audit, validation, and teardown) and keeps the state required to enforce it.
Fields§
§charter: Charter§scope: ScopeManager§max_risk: RiskLevel§policy_set: PolicySet§sandbox_required: bool§tier: Tier§audit: HashChain§evidence: Vec<Evidence>§traces: Vec<ReasoningTrace>§memories: Vec<MemoryEntry>§stage: GeeStageImplementations§
Source§impl ModuleExecutor
impl ModuleExecutor
pub fn new(charter: Charter, scope: ScopeManager, max_risk: RiskLevel) -> Self
pub fn policy(&self, context: PolicyContext) -> ConfigPolicy
pub fn recent_traces(&self, n: usize) -> Vec<ReasoningTrace>
pub fn recent_memories(&self, n: usize) -> Vec<MemoryEntry>
pub fn remember(&mut self, kind: MemoryKind, text: impl Into<String>)
pub fn record_trace(&mut self, trace: ReasoningTrace)
pub fn recent_decisions(&self, n: usize) -> Vec<DecisionRecord>
pub fn decisions(&self) -> Vec<DecisionRecord>
pub fn append_decision(&mut self, record: DecisionRecord) -> u64
pub fn verify_audit(&self) -> bool
pub fn audit_chain(&self) -> &HashChain
Sourcepub fn govern_action(
&mut self,
action: &GovernAction,
context: PolicyContext,
) -> GovernResult
pub fn govern_action( &mut self, action: &GovernAction, context: PolicyContext, ) -> GovernResult
Pure governance check: evaluate policy, scope, and approval gates without executing the action. Returns a decision the caller acts upon. This is the single-entry “Stripe-style” govern() call.
Sourcepub fn record_action(
&mut self,
action: &GovernAction,
outcome: ActionOutcome,
) -> RecordResult
pub fn record_action( &mut self, action: &GovernAction, outcome: ActionOutcome, ) -> RecordResult
Record completion of a prior governed action. Appends evidence and an audit-chain entry, then returns the chain tip.
pub fn recent_evidence(&self, n: usize) -> Vec<Evidence>
pub async fn preflight( &self, loaded: &LoadedModule, target: &str, destructive_override: Option<bool>, approved: bool, context: PolicyContext, ) -> Preflight
pub async fn execute( &mut self, loaded: &mut LoadedModule, target: &str, destructive_override: Option<bool>, approved: bool, context: PolicyContext, job_id: Option<u64>, sandbox: bool, engine: Option<SandboxEngineType>, ) -> Result<ModuleResult, ExecutorError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleExecutor
impl RefUnwindSafe for ModuleExecutor
impl Send for ModuleExecutor
impl Sync for ModuleExecutor
impl Unpin for ModuleExecutor
impl UnsafeUnpin for ModuleExecutor
impl UnwindSafe for ModuleExecutor
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