//! ACP (Agent-Client Protocol) client implementation.
//!
//! This module provides a complete ACP client implementation, including:
//! - Transport layer (stdio and HTTP+SSE)
//! - Protocol implementation (initialization, sessions, prompts)
//! - Tool execution and permission handling
//! - Streaming updates and notifications
//!
//! # Architecture
//!
//! The ACP implementation is organized into layers:
//!
//! 1. **Transport Layer** (`transport/`) - JSON-RPC types and shared utilities
//!    - JSON-RPC message types (request, response, notification, error)
//!    - `JsonLineReader` for resilient multi-line JSON reading over stdio
//!    - Transport trait definition
//!    - Actual transport implementations live in `connectors::acp::transport/`
//!
//! 2. **Protocol Layer** (`protocol/`) - ACP message handling
//!    - Initialization and capability negotiation
//!    - Authentication (optional)
//!    - Capability validation
//!    - Session lifecycle (new, load, cancel)
//!    - Prompt turns and streaming updates
//!    - Error handling and classification
//!
//! # Example
//!
//! ```ignore
//! use dirigent_core::connectors::acp::transport::{AcpTransport, StdioTransport};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let mut transport = StdioTransport::new("claude", &["--acp"]);
//! transport.connect().await?;
//!
//! // Send and receive JSON-RPC messages
//! transport.send(serde_json::json!({
//!     "jsonrpc": "2.0",
//!     "method": "initialize",
//!     "id": 1,
//!     "params": {}
//! })).await?;
//!
//! if let Some(response) = transport.recv().await? {
//!     println!("Response: {:?}", response);
//! }
//! # Ok(())
//! # }
//! ```

pub mod connector_state;
pub mod content_blocks;
pub mod protocol;
pub mod transport;

// Re-export commonly used types
pub use connector_state::{
    AcpConnectorState, AgentCapabilities, ClientCapabilities, ConnectionState, EnvVariable,
    FsCapabilities, HttpHeader, ImplementationInfo, McpCapabilities, McpServer, PromptCapabilities,
    SessionState, SharedAcpState,
};
pub use content_blocks::{build_content_blocks_from_files, ContentBlockBuilder};
pub use protocol::{authenticate, capabilities, initialize};
pub use transport::{
    JsonRpcError, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, JsonRpcResult, Transport,
    TransportError, TransportState,
};
