2026-05-14 12:53:14 +00:00
|
|
|
//! 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};
|
2026-05-14 14:41:45 +00:00
|
|
|
pub use newtypes::{
|
|
|
|
|
AcceptanceCriterion, DependsOnId, Description, StoryId, StoryName, TargetStage,
|
|
|
|
|
};
|
2026-05-14 13:22:16 +00:00
|
|
|
pub use requests::{
|
2026-05-18 14:43:54 +00:00
|
|
|
AddCriterionRequest, ConvertItemTypeRequest, CreateBugRequest, CreateEpicRequest,
|
|
|
|
|
CreateRefactorRequest, CreateSpikeRequest, CreateStoryRequest, EditCriterionRequest,
|
|
|
|
|
FreezeStoryRequest, MoveStoryRequest, MoveStoryToMergeRequest, UnblockStoryRequest,
|
|
|
|
|
UpdateStoryRequest,
|
2026-05-14 13:22:16 +00:00
|
|
|
};
|