gglib_core/domain/
mod.rs

1//! Core domain types.
2//!
3//! These types represent the pure domain model, independent of any
4//! infrastructure concerns (database, filesystem, etc.).
5//!
6//! # Structure
7//!
8//! - `agent` - Agent loop types (`AgentConfig`, `AgentMessage`, `AgentEvent`, etc.)
9//! - `model` - Model types (`Model`, `NewModel`)
10//! - `mcp` - MCP server types (`McpServer`, `NewMcpServer`, etc.)
11//! - `chat` - Chat conversation and message types
12//! - `gguf` - GGUF metadata and capability types
13//! - `capabilities` - Model capability detection and inference
14//! - `thinking` - Thinking/reasoning tag parsing and streaming accumulation
15
16pub mod agent;
17pub mod capabilities;
18pub mod chat;
19pub mod gguf;
20pub mod inference;
21pub mod mcp;
22mod model;
23pub mod thinking;
24
25// Re-export model types at the domain level for convenience
26pub use model::{Model, ModelFile, ModelFilterOptions, NewModel, NewModelFile, RangeValues};
27
28// Re-export inference types at the domain level for convenience
29pub use inference::InferenceConfig;
30
31// Re-export MCP types at the domain level for convenience
32pub use mcp::{
33    McpEnvEntry, McpServer, McpServerConfig, McpServerStatus, McpServerType, McpTool,
34    McpToolResult, NewMcpServer, UpdateMcpServer,
35};
36
37// Re-export chat types at the domain level for convenience
38pub use chat::{
39    Conversation, ConversationUpdate, Message, MessageRole, NewConversation, NewMessage,
40};
41
42// Re-export GGUF types at the domain level for convenience
43pub use gguf::{
44    CapabilityFlags, GgufCapabilities, GgufMetadata, GgufValue, RawMetadata, ReasoningDetection,
45    ToolCallingDetection,
46};
47
48// Re-export agent types at the domain level for convenience
49pub use agent::{
50    AGENT_EVENT_CHANNEL_CAPACITY, AgentConfig, AgentConfigError, AgentEvent, AgentMessage,
51    AssistantContent, DEFAULT_MAX_ITERATIONS, DEFAULT_MAX_PARALLEL_TOOLS,
52    DEFAULT_MAX_STAGNATION_STEPS, LlmStreamEvent, MAX_ITERATIONS_CEILING,
53    MAX_PARALLEL_TOOLS_CEILING, MAX_TOOL_TIMEOUT_MS_CEILING, MIN_CONTEXT_BUDGET_CHARS,
54    MIN_TOOL_TIMEOUT_MS, ToolCall, ToolDefinition, ToolResult,
55};
56
57// Re-export capability types at the domain level for convenience
58pub use capabilities::{
59    ChatMessage, ModelCapabilities, infer_from_chat_template, transform_messages_for_capabilities,
60};
61
62// Re-export thinking types at the domain level for convenience
63pub use thinking::{
64    ParsedThinkingContent, ThinkingAccumulator, ThinkingEvent, embed_thinking_content,
65    format_thinking_duration, has_thinking_content, normalize_thinking_tags,
66    parse_thinking_content,
67};