Refactor event base classes (#2491)

- Renamed `CrewEvent` to `BaseEvent` across the codebase for consistency
- Created a `CrewBaseEvent` that automatically identifies fingerprints for DRY
- Added a new `to_json()` method for serializing events
This commit is contained in:
Vini Brasil
2025-03-27 15:42:11 -03:00
committed by GitHub
parent fc9da22c38
commit f845fac4da
12 changed files with 155 additions and 219 deletions

View File

@@ -2,10 +2,10 @@ from typing import Any, Dict, Optional, Union
from pydantic import BaseModel, ConfigDict
from .base_events import CrewEvent
from .base_events import BaseEvent
class FlowEvent(CrewEvent):
class FlowEvent(BaseEvent):
"""Base class for all flow events"""
type: str