pub struct OpeningGate { /* private fields */ }Expand description
Narrows iteration 0’s tool advertisement to a caller-supplied subset.
Composes via allowlist intersection with other ToolGate plugins.
Implementations§
Source§impl OpeningGate
impl OpeningGate
Sourcepub fn with_allowlist(allowlist: HashSet<String>) -> Self
pub fn with_allowlist(allowlist: HashSet<String>) -> Self
Construct a gate that narrows the opening turn to allowlist.
The names are product-specific and supplied by the caller — the
gate itself knows no tool vocabulary.
Trait Implementations§
Source§impl Plugin for OpeningGate
impl Plugin for OpeningGate
Source§fn capabilities(&self) -> PluginCapabilities
fn capabilities(&self) -> PluginCapabilities
Which capabilities this plugin implements. Default: none — meaning
pure observation by inheriting from
EventObserver. Override and
return the relevant set when adding behavior.Source§impl ToolGate for OpeningGate
impl ToolGate for OpeningGate
fn next_turn_tool_allowlist<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: ToolGateContext<'life1>,
) -> Pin<Box<dyn Future<Output = Option<HashSet<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn denial_reason<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_ctx: ToolGateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn denial_reason<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_ctx: ToolGateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
This gate’s specific reason for denying
tool_name in the given
context. The runtime queries every gate after a hidden-tool call
so the error message names the actual narrower instead of guessing
from the intersected allowlist’s shape — that guess sent the model
to repair the wrong gate (e.g. a delivery_repair_gate strip read
as a capability_gate phase mismatch and triggered futile
plan-updates until wall-clock timeout). Read morefn conflict_priority(&self) -> i32
fn tool_gate_class(&self) -> ToolGateClass
fn suppresses_advisory_gates(&self, _ctx: ToolGateContext<'_>) -> bool
Auto Trait Implementations§
impl Freeze for OpeningGate
impl RefUnwindSafe for OpeningGate
impl Send for OpeningGate
impl Sync for OpeningGate
impl Unpin for OpeningGate
impl UnsafeUnpin for OpeningGate
impl UnwindSafe for OpeningGate
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