gglib_core/
lib.rs

1#![doc = include_str!(concat!(env!("OUT_DIR"), "/README_GENERATED.md"))]
2#![deny(unused_crate_dependencies)]
3
4pub mod contracts;
5pub mod domain;
6pub mod download;
7pub mod events;
8pub mod paths;
9pub mod ports;
10pub mod services;
11pub mod settings;
12pub mod utils;
13
14// Re-export commonly used types for convenience
15pub use domain::{
16    ChatMessage, Conversation, ConversationUpdate, McpEnvEntry, McpServer, McpServerConfig,
17    McpServerStatus, McpServerType, McpTool, McpToolResult, Message, MessageRole, Model,
18    ModelCapabilities, ModelFilterOptions, NewConversation, NewMcpServer, NewMessage, NewModel,
19    RangeValues, UpdateMcpServer, infer_from_chat_template, transform_messages_for_capabilities,
20};
21pub use download::{
22    AttemptCounts, CompletionDetail, CompletionKey, CompletionKind, DownloadError, DownloadEvent,
23    DownloadId, DownloadResult, DownloadStatus, DownloadSummary, FailedDownload, Quantization,
24    QueueRunSummary, QueueSnapshot, QueuedDownload, ShardInfo,
25};
26pub use events::{AppEvent, McpServerSummary, ModelSummary, ServerSnapshotEntry};
27pub use ports::{
28    AppEventBridge, AppEventEmitter, ChatHistoryError, ChatHistoryRepository, CompletedDownload,
29    CoreError, DownloadEventEmitterPort, DownloadManagerConfig, DownloadManagerPort,
30    DownloadRequest, DownloadStateRepositoryPort, GgufCapabilities, GgufMetadata, GgufParseError,
31    GgufParserPort, HfClientPort, HfFileInfo, HfPortError, HfQuantInfo, HfRepoInfo,
32    HfSearchOptions, HfSearchResult, McpErrorCategory, McpErrorInfo, McpRepositoryError,
33    McpServerRepository, McpServiceError, ModelRegistrarPort, ModelRepository, NoopDownloadEmitter,
34    NoopEmitter, NoopGgufParser, ProcessError, ProcessHandle, ProcessRunner, QuantizationResolver,
35    Repos, RepositoryError, Resolution, ResolvedFile, ServerConfig, ServerHealth,
36    SettingsRepository,
37};
38pub use services::{ChatHistoryService, ModelRegistrar};
39pub use settings::{
40    DEFAULT_LLAMA_BASE_PORT, DEFAULT_PROXY_PORT, Settings, SettingsError, SettingsUpdate,
41    validate_settings,
42};
43
44// Re-export path utilities
45pub use paths::{
46    DEFAULT_MODELS_DIR_RELATIVE, DirectoryCreationStrategy, ModelsDirResolution, ModelsDirSource,
47    PathError, data_root, database_path, default_models_dir, ensure_directory, env_file_path,
48    is_prebuilt_binary, llama_cli_path, llama_config_path, llama_cpp_dir, llama_server_path,
49    persist_env_value, persist_models_dir, resolve_models_dir, resource_root, verify_writable,
50};
51
52// Silence unused dev-dependency warnings until we add mock-based tests
53#[cfg(test)]
54use mockall as _;
55#[cfg(test)]
56use tokio_test as _;