pub struct Forge {
pub memory: CapabilityMemory,
/* private fields */
}Expand description
The supervisor. Owns session state (budget accounting + capability memory).
One Forge per session; each call to handle uses up budget.
Fields§
§memory: CapabilityMemoryImplementations§
Source§impl Forge
impl Forge
pub fn new() -> Self
pub fn with_budget(budget: Budget) -> Self
Sourcepub fn audit(&self) -> &[ToolRunReport]
pub fn audit(&self) -> &[ToolRunReport]
Immutable record of every ToolRunReport produced this session, in order. Includes accepted and rejected requests.
Sourcepub fn handle(&mut self, req: &CapabilityRequest, input: &str) -> ToolRunReport
pub fn handle(&mut self, req: &CapabilityRequest, input: &str) -> ToolRunReport
Process one CapabilityRequest from the model.
Decision order: input validation → budget check → policy check → registry lookup → execute → memory update → audit log
Every call is recorded in self.session_log regardless of outcome.
pub fn tools_invoked(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Forge
impl RefUnwindSafe for Forge
impl Send for Forge
impl Sync for Forge
impl Unpin for Forge
impl UnsafeUnpin for Forge
impl UnwindSafe for Forge
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