- Fix lint errors (E712) for == True/False comparisons
- Update test_selective_execution_with_invalid_tags to match actual Pydantic error format
- Pydantic's built-in validation runs before custom validators, producing different error messages
Co-Authored-By: João <joao@crewai.com>
- Enhanced error messages with specific action and available tags information
- Improved type safety by removing problematic TaskSelectorType alias
- Added comprehensive tag validation with normalization in Task class
- Fixed edge case handling for untagged tasks in tag selector
- Added test for invalid tag types validation
- Maintained backward compatibility while optimizing performance
Co-Authored-By: João <joao@crewai.com>
- Add tags field to Task class for categorization
- Add task_selector parameter to Crew class
- Implement task filtering in _execute_tasks method
- Add Process.selective type with validation
- Add helper method for tag-based selection
- Add comprehensive tests covering all scenarios
- Maintain backward compatibility with existing crews
Fixes#2941: Users can now run only specific agents/tasks based on input parameters like 'action', rather than executing the entire crew process.
Co-Authored-By: João <joao@crewai.com>