matches!(ty, syn::Type::Path(syn::TypePath { path: syn::Path { segments, .. }, .. }) if segments.iter().any(|segment| segment.ident == "Option"))
/// A procedural macro for generating typed Command implementations with compile-time validation.
/// This macro provides pure value-based argument passing with compile-time type safety by generating:
/// - A `CommandNameArgs` struct with typed fields (required fields as `Type`, optional as `Option<Type>`)
/// - A `CommandName` struct implementing `Command` trait with typed `run(args: CommandNameArgs)` method
/// - Individual typed variables extracted from the Args struct and available in the command body
/// # pub fn fraction(mut self, v: num_rational::Rational64) -> Self { self.fraction = Some(v); self }
/// let email_str = email.map_or_else(|| format!("{}@example.com", username), |s| s.to_string());
/// async fn run<'a>(&self, args: &'a HashMap<&'a str, &'a Argument>) -> Result<Option<CmdResult>, CmdError> {
let runner_types = generate_progressive_runner_types(name, required_args, optional_args, body);