mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-09-20 18:13:49 +00:00
* feat(execution): introduce execution context management with UUID support - Added `execution.py` to manage execution UUIDs for tracking nested execution contexts. - Implemented `begin_execution` and `end_execution` functions to handle the lifecycle of execution contexts. - Updated `Crew` and `Flow` classes to utilize the new execution context management, ensuring proper tracking during execution. - Added tests for execution UUID creation, inheritance, and lifecycle management to ensure functionality and correctness. * feat(execution): enhance execution context management in Crew class - Introduced `begin_execution` and `end_execution` calls in the `Crew` class to manage execution tokens effectively. - Updated the `akickoff` method to ensure proper lifecycle handling of execution contexts. - Added tests to verify the creation and clearing of execution UUIDs during the `akickoff` process, ensuring correct behavior in various scenarios. * feat(execution): add execution_uuid to PendingFeedbackContext for flow resumption - Introduced `execution_uuid` to the `PendingFeedbackContext` class to maintain the UUID across flow pauses and resumes, ensuring traceability of execution contexts. - Updated the `Flow` class to utilize the new `execution_uuid` during execution management, enhancing the handling of paused flows. - Added tests to verify that the execution UUID is correctly persisted and restored during flow operations, ensuring consistent behavior across sessions. * refactor(execution): streamline execution UUID management and update tests - Removed the `ensure_execution_uuid` function to simplify UUID handling, consolidating logic into `begin_execution` and `end_execution`. - Updated the `clear_execution_uuid` function to ensure it correctly restores previous UUIDs using context tokens. - Modified tests to reflect changes in execution UUID management, ensuring proper creation, inheritance, and clearing of UUIDs during execution contexts. - Enhanced the `PendingFeedbackContext` documentation to clarify the handling of `execution_uuid` for pending rows.