pub struct StorePaths { /* private fields */ }Expand description
Path-builder for the zenith local store rooted at a data directory.
All methods are pure: they compute a PathBuf via Path::join and
return it without touching the filesystem.
Implementations§
Source§impl StorePaths
impl StorePaths
Sourcepub fn docs_root(&self) -> PathBuf
pub fn docs_root(&self) -> PathBuf
The root directory holding all per-document history: <root>/docs.
Sourcepub fn doc_dir(&self, doc_id: &str) -> PathBuf
pub fn doc_dir(&self, doc_id: &str) -> PathBuf
Directory that contains all data for a given document.
<root>/docs/<doc_id>
Sourcepub fn objects_dir(&self, doc_id: &str) -> PathBuf
pub fn objects_dir(&self, doc_id: &str) -> PathBuf
Directory that holds immutable object blobs for a document.
<root>/docs/<doc_id>/objects
Sourcepub fn versions_file(&self, doc_id: &str) -> PathBuf
pub fn versions_file(&self, doc_id: &str) -> PathBuf
Append-only version manifest file for a document.
<root>/docs/<doc_id>/versions.jsonl
Sourcepub fn session_dir(&self, doc_id: &str) -> PathBuf
pub fn session_dir(&self, doc_id: &str) -> PathBuf
Mutable local session state directory for a document.
<root>/docs/<doc_id>/session
Sourcepub fn meta_file(&self, doc_id: &str) -> PathBuf
pub fn meta_file(&self, doc_id: &str) -> PathBuf
Persisted per-doc metadata file.
<root>/docs/<doc_id>/meta.json
Sourcepub fn runs_file(&self, doc_id: &str) -> PathBuf
pub fn runs_file(&self, doc_id: &str) -> PathBuf
Append-only agent-runs log: <root>/docs/<doc_id>/runs.jsonl.
Sourcepub fn previews_file(&self, doc_id: &str) -> PathBuf
pub fn previews_file(&self, doc_id: &str) -> PathBuf
Append-only preview-artifacts log: <root>/docs/<doc_id>/previews.jsonl.
Sourcepub fn scratch_dir(&self, doc_id: &str) -> PathBuf
pub fn scratch_dir(&self, doc_id: &str) -> PathBuf
Scratch/candidate directory: <root>/docs/<doc_id>/scratch.
Sourcepub fn scratch_index(&self, doc_id: &str) -> PathBuf
pub fn scratch_index(&self, doc_id: &str) -> PathBuf
Scratch/candidate index: <root>/docs/<doc_id>/scratch/index.jsonl.
Sourcepub fn workspace_dir(&self, doc_id: &str) -> PathBuf
pub fn workspace_dir(&self, doc_id: &str) -> PathBuf
Per-document workspace directory for ephemeral working artifacts that are
NOT part of the deliverable .zen: <root>/docs/<doc_id>/workspace.
Sourcepub fn workspace_renders_dir(&self, doc_id: &str) -> PathBuf
pub fn workspace_renders_dir(&self, doc_id: &str) -> PathBuf
Predictable scratch area for rendered previews produced via the agent
(MCP) surface: <root>/docs/<doc_id>/workspace/renders.
Keeping previews here means the .zen holds only final content while the
agent still has one stable, per-document place to find its render output.