pub struct PluginRegistrar {
pub profile_keys: Vec<ProfileKeyRegistration>,
/* private fields */
}Fields§
§profile_keys: Vec<ProfileKeyRegistration>Implementations§
Source§impl PluginRegistrar
impl PluginRegistrar
pub fn register_key<K>(
&mut self,
options: StateKeyOptions,
) -> Result<(), StateError>where
K: StateKey,
pub fn register_scheduled_action<A, H>(
&mut self,
handler: H,
) -> Result<(), StateError>where
A: ScheduledActionSpec,
H: TypedScheduledActionHandler<A>,
pub fn register_effect<E, H>(&mut self, handler: H) -> Result<(), StateError>where
E: EffectSpec,
H: TypedEffectHandler<E>,
pub fn register_phase_hook<H>(
&mut self,
plugin_id: impl Into<String>,
phase: Phase,
hook: H,
) -> Result<(), StateError>where
H: PhaseHook,
pub fn register_tool_gate_hook<H>(
&mut self,
plugin_id: impl Into<String>,
hook: H,
) -> Result<(), StateError>where
H: ToolGateHook,
Sourcepub fn register_tool_policy_hook<H>(
&mut self,
plugin_id: impl Into<String>,
hook: H,
) -> Result<(), StateError>where
H: ToolPolicyHook,
pub fn register_tool_policy_hook<H>(
&mut self,
plugin_id: impl Into<String>,
hook: H,
) -> Result<(), StateError>where
H: ToolPolicyHook,
Register a typed tool policy hook. Policy hooks are executed through the existing ToolGate phase, so ordering and conflict resolution stay unified.
Sourcepub fn register_tool(
&mut self,
id: impl Into<String>,
tool: Arc<dyn Tool>,
) -> Result<(), StateError>
pub fn register_tool( &mut self, id: impl Into<String>, tool: Arc<dyn Tool>, ) -> Result<(), StateError>
Register a tool provided by this plugin.
The tool becomes available to agents that activate this plugin. Tool IDs must be unique across all plugins; duplicates cause a resolve error.
Sourcepub fn register_request_transform<T>(
&mut self,
plugin_id: impl Into<String>,
transform: T,
)where
T: InferenceRequestTransform + 'static,
pub fn register_request_transform<T>(
&mut self,
plugin_id: impl Into<String>,
transform: T,
)where
T: InferenceRequestTransform + 'static,
Register a request transform applied after message assembly, before LLM call.
Sourcepub fn register_profile_key<K: ProfileKey>(&mut self) -> Result<(), StateError>
pub fn register_profile_key<K: ProfileKey>(&mut self) -> Result<(), StateError>
Register a profile key for typed profile storage access.
Auto Trait Implementations§
impl Freeze for PluginRegistrar
impl !RefUnwindSafe for PluginRegistrar
impl Send for PluginRegistrar
impl Sync for PluginRegistrar
impl Unpin for PluginRegistrar
impl UnsafeUnpin for PluginRegistrar
impl !UnwindSafe for PluginRegistrar
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