use causa_kernel::{ArtifactStore, ToolBatchProcessor};
use std::sync::Arc;
use std::time::Duration;
#[derive(Default)]
#[non_exhaustive]
pub struct ToolExecutorOptions {
pub before: Vec<Arc<dyn ToolBatchProcessor>>,
pub after: Vec<Arc<dyn ToolBatchProcessor>>,
pub call_timeout: Option<Duration>,
pub artifact_store: Option<Arc<dyn ArtifactStore>>,
}
impl ToolExecutorOptions {
pub fn with_before(mut self, before: Vec<Arc<dyn ToolBatchProcessor>>) -> Self {
self.before = before;
self
}
pub fn with_after(mut self, after: Vec<Arc<dyn ToolBatchProcessor>>) -> Self {
self.after = after;
self
}
pub fn with_call_timeout(mut self, call_timeout: Duration) -> Self {
self.call_timeout = Some(call_timeout);
self
}
pub fn with_artifact_store(mut self, artifact_store: Arc<dyn ArtifactStore>) -> Self {
self.artifact_store = Some(artifact_store);
self
}
}