agent_sdk_store_file/
bundle.rs1use std::path::{Path, PathBuf};
2
3use crate::{
4 FileAgentPoolStore, FileCheckpointStore, FileContentStore, FileEventArchive,
5 FileProviderArgumentStore, FileRunJournal, FileToolExecutionStore,
6};
7
8#[derive(Clone, Debug)]
9pub struct FileStoreBundle {
11 root: PathBuf,
12}
13
14impl FileStoreBundle {
15 pub fn new(root: impl Into<PathBuf>) -> Self {
17 Self { root: root.into() }
18 }
19
20 pub fn root(&self) -> &Path {
22 &self.root
23 }
24
25 pub fn journal(&self) -> FileRunJournal {
27 FileRunJournal::new(self.root.clone())
28 }
29
30 pub fn checkpoints(&self) -> FileCheckpointStore {
32 FileCheckpointStore::new(self.root.clone())
33 }
34
35 pub fn content(&self) -> FileContentStore {
37 FileContentStore::new(self.root.clone())
38 }
39
40 pub fn event_archive(&self) -> FileEventArchive {
42 FileEventArchive::new(self.root.clone())
43 }
44
45 pub fn provider_arguments(&self) -> FileProviderArgumentStore {
47 FileProviderArgumentStore::new(self.root.clone())
48 }
49
50 pub fn agent_pool(&self) -> FileAgentPoolStore {
52 FileAgentPoolStore::new(self.root.clone())
53 }
54
55 pub fn tool_execution(&self) -> FileToolExecutionStore {
57 FileToolExecutionStore::new(self.root.clone())
58 }
59}