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
//! # ferro-ai
//!
//! AI structured classification and confirmation primitives for the Ferro framework.
//!
//! ## Classification
//!
//! Provider-abstracted wrapper for LLM structured JSON output with configurable
//! schema, model selection, confidence threshold, and retry behavior.
//!
//! ```rust,ignore
//! use ferro_ai::{Classifier, ClassifierConfig, AnthropicProvider};
//! use serde::Deserialize;
//! use std::sync::Arc;
//!
//! #[derive(Deserialize)]
//! struct CommandIntent {
//! action: String,
//! confidence: f64,
//! }
//!
//! let provider = AnthropicProvider::from_env().unwrap();
//! let classifier = Classifier::<CommandIntent>::new(
//! Arc::new(provider),
//! ClassifierConfig::default(),
//! );
//! ```
//!
//! ## Confirmation
//!
//! State machine for gating destructive actions behind explicit user confirmation
//! with configurable TTL expiry and event-driven observability.
//!
//! ```rust,ignore
//! use ferro_ai::{InMemoryConfirmationStore, ConfirmationStore};
//! use std::time::Duration;
//!
//! let store = InMemoryConfirmationStore::new();
//! let payload = serde_json::json!({"action": "delete_user", "user_id": 42});
//!
//! store.request_confirmation("confirm-delete-42", payload, Duration::from_secs(60)).await?;
//! let confirmed = store.confirm("confirm-delete-42").await?;
//! ```
pub use AnthropicProvider;
pub use ClassificationProvider;
pub use ;
pub use ConfirmationExpired;
pub use InMemoryConfirmationStore;
pub use ;
pub use Error;