pub struct PluginCapabilities {
pub before_tool_call: bool,
pub after_tool_call: bool,
pub context_transform: bool,
pub event_observer: bool,
pub steering: bool,
pub follow_up: bool,
pub tool_gate: bool,
pub inheritable_to_child: bool,
}Expand description
Bitset of which extension points a plugin participates in.
The dispatcher reads this to skip plugins that don’t implement a given hook, avoiding wasteful trait-object cast attempts.
inheritable_to_child is the spawn-time signal: when a parent run
calls crate::LoopConfig::child_builder, every parent plugin
whose capabilities have inheritable_to_child = true is carried
into the child’s plugin registry as-is. Default false — plugins
that hold conversation-scoped state, mutate parent-only stores, or
know about the parent’s UI/persistence must opt in explicitly so a
child run cannot silently inherit parent identity.
Fields§
§before_tool_call: bool§after_tool_call: bool§context_transform: bool§event_observer: bool§steering: bool§follow_up: bool§tool_gate: bool§inheritable_to_child: boolWhen true, crate::LoopConfig::child_builder carries this
plugin into every spawned child run. When false (default),
the plugin is parent-only and the caller assembling the child
must register the child-specific equivalent.
Implementations§
Source§impl PluginCapabilities
impl PluginCapabilities
pub fn before_tool_call() -> Self
pub fn after_tool_call() -> Self
pub fn context_transform() -> Self
pub fn event_observer() -> Self
pub fn steering() -> Self
pub fn follow_up() -> Self
pub fn tool_gate() -> Self
pub fn with_follow_up(self) -> Self
pub fn with_tool_gate(self) -> Self
Sourcepub fn with_inheritable_to_child(self) -> Self
pub fn with_inheritable_to_child(self) -> Self
Mark this plugin as inheritable to child runs spawned via
crate::LoopConfig::child_builder.
Trait Implementations§
Source§impl Clone for PluginCapabilities
impl Clone for PluginCapabilities
Source§fn clone(&self) -> PluginCapabilities
fn clone(&self) -> PluginCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginCapabilities
impl Debug for PluginCapabilities
Source§impl Default for PluginCapabilities
impl Default for PluginCapabilities
Source§fn default() -> PluginCapabilities
fn default() -> PluginCapabilities
Source§impl PartialEq for PluginCapabilities
impl PartialEq for PluginCapabilities
Source§fn eq(&self, other: &PluginCapabilities) -> bool
fn eq(&self, other: &PluginCapabilities) -> bool
self and other values to be equal, and is used by ==.impl Copy for PluginCapabilities
impl Eq for PluginCapabilities
impl StructuralPartialEq for PluginCapabilities
Auto Trait Implementations§
impl Freeze for PluginCapabilities
impl RefUnwindSafe for PluginCapabilities
impl Send for PluginCapabilities
impl Sync for PluginCapabilities
impl Unpin for PluginCapabilities
impl UnsafeUnpin for PluginCapabilities
impl UnwindSafe for PluginCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.