/// Check if a session name is valid (alphanumeric, hyphens, and underscores only) pub fn is_valid_session_name(name: &str) -> bool { !name.is_empty() && name .chars() .all(|c| c.is_alphanumeric() || c == '-' || c == '_') } /// Generate error message for invalid session name pub fn session_name_error(name: &str) -> String { format!( "Invalid session name '{}'. Only alphanumeric characters, hyphens, and underscores are allowed.", name ) }