//! Compliance test scaffolding.
//!
//! The MCP conformance project (`@modelcontextprotocol/conformance`) lets a
//! server author declare an expected-failures baseline so a server can
//! adopt the suite incrementally. A CI run passes when the only failing
//! rules are the ones already listed in the baseline, fails on a new
//! regression, and fails on stale entries (a rule that the baseline still
//! lists but the server now passes). This module owns the data model and
//! matching logic. The CLI wiring lives in a follow-up ticket so this
//! crate stays transport-free.
//!
//! See `docs/compliance-baseline.md` in the repo for the user-facing
//! workflow.

pub mod auth_hardening;
pub mod baseline;
pub mod composition;
pub mod corpus;
mod invariant_checks;
pub mod invariants;
pub mod official;
pub mod registry;
pub mod renderers;
pub mod score_delta;
pub mod scoring;
// Data model for the scorer, split out of `scoring`. Kept
// private; the types reach the public surface through `scoring`'s re-export
// and the `compliance::*` re-exports below, so external paths are unchanged.
mod score_types;
pub mod stream;
pub mod version_diff;

pub use baseline::{
    aggregate, decide, update_baseline, AggregateOutcome, Baseline, BaselineDecision, BaselineEntry,
};
pub use composition::{
    check_composition, CompositionFinding, CompositionKind, CompositionReport, ServerInvariantRun,
};
pub use corpus::{RuleExpectations, VersionCorpus};
pub use invariants::{
    evaluate_all, CapturedSession, Exchange, Invariant, InvariantCategory, InvariantOutcome,
    INVARIANTS,
};
/// Bridge from the official MCP conformance suite into mcptest check results.
///
/// Driven by `mcptest compliance run --official` since WOR-1307.
pub use official::{
    map_to_rule_id, to_check_results, OfficialBridge, OfficialBridgeError, OfficialReport,
    OfficialScenarioResult,
};
pub use official::{CheckResult, CheckSource};
pub use registry::{RuleMetadata, RuleRegistry, RuleSeverity};
pub use score_delta::{
    regressed, render_pr_comment, score_delta, Direction, ScoreDelta, ScoreDeltaSummary,
    SectionDelta,
};
pub use scoring::{
    score_run, ApplicabilitySummary, CheckId, ComplianceScore, Grade, Rubric, Section, SectionScore,
};
pub use stream::{
    elicited_content_matches_requested_schema, has_no_progress_notifications,
    progress_is_non_decreasing, progress_notifications_for_token, server_requests_for_method,
};
pub use version_diff::{
    diff_versions, VersionChange, VersionDiff, VersionDiffEntry, VersionDiffSummary,
};
