MCPcopy Create free account
hub / github.com/AI45Lab/Code / budget_guard

Method budget_guard

core/src/agent_api.rs:702–707  ·  view source on GitHub ↗

Return the currently-installed runtime budget guard, if any. `None` means the loop falls back to `config.budget_guard`.

(&self)

Source from the content-addressed store, hash-verified

700 /// Return the currently-installed runtime budget guard, if any.
701 /// `None` means the loop falls back to `config.budget_guard`.
702 pub fn budget_guard(&self) -> Option<Arc<dyn crate::budget::BudgetGuard>> {
703 self.runtime_budget_guard
704 .lock()
705 .unwrap_or_else(|p| p.into_inner())
706 .clone()
707 }
708
709 /// Proactively close the session and release its in-flight work.
710 ///

Callers 1

build_agent_loopFunction · 0.80

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected