-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathstore.rs
More file actions
32 lines (29 loc) · 1.15 KB
/
store.rs
File metadata and controls
32 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! Store abstraction for Decapod's state management.
//!
//! This module provides the fundamental data model for Decapod's dual-store architecture.
//! Two store types are supported: User (local mutable) and Repo (project-scoped deterministic).
use std::path::PathBuf;
/// Store type discriminator for dual-store architecture.
///
/// Decapod maintains two distinct stores with different semantics:
/// - `User`: Agent-local state (blank slate, no automatic seeding)
/// - `Repo`: Project-scoped state (dogfood backlog, event-sourced, deterministic rebuild)
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum StoreKind {
/// User store: Agent-local workspace at `~/.decapod/data/`
User,
/// Repo store: Project-scoped workspace at `<repo>/.decapod/data/`
Repo,
}
/// Store handle representing a Decapod state workspace.
///
/// A Store is a logical container for Decapod's state databases and event logs.
/// All subsystem state (TODO, health, knowledge, etc.) is scoped to a store.
///
#[derive(Debug, Clone)]
pub struct Store {
/// Store type (User or Repo)
pub kind: StoreKind,
/// Absolute path to the store root directory
pub root: PathBuf,
}