//! ACP protocol implementation.
//!
//! This module implements the Agent-Client Protocol (ACP) message handling,
//! including initialization, authentication, session lifecycle, prompt turns,
//! streaming updates, cancellation, and error handling.

pub mod initialize;
pub mod authenticate;
pub mod capabilities;
pub mod session;
pub mod prompt;
pub mod streaming;
pub mod stop_reason;
pub mod cancellation;
pub mod error;

// Re-export commonly used types
pub use initialize::{InitializeRequest, InitializeResponse};
pub use authenticate::{AuthenticateRequest, AuthenticateResponse};
pub use capabilities::validate_capability;
pub use session::{
    SessionCancelNotification, SessionLoadRequest, SessionLoadResponse, SessionNewRequest,
    SessionNewResponse, SessionSetModeRequest, SessionSetModeResponse, SessionSetModelRequest,
    SessionSetModelResponse,
};
pub use prompt::{
    ContentBlock, SessionPromptRequest, SessionPromptResponse, StopReason, EmbeddedResource,
    Annotations, PromptError,
};
pub use streaming::{
    SessionUpdate, SessionUpdateNotification, ToolKind, ToolCallStatus, ToolCallInfo,
    ToolCallLocation, ToolCallContent, MessageAccumulator, PlanEntry, Command,
};
pub use stop_reason::{StopReasonAction, handle_stop_reason, is_continuable, is_error};
pub use cancellation::{handle_cancellation, cancel_pending_tool_calls, handle_disconnect};
pub use error::{
    ErrorClass, ClassifiedError, ErrorSeverity, ErrorAction, classify_jsonrpc_error,
    classify_transport_error, exponential_backoff, error_severity, error_actions,
};
