1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! # attuned-http
//!
//! HTTP reference server for Attuned.
//!
//! This crate provides a ready-to-use HTTP server exposing the Attuned API.
//! It includes health checks, metrics, and OpenAPI documentation.
//!
//! ## Endpoints
//!
//! - `POST /v1/state` - Upsert state (patch semantics, optionally with inference)
//! - `GET /v1/state/{user_id}` - Get latest state
//! - `GET /v1/context/{user_id}` - Get PromptContext
//! - `DELETE /v1/state/{user_id}` - Delete state
//! - `POST /v1/infer` - Infer axes from message text (requires "inference" feature)
//! - `GET /health` - Health check
//! - `GET /metrics` - Prometheus metrics
//!
//! ## Features
//!
//! - `inference` - Enable automatic inference from message text. Adds the `/v1/infer`
//! endpoint and allows the `/v1/state` endpoint to accept a `message` field for
//! automatic axis inference.
//!
//! ## Example
//!
//! ```rust,ignore
//! use attuned_http::{Server, ServerConfig};
//! use attuned_store::MemoryStore;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let store = MemoryStore::default();
//! let config = ServerConfig::default();
//!
//! let server = Server::new(store, config);
//! server.run().await?;
//! Ok(())
//! }
//! ```
//!
//! ## With Inference
//!
//! ```rust,ignore
//! use attuned_http::{Server, ServerConfig};
//! use attuned_store::MemoryStore;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let store = MemoryStore::default();
//! let config = ServerConfig::default().with_inference();
//!
//! let server = Server::new(store, config);
//! server.run().await?;
//! Ok(())
//! }
//! ```
pub use ServerConfig;
pub use HttpError;
pub use AppState;
pub use ;
pub use Server;
// Re-export inference types when feature is enabled
pub use ;