//! # llm-extract
//!
//! Extract structured data from LLM responses.
//!
//! ## 2-Layer Architecture
//!
//! - **Layer 1** (`extract_json`): `&str → serde_json::Value`
//!   - Fence strip → bracket match → sanitize → parse
//! - **Layer 2** (`extract`): `&str → T`
//!   - Layer 1 + fuzzy repair → deserialize
//!
//! ## Quick Start
//!
//! ```rust
//! use llm_extract::extract_json;
//!
//! let text = r#"Here's the result: ```json
//! {"status": "ok", "count": 42}
//! ```"#;
//!
//! let value = extract_json(text).unwrap();
//! assert_eq!(value["status"], "ok");
//! ```

pub mod bracket;
pub mod error;
pub mod fence;
pub mod pipeline;
pub mod schema;

// Re-export core API
pub use bracket::{extract_all_json_entities, extract_json_entity};
pub use error::{ExtractError, Extracted};
pub use fence::{strip_fences, strip_think_blocks};
pub use pipeline::{
    extract, extract_all, extract_json, extract_json_all, extract_strict, extract_verbose,
    Extractor, ExtractorBuilder, RepairMode,
};
pub use schema::{Extract, FieldDef, RepairSchema, SchemaKind, StructSchema, TaggedEnumDef};

// Re-export from dependencies
pub use fuzzy_parser::Algorithm;
pub use jsonrepair;

// Re-export derive macro
pub use llm_extract_derive::Extract;
