mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-07 10:12:38 +00:00
fix(cli): atomic trace-consent updates and drop unused re-exports
- traces enable/disable now use update_user_data (file-locked atomic read-modify-write) instead of bare _load_user_data + _save_user_data — prevents data loss under concurrent CLI invocations. - Drop unused _get_nested_value / _get_project_attribute re-exports from crewai_cli.utils and crewai.utilities.project_utils — no callers. - Mark crewai.events.listeners.tracing.utils re-exports via __all__ so CodeQL recognizes _save_user_data, is_tracing_enabled, update_user_data (and the other tracing helpers defined in the file) as public API.
This commit is contained in:
@@ -32,6 +32,32 @@ from rich.text import Text
|
||||
from crewai.utilities.serialization import to_serializable
|
||||
|
||||
|
||||
__all__ = [
|
||||
"_load_user_data",
|
||||
"_save_user_data",
|
||||
"_user_data_file",
|
||||
"_user_data_lock_name",
|
||||
"get_user_id",
|
||||
"has_user_declined_tracing",
|
||||
"is_first_execution",
|
||||
"is_tracing_enabled",
|
||||
"is_tracing_enabled_in_context",
|
||||
"mark_first_execution_completed",
|
||||
"mark_first_execution_done",
|
||||
"on_first_execution_tracing_confirmation",
|
||||
"prompt_user_for_trace_viewing",
|
||||
"reset_tracing_enabled",
|
||||
"safe_serialize_to_dict",
|
||||
"set_suppress_tracing_messages",
|
||||
"set_tracing_enabled",
|
||||
"should_auto_collect_first_time_traces",
|
||||
"should_enable_tracing",
|
||||
"should_suppress_tracing_messages",
|
||||
"truncate_messages",
|
||||
"update_user_data",
|
||||
]
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ import types
|
||||
from typing import Any, cast, get_type_hints
|
||||
|
||||
from crewai_core.project import (
|
||||
_get_nested_value as _get_nested_value,
|
||||
_get_project_attribute as _get_project_attribute,
|
||||
get_project_description as get_project_description,
|
||||
get_project_name as get_project_name,
|
||||
get_project_version as get_project_version,
|
||||
|
||||
Reference in New Issue
Block a user