gestura_core_config/lib.rs
1//! Configuration types, validation, environment loading, and file watching.
2//!
3//! `gestura-core-config` is the source of truth for Gestura configuration data
4//! structures and pure configuration workflows.
5//!
6//! ## Responsibilities
7//!
8//! - `AppConfig` and nested configuration structs/enums
9//! - environment-variable loading and override helpers
10//! - validation rules and config sanity checks
11//! - file watching for live reload flows
12//! - hook and plugin configuration models
13//!
14//! ## Configuration model
15//!
16//! Gestura persists user configuration primarily as YAML at
17//! `~/.gestura/config.yaml`. The typed structures in this crate are designed to
18//! keep that file human-readable while still supporting richer runtime behavior.
19//!
20//! High-signal areas in the config model include:
21//!
22//! - LLM provider selection and provider-specific settings
23//! - voice/STT provider settings and local-model paths
24//! - pipeline limits, compaction, and reflection settings
25//! - permissions, hooks, UI preferences, and developer options
26//!
27//! ## Precedence and portability
28//!
29//! This crate owns the *pure* parts of configuration behavior:
30//!
31//! - defaults embedded in Rust types
32//! - file serialization/deserialization
33//! - environment-variable overrides via `GESTURA_*`
34//! - validation and config-key discovery
35//!
36//! Because these behaviors are side-effect-light and portable, they can be used
37//! consistently from the CLI, GUI, tests, and tooling.
38//!
39//! ## Boundary with `gestura-core`
40//!
41//! This crate avoids runtime integrations that require security-sensitive or
42//! platform-specific bridges. Keychain hydration, secure secret migration,
43//! legacy on-disk migration wiring, and other security-dependent extensions
44//! remain in the `gestura-core::config` facade layer.
45//!
46//! For most consumers, the stable public import paths remain
47//! `gestura_core::config::*` and `gestura_core::config_env::*`.
48
49pub mod config_env;
50pub mod hooks_types;
51pub mod types;
52pub mod validation;
53pub mod watcher;
54
55// Re-export everything at crate root for convenience
56pub use config_env::*;
57pub use hooks_types::*;
58pub use types::*;
59pub use validation::*;
60pub use watcher::*;