pub trait GatePrompt: Send + Sync {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 GateDecision,
) -> Pin<Box<dyn Future<Output = GateResolution> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Injected resolver used when the gate blocks an outbound tool call.
The runtime cannot prompt the user itself (no stdin/IPC), so the CLI provides an implementation that asks via the dashboard/stdin and returns the user’s decision. Mirrors how tool execution is injected as a closure.
Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 GateDecision,
) -> Pin<Box<dyn Future<Output = GateResolution> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 GateDecision,
) -> Pin<Box<dyn Future<Output = GateResolution> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Ask the user how to resolve a blocked outbound call. Implementations
should default to GateResolution::Deny when no answer is available.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".