//! # highflame
//!
//! Async Rust SDK for the [Highflame](https://highflame.ai) AI guardrails service.
//!
//! ## Quick start
//!
//! ```no_run
//! use highflame::{Highflame, HighflameOptions, GuardRequest};
//! use highflame::types_gen::ContentType;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let client = Highflame::new(
//!         HighflameOptions::new(std::env::var("HIGHFLAME_API_KEY")?),
//!     );
//!
//!     let resp = client.guard()
//!         .evaluate_prompt("Hello world", None, None)
//!         .await?;
//!
//!     println!("decision: {:?}", resp.decision);
//!     assert!(resp.allowed());
//!     Ok(())
//! }
//! ```
//!
//! ## Resource-based API
//!
//! ```no_run
//! use highflame::{Highflame, HighflameOptions};
//!
//! # #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Highflame::new(HighflameOptions::new("my-jwt"));
//!
//! // Guard: evaluate content against policies
//! let resp = client.guard().evaluate_prompt("Hello", None, None).await?;
//!
//! // Detect: run detectors without policy evaluation
//! // let resp = client.detect().run(&request).await?;
//!
//! // Detectors: list available detectors
//! let detectors = client.detectors().list().await?;
//!
//! // Debug: inspect loaded policies
//! let policies = client.debug().policies(None).await?;
//! # Ok(()) }
//! ```
//!
//! ## SSE streaming
//!
//! ```no_run
//! use futures_util::{pin_mut, StreamExt as _};
//! use highflame::{Highflame, HighflameOptions, GuardRequest};
//! use highflame::types_gen::ContentType;
//!
//! # #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Highflame::new(HighflameOptions::new("my-jwt"));
//! let req = GuardRequest {
//!     content: "Hello".to_string(),
//!     content_type: ContentType::Prompt,
//!     action: "process_prompt".to_string(),
//!     ..Default::default()
//! };
//!
//! let stream = client.guard().stream(&req).await?;
//! pin_mut!(stream);
//! while let Some(event) = stream.next().await {
//!     let ev = event?;
//!     println!("event: {} data: {:?}", ev.r#type, ev.data);
//! }
//! # Ok(()) }
//! ```

pub mod error;
pub mod stream;
pub mod types_gen;
pub mod zeroid;

mod client;

// ── Public re-exports ─────────────────────────────────────────────────────────

// Client + resources + version
pub use client::{
    DebugResource, DetectResource, DetectorsResource, GuardResource, Highflame, HighflameOptions,
    VERSION,
};

// Errors
pub use error::HighflameError;

// Stream
pub use stream::SseEvent;

// Generated types — commonly used
pub use types_gen::{
    AgentIdentityTrace,
    // Enums
    ContentType,
    ContextKeySpec,
    DebugInfo,
    DebugPoliciesResponse,
    Decision,
    DetectRequest,
    DetectResponse,
    // Info types
    DetectorInfo,
    DetectorResult,
    DeterminingPolicy,
    FileContext,
    // Request types
    GuardRequest,
    // Response types
    GuardResponse,
    HealthResponse,
    ListDetectorsResponse,
    MCPContext,
    Mode,
    ModelContext,
    OptimizationReport,
    PolicySummary,
    ProblemDetails,
    RootCause,
    SessionDelta,
    StreamEvent,
    TokenResponse,
    ToolContext,
};
