pub struct PluginSpec {Show 18 fields
pub tool_providers: Vec<Arc<dyn ToolProvider>>,
pub host_events: Vec<HostEvent>,
pub prompt_contributors: Vec<PromptContributor>,
pub tool_surface_contributors: Vec<ToolSurfaceContributor>,
pub tool_discovery_contributors: Vec<ToolDiscoveryContributor>,
pub before_turn_hooks: Vec<BeforeTurnHook>,
pub before_tool_call_hooks: Vec<BeforeToolCallHook>,
pub after_tool_call_hooks: Vec<AfterToolCallHook>,
pub after_turn_hooks: Vec<AfterTurnHook>,
pub checkpoint_hooks: Vec<CheckpointHook>,
pub assistant_stream_hooks: Vec<AssistantStreamHook>,
pub assistant_response_hooks: Vec<AssistantResponseHook>,
pub tool_result_projector: Option<ToolResultProjector>,
pub runtime_event_hooks: Vec<PluginLifecycleEventHook>,
pub session_config_mutators: Vec<SessionConfigMutator>,
pub plugin_actions: Vec<(PluginActionDef, PluginActionHandler)>,
pub turn_context_transforms: Vec<(i32, Arc<dyn TurnContextTransform>)>,
pub history_rewriters: Vec<(i32, Arc<dyn HistoryRewriter>)>,
}Fields§
§tool_providers: Vec<Arc<dyn ToolProvider>>§host_events: Vec<HostEvent>§prompt_contributors: Vec<PromptContributor>§tool_surface_contributors: Vec<ToolSurfaceContributor>§tool_discovery_contributors: Vec<ToolDiscoveryContributor>§before_turn_hooks: Vec<BeforeTurnHook>§before_tool_call_hooks: Vec<BeforeToolCallHook>§after_tool_call_hooks: Vec<AfterToolCallHook>§after_turn_hooks: Vec<AfterTurnHook>§checkpoint_hooks: Vec<CheckpointHook>§assistant_stream_hooks: Vec<AssistantStreamHook>§assistant_response_hooks: Vec<AssistantResponseHook>§tool_result_projector: Option<ToolResultProjector>§runtime_event_hooks: Vec<PluginLifecycleEventHook>§session_config_mutators: Vec<SessionConfigMutator>§plugin_actions: Vec<(PluginActionDef, PluginActionHandler)>§turn_context_transforms: Vec<(i32, Arc<dyn TurnContextTransform>)>§history_rewriters: Vec<(i32, Arc<dyn HistoryRewriter>)>Implementations§
Source§impl PluginSpec
impl PluginSpec
pub fn new() -> Self
pub fn with_tool_provider(self, provider: Arc<dyn ToolProvider>) -> Self
pub fn with_host_event(self, event: HostEvent) -> Self
pub fn with_prompt_contributor(self, contributor: PromptContributor) -> Self
pub fn with_tool_surface_contributor( self, contributor: ToolSurfaceContributor, ) -> Self
pub fn with_tool_discovery_contributor( self, contributor: ToolDiscoveryContributor, ) -> Self
pub fn with_before_turn(self, hook: BeforeTurnHook) -> Self
pub fn with_before_tool_call(self, hook: BeforeToolCallHook) -> Self
pub fn with_after_tool_call(self, hook: AfterToolCallHook) -> Self
pub fn with_after_turn(self, hook: AfterTurnHook) -> Self
pub fn with_checkpoint(self, hook: CheckpointHook) -> Self
pub fn with_assistant_stream(self, hook: AssistantStreamHook) -> Self
pub fn with_assistant_response(self, hook: AssistantResponseHook) -> Self
pub fn with_tool_result_projector(self, projector: ToolResultProjector) -> Self
pub fn with_runtime_event(self, hook: PluginLifecycleEventHook) -> Self
pub fn with_session_config_mutator(self, hook: SessionConfigMutator) -> Self
pub fn with_plugin_action( self, def: PluginActionDef, handler: PluginActionHandler, ) -> Self
pub fn with_plugin_action_typed<Op, F, Fut>(self, handler: F) -> Selfwhere
Op: PluginAction,
F: Fn(PluginActionContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Op::Output, PluginActionFailure>> + Send + 'static,
pub fn with_plugin_action_sync<Op, F>(self, handler: F) -> Selfwhere
Op: PluginAction,
F: Fn(PluginActionContext, Op::Args) -> Result<Op::Output, PluginActionFailure> + Send + Sync + 'static,
pub fn with_turn_context_transform( self, priority: i32, transform: Arc<dyn TurnContextTransform>, ) -> Self
pub fn with_history_rewriter( self, priority: i32, rewriter: Arc<dyn HistoryRewriter>, ) -> Self
Trait Implementations§
Source§impl Clone for PluginSpec
impl Clone for PluginSpec
Source§fn clone(&self) -> PluginSpec
fn clone(&self) -> PluginSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PluginSpec
impl Default for PluginSpec
Source§fn default() -> PluginSpec
fn default() -> PluginSpec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PluginSpec
impl !UnwindSafe for PluginSpec
impl Freeze for PluginSpec
impl Send for PluginSpec
impl Sync for PluginSpec
impl Unpin for PluginSpec
impl UnsafeUnpin for PluginSpec
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