2026-07-19 17:05:27 +07:00
|
|
|
//! Domain layer — pure entities, value objects, repository traits, and service interfaces.
|
2026-07-16 12:32:17 +07:00
|
|
|
//!
|
2026-07-19 17:05:27 +07:00
|
|
|
//! This is the innermost layer of the Clean Architecture onion. It has **zero
|
|
|
|
|
//! infrastructure dependencies** — all I/O is expressed through repository
|
|
|
|
|
//! traits defined in [`repository`], and business operations through service
|
|
|
|
|
//! traits in [`service`].
|
|
|
|
|
//!
|
|
|
|
|
//! ## Sub-modules
|
|
|
|
|
//! - `app_config` — provider configuration model (`AppConfig`, `ProviderConfig`, `ModelRole`)
|
|
|
|
|
//! - `conversation` — conversation entity + chat message model (`Conversation`, `ChatMessage`)
|
|
|
|
|
//! - `edit_log` — edit log model (`EditLog`, `EditLogEntry`)
|
|
|
|
|
//! - `memory` — memory file model (`Memory`)
|
|
|
|
|
//! - `settings` — application settings model (`Settings`, `InternetMode`, `SettingsFlags`)
|
|
|
|
|
//! - `repository` — trait definitions for all persistence adapters
|
|
|
|
|
//! - `service` — trait definitions for all application services
|
|
|
|
|
//!
|
|
|
|
|
//! ## Key Design Principle
|
|
|
|
|
//! Domain types are plain Rust structs with `serde` for serialisation.
|
|
|
|
|
//! They contain no I/O, no framework imports, and no side effects.
|
2026-07-16 12:32:17 +07:00
|
|
|
|
|
|
|
|
pub mod app_config;
|
2026-07-20 06:53:01 +07:00
|
|
|
pub mod commands;
|
2026-07-16 12:32:17 +07:00
|
|
|
pub mod conversation;
|
|
|
|
|
pub mod edit_log;
|
2026-07-20 06:14:23 +07:00
|
|
|
pub mod error;
|
2026-07-16 12:32:17 +07:00
|
|
|
pub mod memory;
|
|
|
|
|
pub mod repository;
|
|
|
|
|
pub mod service;
|
|
|
|
|
pub mod settings;
|
|
|
|
|
|
|
|
|
|
pub use app_config::AppConfig;
|
|
|
|
|
pub use app_config::ModelRole;
|
|
|
|
|
pub use app_config::ProviderConfig;
|
|
|
|
|
pub use conversation::Conversation;
|
|
|
|
|
pub use edit_log::EditLog;
|
|
|
|
|
pub use edit_log::EditLogEntry;
|
|
|
|
|
pub use memory::Memory;
|
|
|
|
|
pub use repository::AppConfigRepository;
|
|
|
|
|
pub use repository::ConversationRepository;
|
|
|
|
|
pub use repository::EditLogRepository;
|
|
|
|
|
pub use repository::MemoryRepository;
|
|
|
|
|
pub use repository::SettingsRepository;
|
|
|
|
|
pub use service::ConversationService;
|
|
|
|
|
pub use service::MemoryService;
|
|
|
|
|
pub use service::SettingsService;
|
|
|
|
|
pub use settings::InternetMode;
|
|
|
|
|
pub use settings::Settings;
|
|
|
|
|
pub use settings::SettingsFlags;
|