pub struct WebPlugin { /* private fields */ }Expand description
Web browsing plugin for swink-agent.
Provides tools for fetching web pages and searching the web, along with safety policies for domain filtering, rate limiting, and content sanitization.
Implementations§
Source§impl WebPlugin
impl WebPlugin
Sourcepub fn new() -> Result<Self, WebPluginError>
pub fn new() -> Result<Self, WebPluginError>
Create a new WebPlugin with default configuration.
Returns an error if the default configuration cannot be satisfied (for example, if the default search provider’s feature flag is disabled at compile time).
Sourcepub fn builder() -> WebPluginConfigBuilder
pub fn builder() -> WebPluginConfigBuilder
Create a builder for custom configuration.
Sourcepub fn from_config(config: WebPluginConfig) -> Result<Self, WebPluginError>
pub fn from_config(config: WebPluginConfig) -> Result<Self, WebPluginError>
Create a WebPlugin from an explicit configuration.
Returns an error if the HTTP client cannot be built or if the configured search provider is unavailable (missing feature flag or missing API key).
Trait Implementations§
Source§impl Plugin for WebPlugin
impl Plugin for WebPlugin
Source§fn name(&self) -> &str
fn name(&self) -> &str
Unique identifier for this plugin (used for registry lookup and tool namespacing).
Source§fn pre_dispatch_policies(&self) -> Vec<Arc<dyn PreDispatchPolicy>>
fn pre_dispatch_policies(&self) -> Vec<Arc<dyn PreDispatchPolicy>>
Pre-dispatch policies contributed by this plugin.
Source§fn post_turn_policies(&self) -> Vec<Arc<dyn PostTurnPolicy>>
fn post_turn_policies(&self) -> Vec<Arc<dyn PostTurnPolicy>>
Post-turn policies contributed by this plugin.
Source§fn on_event(&self, event: &AgentEvent)
fn on_event(&self, event: &AgentEvent)
Event observer called for every
AgentEvent dispatched by the agent. Read moreSource§fn on_init(&self, _agent: &Agent)
fn on_init(&self, _agent: &Agent)
Called once during
Agent::new() after the agent is fully configured. Read moreSource§fn pre_turn_policies(&self) -> Vec<Arc<dyn PreTurnPolicy>>
fn pre_turn_policies(&self) -> Vec<Arc<dyn PreTurnPolicy>>
Pre-turn policies contributed by this plugin.
Source§fn post_loop_policies(&self) -> Vec<Arc<dyn PostLoopPolicy>>
fn post_loop_policies(&self) -> Vec<Arc<dyn PostLoopPolicy>>
Post-loop policies contributed by this plugin.
Auto Trait Implementations§
impl !RefUnwindSafe for WebPlugin
impl !UnwindSafe for WebPlugin
impl Freeze for WebPlugin
impl Send for WebPlugin
impl Sync for WebPlugin
impl Unpin for WebPlugin
impl UnsafeUnpin for WebPlugin
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