(
&self,
session_id: &str,
tool_name: &str,
)
| 5222 | } |
| 5223 | |
| 5224 | async fn check_before_tool( |
| 5225 | &self, |
| 5226 | session_id: &str, |
| 5227 | tool_name: &str, |
| 5228 | ) -> a3s_code_core::budget::BudgetDecision { |
| 5229 | let Some(tsfn) = self.check_before_tool.as_ref() else { |
| 5230 | return a3s_code_core::budget::BudgetDecision::Allow; |
| 5231 | }; |
| 5232 | self.call_decision( |
| 5233 | tsfn, |
| 5234 | serde_json::json!({ "sessionId": session_id, "toolName": tool_name }), |
| 5235 | ) |
| 5236 | } |
| 5237 | } |
| 5238 | |
| 5239 | /// Parse the return value of a JS BudgetGuard callback into a |
nothing calls this directly
no test coverage detected