Expand description
Kaiba Domain Library
Core domain types and interfaces for the Kaiba AI persona system.
§Architecture
This crate follows Clean Architecture / Hexagonal Architecture principles:
-
Domain Layer (
domain/): Pure business entities and logicentities/: Core domain models (Rei, Tei, Memory, Call, Prompt)value_objects/: Immutable value types (MemoryType, TagMatchMode)errors/: Domain-specific error types
-
Ports (
ports/): Abstract interfaces (traits)repositories/: Data access interfacesservices/: External service interfaces
§Usage
ⓘ
use kaiba::domain::{Rei, Tei, Memory};
use kaiba::ports::{ReiRepository, EmbeddingService};Re-exports§
pub use domain::BuildStats;pub use domain::Call;pub use domain::DeliveryStatus;pub use domain::Document;pub use domain::DomainError;pub use domain::EdgeType;pub use domain::EmphasisNode;pub use domain::EmphasisParseResult;pub use domain::EmphasisParser;pub use domain::EmphasisParserConfig;pub use domain::EmphasisStyle;pub use domain::EmphasisWeights;pub use domain::GraphBuildResult;pub use domain::GraphBuilder;pub use domain::GraphEdge;pub use domain::GraphNode;pub use domain::GraphPath;pub use domain::LinkageConfig;pub use domain::LinkageStrategy;pub use domain::Memory;pub use domain::MemoryType;pub use domain::Message;pub use domain::NodeType;pub use domain::Prompt;pub use domain::Provider;pub use domain::Rei;pub use domain::ReiState;pub use domain::ReiTei;pub use domain::ReiWebhook;pub use domain::SearchConfig;pub use domain::SearchStrategy;pub use domain::TagMatchMode;pub use domain::Tei;pub use domain::TextPosition;pub use domain::WebhookDelivery;pub use domain::WebhookEventType;pub use domain::WebhookPayload;pub use ports::ChatMessage;pub use ports::CompletionOptions;pub use ports::CompletionResponse;pub use ports::DeleteBatchResult;pub use ports::DocRepository;pub use ports::DocumentSaveResult;pub use ports::EdgeBatchResult;pub use ports::EmbeddingService;pub use ports::GraphRepository;pub use ports::GraphStats;pub use ports::IntegrationConfig;pub use ports::IntegrationEvent;pub use ports::MemoryRepository;pub use ports::MemorySearchFilter;pub use ports::MessageRole;pub use ports::NodeBatchResult;pub use ports::ReiRepository;pub use ports::ReiWebhookRepository;pub use ports::SaveStatus;pub use ports::TeiIntegration;pub use ports::TeiLlmProvider;pub use ports::TeiRepository;pub use ports::TeiWebhook;pub use ports::TokenUsage;pub use ports::TraversalQuery;pub use ports::WebSearchResult;pub use ports::WebSearchService;pub use ports::WebhookDeliveryConfig;