pub struct WorkflowTool { /* private fields */ }Expand description
Built-in workflow tool.
Implementations§
Source§impl WorkflowTool
impl WorkflowTool
Sourcepub fn new(policy: SecurityPolicy, config: WorkflowConfig) -> Self
pub fn new(policy: SecurityPolicy, config: WorkflowConfig) -> Self
Default constructor: WorkerProbeBackend (real SecurityPolicy tool
filtering, no live model). Production runtimes should prefer
Self::with_subagent_bridge once a ToolExecutor weak handle exists.
Sourcepub fn with_subagent_bridge(
policy: SecurityPolicy,
config: WorkflowConfig,
tool_executor: Weak<ToolExecutor>,
) -> Self
pub fn with_subagent_bridge( policy: SecurityPolicy, config: WorkflowConfig, tool_executor: Weak<ToolExecutor>, ) -> Self
Production constructor: each agent() runs a real nested subagent turn.
pub fn with_backend( policy: SecurityPolicy, config: WorkflowConfig, backend: Arc<dyn AgentBackend>, ) -> Self
pub fn with_mock( policy: SecurityPolicy, config: WorkflowConfig, mock: MockAgentBackend, ) -> Self
Sourcepub fn with_probe(
policy: SecurityPolicy,
config: WorkflowConfig,
probe: WorkerProbeBackend,
) -> Self
pub fn with_probe( policy: SecurityPolicy, config: WorkflowConfig, probe: WorkerProbeBackend, ) -> Self
Integration tests: SecurityPolicy-probing backend with optional delay.
Trait Implementations§
Source§impl Tool for WorkflowTool
impl Tool for WorkflowTool
fn definition(&self) -> ToolDefinition
fn invoke<'life0, 'async_trait>(
&'life0 self,
invocation: ToolInvocation,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_with_context<'life0, 'async_trait>(
&'life0 self,
invocation: ToolInvocation,
context: ToolInvocationContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowTool
impl !UnwindSafe for WorkflowTool
impl Freeze for WorkflowTool
impl Send for WorkflowTool
impl Sync for WorkflowTool
impl Unpin for WorkflowTool
impl UnsafeUnpin for WorkflowTool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more