embacle_server/lib.rs
1// ABOUTME: Library root re-exporting server modules for integration testing
2// ABOUTME: Enables tests/ to access router, state, types, and handler modules
3//
4// SPDX-License-Identifier: Apache-2.0
5// Copyright (c) 2026 dravr.ai
6
7//! # embacle-server
8//!
9//! Unified OpenAI-compatible REST API + MCP server for embacle LLM runners.
10//!
11//! ## Endpoints
12//!
13//! - `POST /v1/chat/completions` — chat completion (streaming and non-streaming)
14//! - `GET /v1/models` — list available providers and models
15//! - `GET /health` — per-provider readiness check
16//! - `POST /mcp` — MCP Streamable HTTP (JSON-RPC 2.0, via embacle-mcp)
17//!
18//! ## Modules
19//!
20//! - [`completions`] — chat completion handler with multiplex fan-out
21//! - `mcp_client` — MCP stdio client pool for server-side tool execution (feature `mcp-tools`)
22//! - [`models`] — model listing endpoint
23//! - [`health`] — provider health checks
24//! - [`auth`] — optional bearer token authentication
25//! - [`streaming`] — SSE streaming for OpenAI-format responses
26//! - [`provider_resolver`] — `provider:model` string routing
27//! - [`router`] — Axum router wiring all endpoints (`OpenAI` + MCP)
28//! - [`state`] — re-export of unified state from embacle-mcp
29//! - [`runner`] — runner factory bridging to embacle core
30
31#![cfg_attr(
32 test,
33 allow(
34 clippy::unwrap_used,
35 clippy::expect_used,
36 clippy::panic,
37 clippy::str_to_string
38 )
39)]
40
41pub mod auth;
42pub mod completions;
43pub mod health;
44#[cfg(feature = "mcp-tools")]
45pub mod mcp_client;
46pub mod models;
47pub mod openai_types;
48pub mod provider_resolver;
49pub mod router;
50pub mod runner;
51pub mod state;
52pub mod streaming;