23 lines
958 B
Rust
23 lines
958 B
Rust
|
|
//! Transport-agnostic validated input layer for MCP write tools.
|
||
|
|
//!
|
||
|
|
//! This module houses all input validation primitives shared across MCP, HTTP,
|
||
|
|
//! and future WebSocket callers. It is intentionally decoupled from any
|
||
|
|
//! specific transport — callers parse their raw input into the request types
|
||
|
|
//! here and receive either a validated struct or a `Vec<ValidationError>`.
|
||
|
|
//!
|
||
|
|
//! # Structure
|
||
|
|
//!
|
||
|
|
//! - [`error`] — [`ValidationError`] typed enum + JSON serialisation helpers.
|
||
|
|
//! - [`sanitize`] — HTML sanitisation via `ammonia`.
|
||
|
|
//! - [`newtypes`] — field-level newtypes (`StoryName`, `AcceptanceCriterion`, …).
|
||
|
|
//! - [`requests`] — top-level request structs with cross-field `garde` rules.
|
||
|
|
|
||
|
|
mod error;
|
||
|
|
mod newtypes;
|
||
|
|
mod requests;
|
||
|
|
mod sanitize;
|
||
|
|
|
||
|
|
pub use error::{ValidationError, format_errors_as_json};
|
||
|
|
pub use newtypes::{AcceptanceCriterion, DependsOnId, Description, StoryName};
|
||
|
|
pub use requests::{CreateEpicRequest, CreateStoryRequest};
|