"""
A2A Helper Abstraction Layer.

This package provides a facade for interacting with A2A protocol objects,
insulating the application from the specifics of the a2a-sdk.

This __init__.py file exposes the most commonly used helpers for easy access.
"""

from .types import ContentPart
from .artifact import (
    create_data_artifact,
    create_text_artifact,
    get_artifact_id,
    get_artifact_name,
    get_parts_from_artifact,
    update_artifact_parts,
    prepare_file_part_for_publishing,
    resolve_file_part_uri,
)
from .events import (
    create_artifact_update,
    create_data_signal_event,
    create_status_update,
    get_artifact_from_artifact_update,
    get_data_parts_from_status_update,
    get_message_from_status_update,
)
from .message import (
    create_agent_data_message,
    create_agent_parts_message,
    create_agent_text_message,
    create_data_part,
    create_file_part_from_bytes,
    create_file_part_from_uri,
    create_text_part,
    create_user_message,
    update_message_parts,
    get_bytes_from_file_part,
    get_context_id,
    get_data_from_data_part,
    get_data_parts_from_message,
    get_file_from_file_part,
    get_filename_from_file_part,
    get_file_parts_from_message,
    get_message_id,
    get_metadata_from_part,
    get_mimetype_from_file_part,
    get_parts_from_message,
    get_task_id as get_task_id_from_message,  # Alias to avoid name clash
    get_text_from_message,
    get_text_from_text_part,
    get_uri_from_file_part,
)
from .protocol import (
    create_cancel_task_request,
    create_error_response,
    create_generic_success_response,
    create_internal_error,
    create_internal_error_response,
    create_invalid_request_error,
    create_invalid_request_error_response,
    create_send_message_request,
    create_send_message_success_response,
    create_send_streaming_message_request,
    create_send_streaming_message_success_response,
    create_success_response,
    get_a2a_base_topic,
    get_agent_request_topic,
    get_agent_response_subscription_topic,
    get_agent_response_topic,
    get_agent_status_subscription_topic,
    get_client_response_topic,
    get_client_status_subscription_topic,
    get_client_status_topic,
    get_discovery_topic,
    get_gateway_response_subscription_topic,
    get_gateway_response_topic,
    get_gateway_status_subscription_topic,
    get_gateway_status_topic,
    get_message_from_send_request,
    get_peer_agent_status_topic,
    get_request_id,
    get_sam_events_topic,
    get_sam_events_subscription_topic,
    get_request_method,
    get_response_error,
    get_error_code,
    get_error_data,
    get_error_message,
    get_response_id,
    get_response_result,
    get_task_id_from_cancel_request,
    extract_task_id_from_topic,
    subscription_to_regex,
    topic_matches_subscription,
)
from .task import (
    create_final_task,
    create_initial_task,
    create_task_status,
    get_task_artifacts,
    get_task_context_id,
    get_task_history,
    get_task_id,
    get_task_metadata,
    get_task_status,
)
from .translation import (
    format_adk_event_as_a2a,
    translate_a2a_to_adk_content,
    translate_adk_function_response_to_a2a_parts,
    translate_adk_part_to_a2a_filepart,
)

__all__ = [
    # types.py
    "ContentPart",
    # artifact.py
    "create_data_artifact",
    "create_text_artifact",
    "get_artifact_id",
    "get_artifact_name",
    "get_parts_from_artifact",
    "update_artifact_parts",
    "prepare_file_part_for_publishing",
    "resolve_file_part_uri",
    # events.py
    "create_artifact_update",
    "create_data_signal_event",
    "create_status_update",
    "get_artifact_from_artifact_update",
    "get_data_parts_from_status_update",
    "get_message_from_status_update",
    # message.py
    "create_agent_data_message",
    "create_agent_parts_message",
    "create_agent_text_message",
    "create_data_part",
    "create_file_part_from_bytes",
    "create_file_part_from_uri",
    "create_text_part",
    "create_user_message",
    "update_message_parts",
    "get_bytes_from_file_part",
    "get_context_id",
    "get_data_from_data_part",
    "get_data_parts_from_message",
    "get_filename_from_file_part",
    "get_file_parts_from_message",
    "get_message_id",
    "get_metadata_from_part",
    "get_mimetype_from_file_part",
    "get_file_from_file_part",
    "get_parts_from_message",
    "get_task_id_from_message",
    "get_text_from_message",
    "get_uri_from_file_part",
    "get_text_from_text_part",
    # protocol.py
    "create_cancel_task_request",
    "create_error_response",
    "create_generic_success_response",
    "create_internal_error",
    "create_internal_error_response",
    "create_invalid_request_error",
    "create_invalid_request_error_response",
    "create_send_message_request",
    "create_send_message_success_response",
    "create_send_streaming_message_request",
    "create_send_streaming_message_success_response",
    "create_success_response",
    "get_a2a_base_topic",
    "get_agent_request_topic",
    "get_agent_response_subscription_topic",
    "get_agent_response_topic",
    "get_agent_status_subscription_topic",
    "get_client_response_topic",
    "get_client_status_subscription_topic",
    "get_client_status_topic",
    "get_discovery_topic",
    "get_gateway_response_subscription_topic",
    "get_gateway_response_topic",
    "get_gateway_status_subscription_topic",
    "get_gateway_status_topic",
    "get_message_from_send_request",
    "get_peer_agent_status_topic",
    "get_request_id",
    "get_sam_events_topic",
    "get_sam_events_subscription_topic",
    "get_request_method",
    "get_response_error",
    "get_error_code",
    "get_error_data",
    "get_error_message",
    "get_response_id",
    "get_response_result",
    "get_task_id_from_cancel_request",
    "extract_task_id_from_topic",
    "subscription_to_regex",
    "topic_matches_subscription",
    # task.py
    "create_final_task",
    "create_initial_task",
    "create_task_status",
    "get_task_artifacts",
    "get_task_context_id",
    "get_task_history",
    "get_task_id",
    "get_task_metadata",
    "get_task_status",
    # translation.py
    "format_adk_event_as_a2a",
    "translate_a2a_to_adk_content",
    "translate_adk_function_response_to_a2a_parts",
    "translate_adk_part_to_a2a_filepart",
]
