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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! RiceCoder Storage and Configuration Module
//!
//! This module provides storage and configuration management for RiceCoder,
//! including global and project-local knowledge bases, configuration loading,
//! and data persistence.
//!
//! # Modules
//!
//! ## Markdown Configuration
//!
//! The [`markdown_config`] module enables users to define custom agents, modes, and commands
//! using markdown files with YAML frontmatter. This provides a user-friendly way to extend
//! RiceCoder without writing code.
//!
//! **Key Components**:
//! - [`markdown_config::ConfigurationLoader`]: Discovers and loads configuration files
//! - [`markdown_config::ConfigRegistry`]: Central registry for loaded configurations
//! - [`markdown_config::FileWatcher`]: Monitors configuration files for hot-reload
//! - [`markdown_config::MarkdownParser`]: Parses markdown with YAML frontmatter
//! - [`markdown_config::YamlParser`]: Parses and validates YAML metadata
//!
//! **Configuration File Locations**:
//! 1. Project-level: `projects/ricecoder/.agent/`
//! 2. User-level: `~/.ricecoder/agents/`, `~/.ricecoder/modes/`, `~/.ricecoder/commands/`
//! 3. System-level: `/etc/ricecoder/agents/` (Linux/macOS)
//!
//! **File Patterns**:
//! - `*.agent.md` - Agent configurations
//! - `*.mode.md` - Mode configurations
//! - `*.command.md` - Command configurations
//!
//! **Example Usage**:
//!
//! ```ignore
//! use ricecoder_storage::markdown_config::{ConfigurationLoader, ConfigRegistry};
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let registry = Arc::new(ConfigRegistry::new());
//! let loader = ConfigurationLoader::new(registry.clone());
//!
//! // Load configurations from standard locations
//! let paths = vec![
//! std::path::PathBuf::from("~/.ricecoder/agents"),
//! std::path::PathBuf::from("projects/ricecoder/.agent"),
//! ];
//!
//! loader.load_all(&paths).await?;
//!
//! // Query loaded configurations
//! if let Some(agent) = registry.get_agent("code-review") {
//! println!("Agent: {}", agent.name);
//! println!("Model: {:?}", agent.model);
//! }
//!
//! Ok(())
//! }
//! ```
//!
//! See [`markdown_config`] module documentation for detailed information.
//!
//! ## Other Modules
//!
//! - [`cache`]: Caching infrastructure for configuration and analysis results
//! - [`config`]: Configuration loading and merging
//! - [`completion`]: Code completion configurations
//! - [`lsp`]: Language Server Protocol configurations
//! - [`refactoring`]: Code refactoring configurations
//! - [`industry`]: Industry-specific file detection and handling
//! - [`global_store`]: Global knowledge base storage
//! - [`project_store`]: Project-local knowledge base storage
//! - [`manager`]: Storage manager and path resolution
//! - [`offline`]: Offline mode handling
//! - [`first_run`]: First-run initialization
// Re-export commonly used types
pub use ;
pub use ;
pub use ;
pub use ;
pub use ConfigCache;
pub use ;
pub use FirstRunHandler;
pub use GlobalStore;
pub use ;
pub use ;
pub use ;
pub use ;
pub use OfflineModeHandler;
pub use ProjectStore;
pub use ;
pub use RelocationService;
pub use ;
pub use ;