pub struct PluginAction {
pub tool: String,
pub function: String,
pub parameters: Value,
pub target_paths: Vec<String>,
pub target_domains: Vec<String>,
}Expand description
A simplified, serializable representation of an Action for plugin
consumption.
This avoids exposing internal types (like resolved_ips) to untrusted
plugin code. Only the information needed for policy evaluation is included.
Fields§
§tool: StringThe tool being invoked.
function: StringThe function within the tool.
parameters: ValueArbitrary parameters passed to the tool call.
target_paths: Vec<String>File paths targeted by this action.
target_domains: Vec<String>Domains targeted by this action.
Implementations§
Source§impl PluginAction
impl PluginAction
Sourcepub fn from_action(action: &Action) -> Self
pub fn from_action(action: &Action) -> Self
Create a PluginAction from a core Action.
Deliberately excludes resolved_ips — plugin code should not be able
to influence IP-based decisions, which are handled by the native engine.
Trait Implementations§
Source§impl Clone for PluginAction
impl Clone for PluginAction
Source§fn clone(&self) -> PluginAction
fn clone(&self) -> PluginAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PluginAction
impl Debug for PluginAction
Source§impl<'de> Deserialize<'de> for PluginAction
impl<'de> Deserialize<'de> for PluginAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PluginAction
impl RefUnwindSafe for PluginAction
impl Send for PluginAction
impl Sync for PluginAction
impl Unpin for PluginAction
impl UnsafeUnpin for PluginAction
impl UnwindSafe for PluginAction
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