1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! The approval seam: a per-turn hook that gates the side-effecting tools.
//!
//! The hook travels as an `Arc` because the resolver that consults it is
//! owned by the engine's `Agent` and must stay `'static` — a plain `&dyn`
//! borrow cannot be installed into it. It is installed before a turn and
//! cleared after; tool resolution is synchronous within a turn, so the
//! per-turn swap is race-free.
use ToolCall;
/// Decides whether a gated tool call (`bash`) may run.
/// Called once per gated call, before execution.
/// Approves everything; used by non-interactive drivers and tests.
;
/// Rejects every gated call: the headless default, where nobody is
/// present to approve. Pair with an explicit opt-in to run tools
/// unattended.
;