feat(tui): implement status bar with connection and turn state indicators feat(tui): create workflow panel for agent status and progress visualization feat(web): introduce web frontend interface with static file serving feat(ws): add WebSocket interface for real-time communication and session management
53 lines
2.3 KiB
Rust
53 lines
2.3 KiB
Rust
//! # Zesdex Domain Layer
|
|
//!
|
|
//! Pure domain entities, value objects, repository traits, and service traits
|
|
//! for the Zesdex application. This crate has **zero framework dependencies**
|
|
//! — it depends only on serialization (`serde`), timestamping (`chrono`),
|
|
//! identity (`uuid`), and a few other narrowly-scoped utilities.
|
|
//!
|
|
//! ## Architecture
|
|
//!
|
|
//! ```text
|
|
//! apps/domain
|
|
//! ├── core/ Shared domain entities (Conversation, Message, Provider,
|
|
//! │ Store, ToolCall, ToolResult, Usage)
|
|
//! ├── auth/ Authentication domain (Session, SessionId, SessionLock,
|
|
//! │ OAuth, commands, errors, repository/service traits)
|
|
//! ├── cms/ CMS domain (AppConfig, Conversation, EditLog, Memory,
|
|
//! │ Settings, commands, errors, repository/service traits)
|
|
//! └── error.rs Unified DomainError type
|
|
//! ```
|
|
//!
|
|
//! ## Key Design Principle
|
|
//!
|
|
//! All types are pure Rust structs and enums with `serde` derives. No I/O,
|
|
//! no framework imports, no side effects. All persistence is expressed
|
|
//! through repository traits that infrastructure adapters implement.
|
|
|
|
pub mod auth;
|
|
pub mod cms;
|
|
pub mod core;
|
|
pub mod error;
|
|
|
|
// Re-export all public items from each module for ergonomic imports.
|
|
// Consumers can do `use zesdex_domain::*` for common types.
|
|
pub use auth::{
|
|
IamSession, NewSession, OAuthConfig, OAuthToken, OAuthRepository, OAuthService,
|
|
RepositoryError as AuthRepositoryError, ServiceError as AuthServiceError, Session,
|
|
SessionId, SessionLock, SessionLockRepository, SessionRepository, SessionService,
|
|
};
|
|
pub use cms::{
|
|
AppConfig, AppConfigRepository, Conversation as CmsConversation,
|
|
ConversationRepository, ConversationService, EditLog, EditLogEntry,
|
|
EditLogRepository, InternetMode, Memory, MemoryRepository, MemoryService,
|
|
ModelRole, NewMemory, ProviderConfig, RepositoryError as CmsRepositoryError,
|
|
ServiceError as CmsServiceError, Settings, SettingsFlags, SettingsPatch,
|
|
SettingsRepository, SettingsService,
|
|
};
|
|
pub use core::{
|
|
ChatMessage, ChatRequest, ChatResponse, Choice, Conversation, Delta, Role,
|
|
SseParser, StreamEvent, StreamOptions, Store, TokenUsage, ToolCall,
|
|
ToolCallResult, ToolDef, ToolFunction, ToolFunctionDef, UsageStats,
|
|
};
|
|
pub use error::DomainError;
|