Expand description
Β§ports
Port definitions (trait abstractions) for external systems.
Ports define the interfaces that the core domain expects from infrastructure. They contain no implementation details and use only domain types.
Β§Design Rules
- No
sqlxtypes in any signature - No process/filesystem implementation details
- Traits are minimal and CRUD-focused for repositories
- Intent-based methods throughout (not implementation-leaking)
Modules
Re-exportsΒ§
pub use chat_history::ChatHistoryError;pub use chat_history::ChatHistoryRepository;pub use gguf_parser::GgufCapabilities;pub use gguf_parser::GgufMetadata;pub use huggingface::HfClientPort;pub use huggingface::HfFileInfo;pub use huggingface::HfPortError;pub use huggingface::HfQuantInfo;pub use huggingface::HfRepoInfo;pub use huggingface::HfSearchOptions;pub use huggingface::HfSearchResult;pub use model_catalog::CatalogError;pub use model_catalog::ModelCatalogPort;pub use model_catalog::ModelLaunchSpec;pub use model_catalog::ModelSummary;pub use model_runtime::Admission;pub use model_runtime::AdmissionLease;pub use model_runtime::AdmissionRelease;pub use model_runtime::LaunchOverrides;pub use model_runtime::ModelRuntimeError;pub use model_runtime::ModelRuntimePort;pub use model_runtime::NoopModelRuntime;pub use model_runtime::PinnedSpec;pub use model_runtime::RunningTarget;pub use model_runtime::RuntimeErrorEnvelope;
ModulesΒ§
- agent π
- Agent loop port traits.
- benchmark π
- Benchmark repository port definition.
- chat_
history - Chat history repository port definition.
- download π
- Download port definitions (trait abstractions).
- download_
manager π - Download manager port definition.
- event_
emitter π - Event emitter trait for cross-crate event broadcasting.
- gguf_
parser π - GGUF parser port definition.
- huggingface
- huggingface
- llm_
completion π - Port definition for streaming LLM chat completions.
- loop_
guard_ πtrips - Outbound ports for the loop guardβs log: a sink and a reader.
- mcp_dto π
- MCP DTOs for cross-boundary communication (Tauri, Axum, TypeScript).
- mcp_
error π - MCP service error types.
- mcp_
repository π - MCP server repository trait and error types.
- model_
catalog - Model catalog port for listing and resolving models.
- model_
registrar π - Model registrar port definition.
- model_
repository π - Model repository trait definition.
- model_
runtime - Model runtime port for proxy model management.
- process_
runner π - The two value types a model-server launch is described and tracked by.
- remote_
gateway π - The proxyβs view of the remote tunnel.
- retry_
observer π - Outbound port for reporting retry activity.
- server_
health π - Server health status types for monitoring.
- server_
log_ πsink - Server log sink port for structured log capture.
- settings_
repository π - Settings repository trait definition.
- system_
probe π - System probe port for dependency and GPU detection.
- tool_
executor_ πfilter - Tool Executor Filter
- tool_
support π - Tool support detection port.
- usage_
sink π - Outbound port for recording per-request token usage.
StructsΒ§
- Agent
RunOutput - Output returned by a successful
AgentLoopPort::runinvocation. - Completed
Download - Information about a completed download for model registration.
- Download
Manager Config - Configuration for creating a download manager.
- Download
Request - Request to queue a new download.
- Empty
Tool Executor - A
ToolExecutorPortthat exposes no tools and rejects all execution. - Filtered
Tool Executor - Decorator that restricts a
ToolExecutorPortto a named allowlist. - Noop
Emitter - A no-op event emitter for tests and CLI contexts.
- Noop
Gguf Parser - A no-op GGUF parser that returns default/empty metadata.
- Process
Handle - Handle to a running server process.
- Repos
- Container for all repository trait objects.
- Resolution
- Result of resolving files for a quantization.
- Resolution
Attempt - A single resolution attempt for diagnostics.
- Resolution
Status - Result of executable path resolution for a server.
- Resolved
File - A single resolved file.
- Server
Config - Configuration for starting a model server.
- Tool
Support Detection - Result of tool support detection.
- Tool
Support Detection Input - Input for tool support detection.
EnumsΒ§
- Agent
Error - Errors that terminate the agentic loop.
- Core
Error - Core error type for semantic domain errors.
- Gguf
Parse Error - Errors that can occur during GGUF parsing.
- Jinja
Mode - What position a launch takes on Jinja chat templating.
- McpRepository
Error - Domain-specific errors for MCP repository operations.
- McpService
Error - Domain-specific errors for MCP service operations.
- Model
Source - The source/provider of the model being analyzed.
- Repository
Error - Domain-specific errors for repository operations.
- Server
Health Status - Health status of a running server process.
- Tool
Format - Tool calling format detected.
ConstantsΒ§
- TOOL_
NOT_ AVAILABLE_ MSG - Sentinel phrase embedded in every tool-rejection error produced by this module.
TraitsΒ§
- Agent
Loop Port - Port: drives the full backend agentic loop.
- AppEvent
Emitter - Trait for emitting application events.
- Benchmark
Repository Port - Repository interface for benchmark persistence.
- Download
Manager Port - Gguf
Parser Port - Port for parsing GGUF file metadata.
- LlmCompletion
Port - Port that the agent loop uses to drive a streaming LLM.
- Loop
Guard Trip Log - Reads the loop guardβs log back.
- Loop
Guard Trip Sink - Where the loop guardβs step records what it did.
- McpServer
Repository - Repository trait for MCP server persistence.
- Model
Registrar Port - Port for registering downloaded models in the database.
- Model
Repository - Repository for model persistence operations.
- Quantization
Resolver - Trait for resolving quantization-specific files from a model repository.
- Remote
Gateway Port - What the proxy may ask the tunnelβs owner.
- Retry
Observer - A sink for retry activity on a request that is being re-attempted.
- Server
LogSink Port - Port for appending server log lines to a sink.
- Settings
Repository - Repository for application settings persistence.
- System
Probe Port - Port for probing system dependencies and hardware.
- Tool
Executor Port - Port: dispatches tool calls to the underlying execution backend.
- Tool
Support Detector Port - Port for detecting tool/function calling support in models.
- Usage
Sink - A sink for one completed requestβs token usage.
Type AliasesΒ§
- Settings
Change - A change to stored settings: given them as they stand, alter them in
place or refuse. What
SettingsRepository::modifyapplies, and free to borrow what it needs for'a.