Skip to main content

Module domain

Module domain 

Source
Expand description

§domain

Core domain types.

These types represent the pure domain model, independent of any infrastructure concerns (database, filesystem, etc.).

§Structure

  • agent - Agent loop types (AgentConfig, AgentMessage, AgentEvent, etc.)
  • model - Model types (Model, NewModel)
  • model_naming - Shared model-naming policy (resolve_model_name, NameSource)
  • mcp - MCP server types (McpServer, NewMcpServer, etc.)
  • chat - Chat conversation and message types
  • gguf - GGUF metadata and capability types
  • capabilities - Model capability detection and inference
  • thinking - Thinking/reasoning tag parsing and streaming accumulation

Modules

Re-exports§

pub use query::ModelListQuery;
pub use query::ModelSortBy;
pub use query::SortOrder;
pub use query::apply_query;
pub use benchmark::BenchmarkEvent;
pub use benchmark::BenchmarkModelResult;
pub use benchmark::BenchmarkRun;
pub use benchmark::BenchmarkRunStatus;
pub use benchmark::BenchmarkRunType;
pub use benchmark::CandidateSource;
pub use benchmark::CompareConfig;
pub use benchmark::ModelBenchmarkSummary;
pub use benchmark::ModelCompareResult;
pub use benchmark::ModelPerfResult;
pub use benchmark::PerfConfig;
pub use benchmark::ScoreWeights;
pub use benchmark::SweepSpec;
pub use benchmark::TaskCategory;
pub use benchmark::TaskSuite;
pub use benchmark::TuneCandidateResult;
pub use benchmark::TuneConfig;
pub use benchmark::TuneTask;
pub use benchmark::TuneTaskResult;
pub use inference::DefaultsOrigin;
pub use inference::InferenceConfig;
pub use inference::ModelSamplingContext;
pub use inference_profile::InferenceProfile;
pub use inference_profile::MAX_PROFILE_NAME_LEN;
pub use inference_profile::ProfileNameError;
pub use inference_profile::RESERVED_PROFILE_NAMES;
pub use inference_profile::builtin_templates;
pub use inference_profile::validate_name;
pub use kv_estimate::KvElemsPerToken;
pub use kv_estimate::estimate_kv_bytes_for_context;
pub use kv_estimate::estimate_kv_elems_per_token;
pub use kv_estimate::kv_bytes_per_token;
pub use kv_memory::kv_memory_is_partial;
pub use cache_budget::CACHE_RAM_FLOOR_BYTES;
pub use cache_budget::CACHE_RAM_HEADROOM_BYTES;
pub use cache_budget::CACHE_RAM_LOW_WATERMARK_BYTES;
pub use cache_budget::CACHE_RAM_UNKNOWN_KV_ALLOWANCE_BYTES;
pub use cache_budget::CacheRamHealth;
pub use cache_budget::classify_cache_ram;
pub use cache_budget::compute_auto_cache_ram_mb;
pub use slot_eviction::DISK_BUDGET_FRACTION_DIVISOR;
pub use slot_eviction::SlotFileMeta;
pub use slot_eviction::compute_auto_disk_budget_bytes;
pub use slot_eviction::select_evictions;
pub use mcp::McpEnvEntry;
pub use mcp::McpLifecycle;
pub use mcp::McpServer;
pub use mcp::McpServerConfig;
pub use mcp::McpServerStatus;
pub use mcp::McpServerType;
pub use mcp::McpTool;
pub use mcp::McpToolResult;
pub use mcp::NewMcpServer;
pub use mcp::SEARCH_RESULTS_CAP;
pub use mcp::ToolIndex;
pub use mcp::ToolSummary;
pub use mcp::UpdateMcpServer;
pub use chat::Conversation;
pub use chat::ConversationUpdate;
pub use chat::Message;
pub use chat::MessageRole;
pub use chat::NewConversation;
pub use chat::NewMessage;
pub use gguf::CapabilityFlags;
pub use gguf::GgufCapabilities;
pub use gguf::GgufMetadata;
pub use gguf::GgufValue;
pub use gguf::RawMetadata;
pub use gguf::ReasoningDetection;
pub use gguf::ToolCallingDetection;
pub use model_naming::NameSource;
pub use model_naming::UNKNOWN_MODEL_NAME;
pub use model_naming::declared_name;
pub use model_naming::repo_short_name;
pub use model_naming::resolve_model_name;
pub use model_naming::strip_gguf_suffix;
pub use agent::AGENT_EVENT_CHANNEL_CAPACITY;
pub use agent::AgentConfig;
pub use agent::AgentConfigError;
pub use agent::AgentEvent;
pub use agent::AgentMessage;
pub use agent::AssistantContent;
pub use agent::DEFAULT_MAX_ITERATIONS;
pub use agent::DEFAULT_MAX_PARALLEL_TOOLS;
pub use agent::DEFAULT_MAX_STAGNATION_STEPS;
pub use agent::LlmStreamEvent;
pub use agent::MAX_ITERATIONS_CEILING;
pub use agent::MAX_PARALLEL_TOOLS_CEILING;
pub use agent::MAX_TOOL_TIMEOUT_MS_CEILING;
pub use agent::MIN_CONTEXT_BUDGET_CHARS;
pub use agent::MIN_TOOL_TIMEOUT_MS;
pub use agent::ToolCall;
pub use agent::ToolDefinition;
pub use agent::ToolResult;
pub use capabilities::ChatMessage;
pub use capabilities::MessageContent;
pub use capabilities::ModelCapabilities;
pub use capabilities::capabilities_from_architecture;
pub use capabilities::infer_from_chat_template;
pub use capabilities::transform_messages_for_capabilities;
pub use council::ApprovalKind;
pub use council::CouncilEvent;
pub use council::HitlMode;
pub use council::MAX_DEPTH;
pub use council::MAX_NODES;
pub use council::NodeId;
pub use council::NodeStatus;
pub use council::TaskGraph;
pub use council::TaskGraphError;
pub use council::TaskNode;

Modules§

agent
agent
benchmark
benchmark
cache_budget
Auto-sizing math for llama-server’s host-RAM prompt cache (--cache-ram).
capabilities
Model capability detection, inference, and request transformation.
chat
Chat domain types.
council
council
gguf
GGUF domain types.
inference
Inference configuration types.
inference_profile
Named, cross-model sampling profiles.
kv_estimate
KV-cache size estimation from GGUF metadata.
kv_memory
Detection of partial-KV-memory architectures from GGUF metadata.
mcp
mcp
model 🔒
Model domain types.
model_naming
Shared model-naming policy.
query
Model list query, filter, and sort types.
server_config 🔒
Server-level default configuration for models.
slot_eviction
Byte-budget selection for on-disk KV slot cache eviction.

Structs§

Model
A model that exists in the system with a database ID.
ModelFile
Represents a single file (shard) belonging to a model.
ModelFilterOptions
Filter options for the model library UI.
NewModel
A model to be inserted into the system (no ID yet).
NewModelFile
A model file entry to be inserted into the system (no ID yet).
RangeValues
A range of numeric values with min and max.
ServerConfig
Server-level defaults for a specific model.

Constants§

SYSTEM_TAG_PREFIX
Prefix marking a tag as runtime-load-bearing.

Functions§

is_system_tag
Returns true when tag is a system tag that callers must not remove through the standard tag-mutation API.