//! HTTP transport configuration plus the wire-level streamable HTTP and
//! legacy SSE transports.
//!
//! Why this lives in `mcptest-core` and not in the runner crate: the
//! configuration model is pure data, and the wire-level transports
//! produce the channel-pair contract the protocol
//! [`Client`](crate::protocol::Client) consumes. Keeping all of it
//! under one module gives every caller (loader, CLI, runner, SDKs)
//! the same validation and connection surface.
//!
//! The module currently ships:
//!
//! - [`HeaderValue`], [`HttpConfig`], [`TlsConfig`]: the YAML-driven
//!   configuration model.
//! - [`HeaderMerger`], [`HeaderValidator`]: header merging and
//!   validation helpers used by every transport entry point.
//! - [`StreamableHttp`] / [`StreamableHttpConfig`]: streamable HTTP
//!   transport per the MCP 2025-03-26 spec.
//! - [`LegacySse`] / [`LegacySseConfig`]: legacy SSE transport per the
//!   MCP 2024-11-05 spec.
//! - [`StdioTransport`] / [`StdioConfig`]: stdio subprocess transport
//!   for local-developer testing.

mod header_capture;
mod http;
mod legacy_sse;
mod record;
mod replay;
mod sse_parser;
mod stdio;
mod streamable_http;

pub use header_capture::HeaderCapture;
pub use http::{
    parse_duration, resolve, resolve as resolve_headers, HeaderMerger, HeaderValidator,
    HeaderValue, HttpConfig, TlsConfig, TlsMinVersion, DEFAULT_CONNECT_TIMEOUT,
    DEFAULT_MAX_REDIRECTS, DEFAULT_TIMEOUT,
};
pub use legacy_sse::{
    LegacySse, LegacySseConfig, LegacySseError, BACKOFF_STEPS_MS as LEGACY_SSE_BACKOFF_STEPS_MS,
    SUPPORTED_VERSION as LEGACY_SSE_SUPPORTED_VERSION,
};
pub use record::{RecordingHandle, RecordingTransport};
pub use replay::{ReplayHandle, ReplayTransport};
pub use stdio::{
    StdioConfig, StdioError, StdioTransport, CHANNEL_CAPACITY as STDIO_CHANNEL_CAPACITY,
    DEFAULT_SHUTDOWN_TIMEOUT as STDIO_SHUTDOWN_TIMEOUT,
    STDERR_TAIL_LINES as STDIO_STDERR_TAIL_LINES,
};
pub use streamable_http::{
    StreamableHttp, StreamableHttpConfig, StreamableHttpError, TransportMode,
    BACKOFF_STEPS_MS as STREAMABLE_HTTP_BACKOFF_STEPS_MS,
    DEFAULT_CONNECT_TIMEOUT as STREAMABLE_HTTP_DEFAULT_CONNECT_TIMEOUT,
    DEFAULT_REQUEST_TIMEOUT as STREAMABLE_HTTP_DEFAULT_REQUEST_TIMEOUT,
    METHOD_HEADER as STREAMABLE_HTTP_METHOD_HEADER, NAME_HEADER as STREAMABLE_HTTP_NAME_HEADER,
    SESSION_HEADER as STREAMABLE_HTTP_SESSION_HEADER,
};
