use std::path::{Path, PathBuf};
use crate::{
FileAgentPoolStore, FileCheckpointStore, FileContentStore, FileEventArchive,
FileProviderArgumentStore, FileRunJournal, FileToolExecutionStore,
};
#[derive(Clone, Debug)]
pub struct FileStoreBundle {
root: PathBuf,
}
impl FileStoreBundle {
pub fn new(root: impl Into<PathBuf>) -> Self {
Self { root: root.into() }
}
pub fn root(&self) -> &Path {
&self.root
}
pub fn journal(&self) -> FileRunJournal {
FileRunJournal::new(self.root.clone())
}
pub fn checkpoints(&self) -> FileCheckpointStore {
FileCheckpointStore::new(self.root.clone())
}
pub fn content(&self) -> FileContentStore {
FileContentStore::new(self.root.clone())
}
pub fn event_archive(&self) -> FileEventArchive {
FileEventArchive::new(self.root.clone())
}
pub fn provider_arguments(&self) -> FileProviderArgumentStore {
FileProviderArgumentStore::new(self.root.clone())
}
pub fn agent_pool(&self) -> FileAgentPoolStore {
FileAgentPoolStore::new(self.root.clone())
}
pub fn tool_execution(&self) -> FileToolExecutionStore {
FileToolExecutionStore::new(self.root.clone())
}
}