microsoft-agents-activity 0.3.1__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of microsoft-agents-activity might be problematic. Click here for more details.
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/PKG-INFO +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/__init__.py +6 -9
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/_load_configuration.py +7 -2
- microsoft_agents_activity-0.4.0/microsoft_agents/activity/_model_utils.py +61 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/_type_aliases.py +0 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/activity.py +117 -63
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/adaptive_card_invoke_value.py +2 -2
- microsoft_agents_activity-0.4.0/microsoft_agents/activity/agents_model.py +46 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/animation_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/attachment_info.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/audio_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/basic_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/card_action.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/card_image.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/channel_account.py +4 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/channels.py +3 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_account.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_members.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_parameters.py +3 -3
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_reference.py +3 -3
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversations_result.py +1 -1
- microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity/__init__.py +29 -0
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/ai_entity.py +1 -32
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/entity.py +5 -3
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/geo_coordinates.py +2 -2
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/mention.py +7 -5
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/place.py +2 -2
- {microsoft_agents_activity-0.3.1/microsoft_agents/activity → microsoft_agents_activity-0.4.0/microsoft_agents/activity/entity}/thing.py +2 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/error.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/error_response.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/expected_replies.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/hero_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/media_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/message_reaction.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/oauth_card.py +2 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/paged_members_result.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/receipt_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/receipt_item.py +3 -3
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/role_types.py +2 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/semantic_action.py +2 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/signin_card.py +2 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/suggested_actions.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/text_highlight.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/thumbnail_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_exchange_state.py +2 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_response.py +18 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/transcript.py +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/video_card.py +4 -4
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents_activity.egg-info/PKG-INFO +1 -1
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents_activity.egg-info/SOURCES.txt +9 -8
- microsoft_agents_activity-0.3.1/microsoft_agents/activity/agents_model.py +0 -18
- microsoft_agents_activity-0.3.1/tests/test_activity_types.py +0 -2
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/action_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/activity_event_names.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/activity_importance.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/activity_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/adaptive_card_invoke_action.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/adaptive_card_invoke_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/attachment.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/attachment_data.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/attachment_layout_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/attachment_view.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/caller_id_constants.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/channel_adapter_protocol.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/contact_relation_update_action_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_resource_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/conversation_update_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/delivery_modes.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/end_of_conversation_codes.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/fact.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/inner_http_error.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/input_hints.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/installation_update_action_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/invoke_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/media_event_value.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/media_url.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/message_reaction_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/message_update_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/resource_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/semantic_actions_states.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/sign_in_constants.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/sign_in_resource.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/__init__.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/app_based_link_query.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/batch_failed_entries_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/batch_failed_entry.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/batch_operation_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/batch_operation_state_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/bot_config_auth.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/cache_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/cancel_operation_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/channel_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/config_auth_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/config_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/config_response_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/config_task_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/conversation_list.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/file_consent_card.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/file_consent_card_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/file_download_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/file_info_card.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/file_upload_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_details_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_end_event_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_event_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_notification.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_notification_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_notification_channel_data.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_notification_recipient_failure_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_notification_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_participant_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_participants_event_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_stage_surface.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_start_event_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/meeting_tab_icon_surface.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_app.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_attachment.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_body.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_conversation.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_from.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_mention.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_reaction.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/message_actions_payload_user.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_action.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_action_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_attachment.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_parameter.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_query.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_query_options.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_result.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/messaging_extension_suggested_action.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/notification_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_action_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_action_card.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_action_query.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_date_input.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_fact.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_http_post.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_image.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_input_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_multichoice_input.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_multichoice_input_choice.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_open_uri.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_open_uri_target.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_section.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_text_input.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/o365_connector_card_view_action.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/on_behalf_of.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/read_receipt_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/signin_state_verification_query.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/surface.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_context.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_entity_context.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_request.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_response_card.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_response_cards.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_response_payload.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_submit.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_submit_data.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tab_suggested_actions.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/targeted_meeting_notification.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/targeted_meeting_notification_value.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_card_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_continue_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_message_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_request.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_request_context.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_response_base.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/task_module_task_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/team_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/team_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_batch_operation_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_channel_account.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_channel_data.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_channel_data_settings.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_meeting_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_meeting_member.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_meeting_participant.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_member.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/teams_paged_members_result.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/tenant_info.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/teams/user_meeting_details.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/text_format_types.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/thumbnail_url.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_exchange_invoke_request.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_exchange_invoke_response.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_exchange_resource.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_post_resource.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_request.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/token_status.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents/activity/turn_context_protocol.py +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents_activity.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents_activity.egg-info/requires.txt +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/microsoft_agents_activity.egg-info/top_level.txt +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/pyproject.toml +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/setup.cfg +0 -0
- {microsoft_agents_activity-0.3.1 → microsoft_agents_activity-0.4.0}/setup.py +0 -0
|
@@ -24,32 +24,32 @@ from .conversation_reference import ConversationReference
|
|
|
24
24
|
from .conversation_resource_response import ConversationResourceResponse
|
|
25
25
|
from .conversations_result import ConversationsResult
|
|
26
26
|
from .expected_replies import ExpectedReplies
|
|
27
|
-
from .entity import
|
|
28
|
-
|
|
27
|
+
from .entity import (
|
|
28
|
+
Entity,
|
|
29
29
|
AIEntity,
|
|
30
30
|
ClientCitation,
|
|
31
31
|
ClientCitationAppearance,
|
|
32
32
|
ClientCitationImage,
|
|
33
33
|
ClientCitationIconName,
|
|
34
|
+
Mention,
|
|
34
35
|
SensitivityUsageInfo,
|
|
35
36
|
SensitivityPattern,
|
|
36
|
-
|
|
37
|
+
GeoCoordinates,
|
|
38
|
+
Place,
|
|
39
|
+
Thing,
|
|
37
40
|
)
|
|
38
41
|
from .error import Error
|
|
39
42
|
from .error_response import ErrorResponse
|
|
40
43
|
from .fact import Fact
|
|
41
|
-
from .geo_coordinates import GeoCoordinates
|
|
42
44
|
from .hero_card import HeroCard
|
|
43
45
|
from .inner_http_error import InnerHttpError
|
|
44
46
|
from .invoke_response import InvokeResponse
|
|
45
47
|
from .media_card import MediaCard
|
|
46
48
|
from .media_event_value import MediaEventValue
|
|
47
49
|
from .media_url import MediaUrl
|
|
48
|
-
from .mention import Mention
|
|
49
50
|
from .message_reaction import MessageReaction
|
|
50
51
|
from .oauth_card import OAuthCard
|
|
51
52
|
from .paged_members_result import PagedMembersResult
|
|
52
|
-
from .place import Place
|
|
53
53
|
from .receipt_card import ReceiptCard
|
|
54
54
|
from .receipt_item import ReceiptItem
|
|
55
55
|
from .resource_response import ResourceResponse
|
|
@@ -57,7 +57,6 @@ from .semantic_action import SemanticAction
|
|
|
57
57
|
from .signin_card import SigninCard
|
|
58
58
|
from .suggested_actions import SuggestedActions
|
|
59
59
|
from .text_highlight import TextHighlight
|
|
60
|
-
from .thing import Thing
|
|
61
60
|
from .thumbnail_card import ThumbnailCard
|
|
62
61
|
from .thumbnail_url import ThumbnailUrl
|
|
63
62
|
from .token_exchange_invoke_request import TokenExchangeInvokeRequest
|
|
@@ -92,7 +91,6 @@ from .caller_id_constants import CallerIdConstants
|
|
|
92
91
|
from .conversation_update_types import ConversationUpdateTypes
|
|
93
92
|
from .message_update_types import MessageUpdateTypes
|
|
94
93
|
|
|
95
|
-
|
|
96
94
|
from .channel_adapter_protocol import ChannelAdapterProtocol
|
|
97
95
|
from .turn_context_protocol import TurnContextProtocol
|
|
98
96
|
from ._load_configuration import load_configuration_from_env
|
|
@@ -131,7 +129,6 @@ __all__ = [
|
|
|
131
129
|
"ClientCitationIconName",
|
|
132
130
|
"SensitivityUsageInfo",
|
|
133
131
|
"SensitivityPattern",
|
|
134
|
-
"add_ai_to_activity",
|
|
135
132
|
"Error",
|
|
136
133
|
"ErrorResponse",
|
|
137
134
|
"Fact",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from typing import Any
|
|
1
|
+
from typing import Any
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
def load_configuration_from_env(env_vars:
|
|
4
|
+
def load_configuration_from_env(env_vars: dict[str, Any]) -> dict:
|
|
5
5
|
"""
|
|
6
6
|
Parses environment variables and returns a dictionary with the relevant configuration.
|
|
7
7
|
"""
|
|
@@ -18,6 +18,11 @@ def load_configuration_from_env(env_vars: Dict[str, Any]) -> dict:
|
|
|
18
18
|
current_level = current_level[next_level]
|
|
19
19
|
last_level[levels[-1]] = value
|
|
20
20
|
|
|
21
|
+
if result.get("CONNECTIONSMAP") and isinstance(result["CONNECTIONSMAP"], dict):
|
|
22
|
+
result["CONNECTIONSMAP"] = [
|
|
23
|
+
conn for conn in result.get("CONNECTIONSMAP", {}).values()
|
|
24
|
+
]
|
|
25
|
+
|
|
21
26
|
return {
|
|
22
27
|
"AGENTAPPLICATION": result.get("AGENTAPPLICATION", {}),
|
|
23
28
|
"CONNECTIONS": result.get("CONNECTIONS", {}),
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
from typing import Any, Callable
|
|
3
|
+
|
|
4
|
+
from .agents_model import AgentsModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ModelFieldHelper(ABC):
|
|
8
|
+
"""Base class for model field processing prior to initialization of an AgentsModel"""
|
|
9
|
+
|
|
10
|
+
def process(self, key: str) -> dict[str, Any]:
|
|
11
|
+
"""Takes the key in the destination object and returns a dictionary of new fields to add"""
|
|
12
|
+
raise NotImplementedError()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SkipIf(ModelFieldHelper):
|
|
16
|
+
"""Skip if the value meets the given condition."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, value, skip_condition: Callable[[Any], bool]):
|
|
19
|
+
self.value = value
|
|
20
|
+
self._skip_condition = skip_condition
|
|
21
|
+
|
|
22
|
+
def process(self, key: str) -> dict[str, Any]:
|
|
23
|
+
if self._skip_condition(self.value):
|
|
24
|
+
return {}
|
|
25
|
+
return {key: self.value}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class SkipNone(SkipIf):
|
|
29
|
+
"""Skip if the value is None."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, value):
|
|
32
|
+
super().__init__(value, lambda v: v is None)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def pick_model_dict(**kwargs):
|
|
36
|
+
"""Processes a list of keyword arguments, using ModelFieldHelper subclasses to determine which fields to include in the final model.
|
|
37
|
+
|
|
38
|
+
This function is useful for dynamically constructing models based on varying input data.
|
|
39
|
+
|
|
40
|
+
Usage:
|
|
41
|
+
activity_dict = pick_model_dict(type="message", id="123", text=SkipNone(text_variable))
|
|
42
|
+
activity = Activity.model_validate(activity_dict)
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
model_dict = {}
|
|
46
|
+
for key, value in kwargs.items():
|
|
47
|
+
if not isinstance(value, ModelFieldHelper):
|
|
48
|
+
model_dict[key] = value
|
|
49
|
+
else:
|
|
50
|
+
model_dict.update(value.process(key))
|
|
51
|
+
|
|
52
|
+
return model_dict
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def pick_model(model_class: type[AgentsModel], **kwargs) -> AgentsModel:
|
|
56
|
+
"""Picks model fields from the given keyword arguments.
|
|
57
|
+
|
|
58
|
+
Usage:
|
|
59
|
+
activity = pick_model(Activity, type="message", id="123", text=SkipNone(text_variable))
|
|
60
|
+
"""
|
|
61
|
+
return model_class(**pick_model_dict(**kwargs))
|
|
@@ -5,16 +5,23 @@ from pydantic import Field, SerializeAsAny
|
|
|
5
5
|
from .activity_types import ActivityTypes
|
|
6
6
|
from .channel_account import ChannelAccount
|
|
7
7
|
from .conversation_account import ConversationAccount
|
|
8
|
-
from .mention import Mention
|
|
9
8
|
from .message_reaction import MessageReaction
|
|
10
9
|
from .resource_response import ResourceResponse
|
|
11
10
|
from .suggested_actions import SuggestedActions
|
|
12
11
|
from .attachment import Attachment
|
|
13
|
-
from .entity import
|
|
12
|
+
from .entity import (
|
|
13
|
+
Entity,
|
|
14
|
+
Mention,
|
|
15
|
+
AIEntity,
|
|
16
|
+
ClientCitation,
|
|
17
|
+
SensitivityUsageInfo,
|
|
18
|
+
)
|
|
14
19
|
from .conversation_reference import ConversationReference
|
|
15
20
|
from .text_highlight import TextHighlight
|
|
16
21
|
from .semantic_action import SemanticAction
|
|
17
22
|
from .agents_model import AgentsModel
|
|
23
|
+
from .role_types import RoleTypes
|
|
24
|
+
from ._model_utils import pick_model, SkipNone
|
|
18
25
|
from ._type_aliases import NonEmptyString
|
|
19
26
|
|
|
20
27
|
|
|
@@ -27,7 +34,7 @@ class Activity(AgentsModel):
|
|
|
27
34
|
'endOfConversation', 'event', 'invoke', 'deleteUserData', 'messageUpdate',
|
|
28
35
|
'messageDelete', 'installationUpdate', 'messageReaction', 'suggestion',
|
|
29
36
|
'trace', 'handoff'
|
|
30
|
-
:type type: str or ~microsoft_agents.
|
|
37
|
+
:type type: str or ~microsoft_agents.activity.ActivityTypes
|
|
31
38
|
:param id: Contains an ID that uniquely identifies the activity on the channel.
|
|
32
39
|
:type id: str
|
|
33
40
|
:param timestamp: Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format.
|
|
@@ -43,23 +50,23 @@ class Activity(AgentsModel):
|
|
|
43
50
|
:param channel_id: Contains an ID that uniquely identifies the channel. Set by the channel.
|
|
44
51
|
:type channel_id: str
|
|
45
52
|
:param from_property: Identifies the sender of the message.
|
|
46
|
-
:type from_property: ~microsoft_agents.
|
|
53
|
+
:type from_property: ~microsoft_agents.activity.ChannelAccount
|
|
47
54
|
:param conversation: Identifies the conversation to which the activity belongs.
|
|
48
|
-
:type conversation: ~microsoft_agents.
|
|
55
|
+
:type conversation: ~microsoft_agents.activity.ConversationAccount
|
|
49
56
|
:param recipient: Identifies the recipient of the message.
|
|
50
|
-
:type recipient: ~microsoft_agents.
|
|
57
|
+
:type recipient: ~microsoft_agents.activity.ChannelAccount
|
|
51
58
|
:param text_format: Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml'
|
|
52
|
-
:type text_format: str or ~microsoft_agents.
|
|
59
|
+
:type text_format: str or ~microsoft_agents.activity.TextFormatTypes
|
|
53
60
|
:param attachment_layout: The layout hint for multiple attachments. Default: list. Possible values include: 'list', 'carousel'
|
|
54
|
-
:type attachment_layout: str or ~microsoft_agents.
|
|
61
|
+
:type attachment_layout: str or ~microsoft_agents.activity.AttachmentLayoutTypes
|
|
55
62
|
:param members_added: The collection of members added to the conversation.
|
|
56
|
-
:type members_added: list[~microsoft_agents.
|
|
63
|
+
:type members_added: list[~microsoft_agents.activity.ChannelAccount]
|
|
57
64
|
:param members_removed: The collection of members removed from the conversation.
|
|
58
|
-
:type members_removed: list[~microsoft_agents.
|
|
65
|
+
:type members_removed: list[~microsoft_agents.activity.ChannelAccount]
|
|
59
66
|
:param reactions_added: The collection of reactions added to the conversation.
|
|
60
|
-
:type reactions_added: list[~microsoft_agents.
|
|
67
|
+
:type reactions_added: list[~microsoft_agents.activity.MessageReaction]
|
|
61
68
|
:param reactions_removed: The collection of reactions removed from the conversation.
|
|
62
|
-
:type reactions_removed: list[~microsoft_agents.
|
|
69
|
+
:type reactions_removed: list[~microsoft_agents.activity.MessageReaction]
|
|
63
70
|
:param topic_name: The updated topic name of the conversation.
|
|
64
71
|
:type topic_name: str
|
|
65
72
|
:param history_disclosed: Indicates whether the prior history of the channel is disclosed.
|
|
@@ -74,15 +81,15 @@ class Activity(AgentsModel):
|
|
|
74
81
|
:type speak: str
|
|
75
82
|
:param input_hint: Indicates whether your agent is accepting, expecting, or ignoring user input after the message is delivered to the client.
|
|
76
83
|
Possible values include: 'acceptingInput', 'ignoringInput', 'expectingInput'
|
|
77
|
-
:type input_hint: str or ~microsoft_agents.
|
|
84
|
+
:type input_hint: str or ~microsoft_agents.activity.InputHints
|
|
78
85
|
:param summary: The text to display if the channel cannot render cards.
|
|
79
86
|
:type summary: str
|
|
80
87
|
:param suggested_actions: The suggested actions for the activity.
|
|
81
|
-
:type suggested_actions: ~microsoft_agents.
|
|
88
|
+
:type suggested_actions: ~microsoft_agents.activity.SuggestedActions
|
|
82
89
|
:param attachments: Attachments
|
|
83
|
-
:type attachments: list[~microsoft_agents.
|
|
90
|
+
:type attachments: list[~microsoft_agents.activity.Attachment]
|
|
84
91
|
:param entities: Represents the entities that were mentioned in the message.
|
|
85
|
-
:type entities: list[~microsoft_agents.
|
|
92
|
+
:type entities: list[~microsoft_agents.activity.Entity]
|
|
86
93
|
:param channel_data: Contains channel-specific content.
|
|
87
94
|
:type channel_data: object
|
|
88
95
|
:param action: Indicates whether the recipient of a contactRelationUpdate was added or removed from the sender's contact list.
|
|
@@ -98,23 +105,23 @@ class Activity(AgentsModel):
|
|
|
98
105
|
:param name: The name of the operation associated with an invoke or event activity.
|
|
99
106
|
:type name: str
|
|
100
107
|
:param relates_to: A reference to another conversation or activity.
|
|
101
|
-
:type relates_to: ~microsoft_agents.
|
|
108
|
+
:type relates_to: ~microsoft_agents.activity.ConversationReference
|
|
102
109
|
:param code: The a code for endOfConversation activities that indicates why the conversation ended. Possible values include: 'unknown',
|
|
103
110
|
'completedSuccessfully', 'userCancelled', 'botTimedOut', 'botIssuedInvalidMessage', 'channelFailed'
|
|
104
|
-
:type code: str or ~microsoft_agents.
|
|
111
|
+
:type code: str or ~microsoft_agents.activity.EndOfConversationCodes
|
|
105
112
|
:param expiration: The time at which the activity should be considered to be "expired" and should not be presented to the recipient.
|
|
106
113
|
:type expiration: datetime
|
|
107
114
|
:param importance: The importance of the activity. Possible values include: 'low', 'normal', 'high'
|
|
108
|
-
:type importance: str or ~microsoft_agents.
|
|
115
|
+
:type importance: str or ~microsoft_agents.activity.ActivityImportance
|
|
109
116
|
:param delivery_mode: A delivery hint to signal to the recipient alternate delivery paths for the activity.
|
|
110
117
|
The default delivery mode is "default". Possible values include: 'normal', 'notification', 'expectReplies', 'ephemeral'
|
|
111
|
-
:type delivery_mode: str or ~microsoft_agents.
|
|
118
|
+
:type delivery_mode: str or ~microsoft_agents.activity.DeliveryModes
|
|
112
119
|
:param listen_for: List of phrases and references that speech and language priming systems should listen for
|
|
113
120
|
:type listen_for: list[str]
|
|
114
121
|
:param text_highlights: The collection of text fragments to highlight when the activity contains a ReplyToId value.
|
|
115
|
-
:type text_highlights: list[~microsoft_agents.
|
|
122
|
+
:type text_highlights: list[~microsoft_agents.activity.TextHighlight]
|
|
116
123
|
:param semantic_action: An optional programmatic action accompanying this request
|
|
117
|
-
:type semantic_action: ~microsoft_agents.
|
|
124
|
+
:type semantic_action: ~microsoft_agents.activity.SemanticAction
|
|
118
125
|
:param caller_id: A string containing an IRI identifying the caller of an agent. This field is not intended to be transmitted over the wire,
|
|
119
126
|
but is instead populated by agents and clients based on cryptographically verifiable data that asserts the identity of the callers (e.g. tokens).
|
|
120
127
|
:type caller_id: str
|
|
@@ -390,32 +397,31 @@ class Activity(AgentsModel):
|
|
|
390
397
|
.. remarks::
|
|
391
398
|
The new activity sets up routing information based on this activity.
|
|
392
399
|
"""
|
|
393
|
-
return
|
|
400
|
+
return pick_model(
|
|
401
|
+
Activity,
|
|
394
402
|
type=ActivityTypes.message,
|
|
395
403
|
timestamp=datetime.now(timezone.utc),
|
|
396
|
-
from_property=
|
|
397
|
-
|
|
398
|
-
name=self.recipient.name if self.recipient else None,
|
|
404
|
+
from_property=SkipNone(
|
|
405
|
+
ChannelAccount.pick_properties(self.recipient, ["id", "name"])
|
|
399
406
|
),
|
|
400
|
-
recipient=
|
|
401
|
-
|
|
402
|
-
name=self.from_property.name if self.from_property else None,
|
|
407
|
+
recipient=SkipNone(
|
|
408
|
+
ChannelAccount.pick_properties(self.from_property, ["id", "name"])
|
|
403
409
|
),
|
|
404
410
|
reply_to_id=(
|
|
405
|
-
self.id
|
|
411
|
+
SkipNone(self.id)
|
|
406
412
|
if type != ActivityTypes.conversation_update
|
|
407
413
|
or self.channel_id not in ["directline", "webchat"]
|
|
408
414
|
else None
|
|
409
415
|
),
|
|
410
416
|
service_url=self.service_url,
|
|
411
417
|
channel_id=self.channel_id,
|
|
412
|
-
conversation=
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
418
|
+
conversation=SkipNone(
|
|
419
|
+
ConversationAccount.pick_properties(
|
|
420
|
+
self.conversation, ["is_group", "id", "name"]
|
|
421
|
+
)
|
|
416
422
|
),
|
|
417
423
|
text=text if text else "",
|
|
418
|
-
locale=locale if locale else self.locale,
|
|
424
|
+
locale=locale if locale else SkipNone(self.locale),
|
|
419
425
|
attachments=[],
|
|
420
426
|
entities=[],
|
|
421
427
|
)
|
|
@@ -434,36 +440,35 @@ class Activity(AgentsModel):
|
|
|
434
440
|
:returns: The new trace activity.
|
|
435
441
|
"""
|
|
436
442
|
if not value_type and value:
|
|
437
|
-
value_type = type(value)
|
|
443
|
+
value_type = type(value).__name__
|
|
438
444
|
|
|
439
|
-
return
|
|
445
|
+
return pick_model(
|
|
446
|
+
Activity,
|
|
440
447
|
type=ActivityTypes.trace,
|
|
441
448
|
timestamp=datetime.now(timezone.utc),
|
|
442
|
-
from_property=
|
|
443
|
-
|
|
444
|
-
name=self.recipient.name if self.recipient else None,
|
|
449
|
+
from_property=SkipNone(
|
|
450
|
+
ChannelAccount.pick_properties(self.recipient, ["id", "name"])
|
|
445
451
|
),
|
|
446
|
-
recipient=
|
|
447
|
-
|
|
448
|
-
name=self.from_property.name if self.from_property else None,
|
|
452
|
+
recipient=SkipNone(
|
|
453
|
+
ChannelAccount.pick_properties(self.from_property, ["id", "name"])
|
|
449
454
|
),
|
|
450
455
|
reply_to_id=(
|
|
451
|
-
self.id
|
|
456
|
+
SkipNone(self.id) # preserve unset
|
|
452
457
|
if type != ActivityTypes.conversation_update
|
|
453
458
|
or self.channel_id not in ["directline", "webchat"]
|
|
454
459
|
else None
|
|
455
460
|
),
|
|
456
461
|
service_url=self.service_url,
|
|
457
462
|
channel_id=self.channel_id,
|
|
458
|
-
conversation=
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
463
|
+
conversation=SkipNone(
|
|
464
|
+
ConversationAccount.pick_properties(
|
|
465
|
+
self.conversation, ["is_group", "id", "name"]
|
|
466
|
+
)
|
|
462
467
|
),
|
|
463
|
-
name=name,
|
|
464
|
-
label=label,
|
|
465
|
-
value_type=value_type,
|
|
466
|
-
value=value,
|
|
468
|
+
name=SkipNone(name),
|
|
469
|
+
label=SkipNone(label),
|
|
470
|
+
value_type=SkipNone(value_type),
|
|
471
|
+
value=SkipNone(value),
|
|
467
472
|
).as_trace_activity()
|
|
468
473
|
|
|
469
474
|
@staticmethod
|
|
@@ -481,14 +486,15 @@ class Activity(AgentsModel):
|
|
|
481
486
|
:returns: The new trace activity.
|
|
482
487
|
"""
|
|
483
488
|
if not value_type and value:
|
|
484
|
-
value_type = type(value)
|
|
489
|
+
value_type = type(value).__name__
|
|
485
490
|
|
|
486
|
-
return
|
|
491
|
+
return pick_model(
|
|
492
|
+
Activity,
|
|
487
493
|
type=ActivityTypes.trace,
|
|
488
494
|
name=name,
|
|
489
|
-
label=label,
|
|
490
|
-
value_type=value_type,
|
|
491
|
-
value=value,
|
|
495
|
+
label=SkipNone(label),
|
|
496
|
+
value_type=SkipNone(value_type),
|
|
497
|
+
value=SkipNone(value),
|
|
492
498
|
)
|
|
493
499
|
|
|
494
500
|
@staticmethod
|
|
@@ -506,10 +512,10 @@ class Activity(AgentsModel):
|
|
|
506
512
|
|
|
507
513
|
:returns: A conversation reference for the conversation that contains this activity.
|
|
508
514
|
"""
|
|
509
|
-
|
|
510
|
-
|
|
515
|
+
return pick_model(
|
|
516
|
+
ConversationReference,
|
|
511
517
|
activity_id=(
|
|
512
|
-
self.id
|
|
518
|
+
SkipNone(self.id)
|
|
513
519
|
if self.type != ActivityTypes.conversation_update
|
|
514
520
|
or self.channel_id not in ["directline", "webchat"]
|
|
515
521
|
else None
|
|
@@ -532,8 +538,9 @@ class Activity(AgentsModel):
|
|
|
532
538
|
This method is defined on the :class:`Activity` class, but is only intended for use with a message activity,
|
|
533
539
|
where the activity Activity.Type is set to ActivityTypes.Message.
|
|
534
540
|
"""
|
|
535
|
-
|
|
536
|
-
|
|
541
|
+
if not self.entities:
|
|
542
|
+
return []
|
|
543
|
+
return [x for x in self.entities if x.type.lower() == "mention"]
|
|
537
544
|
|
|
538
545
|
def get_reply_conversation_reference(
|
|
539
546
|
self, reply: ResourceResponse
|
|
@@ -596,7 +603,7 @@ class Activity(AgentsModel):
|
|
|
596
603
|
if self.type is None:
|
|
597
604
|
return False
|
|
598
605
|
|
|
599
|
-
type_attribute = str(self.type).lower()
|
|
606
|
+
type_attribute = f"ActivityTypes.{str(self.type)}".lower()
|
|
600
607
|
activity_type = str(activity_type).lower()
|
|
601
608
|
|
|
602
609
|
result = type_attribute.startswith(activity_type)
|
|
@@ -611,3 +618,50 @@ class Activity(AgentsModel):
|
|
|
611
618
|
)
|
|
612
619
|
|
|
613
620
|
return result
|
|
621
|
+
|
|
622
|
+
def add_ai_metadata(
|
|
623
|
+
self,
|
|
624
|
+
citations: Optional[list[ClientCitation]] = None,
|
|
625
|
+
usage_info: Optional[SensitivityUsageInfo] = None,
|
|
626
|
+
) -> None:
|
|
627
|
+
"""
|
|
628
|
+
Adds AI entity to an activity to indicate AI-generated content.
|
|
629
|
+
|
|
630
|
+
Args:
|
|
631
|
+
activity: The activity to modify
|
|
632
|
+
citations: Optional list of citations
|
|
633
|
+
usage_info: Optional sensitivity usage information
|
|
634
|
+
"""
|
|
635
|
+
if citations:
|
|
636
|
+
ai_entity = AIEntity(
|
|
637
|
+
type="https://schema.org/Message",
|
|
638
|
+
schema_type="Message",
|
|
639
|
+
context="https://schema.org",
|
|
640
|
+
id="",
|
|
641
|
+
additional_type=["AIGeneratedContent"],
|
|
642
|
+
citation=citations,
|
|
643
|
+
usage_info=usage_info,
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
if self.entities is None:
|
|
647
|
+
self.entities = []
|
|
648
|
+
|
|
649
|
+
self.entities.append(ai_entity)
|
|
650
|
+
|
|
651
|
+
def is_agentic_request(self) -> bool:
|
|
652
|
+
return self.recipient and self.recipient.role in [
|
|
653
|
+
RoleTypes.agentic_identity,
|
|
654
|
+
RoleTypes.agentic_user,
|
|
655
|
+
]
|
|
656
|
+
|
|
657
|
+
def get_agentic_instance_id(self) -> Optional[str]:
|
|
658
|
+
"""Gets the agent instance ID from the context if it's an agentic request."""
|
|
659
|
+
if not self.is_agentic_request() or not self.recipient:
|
|
660
|
+
return None
|
|
661
|
+
return self.recipient.agentic_app_id
|
|
662
|
+
|
|
663
|
+
def get_agentic_user(self) -> Optional[str]:
|
|
664
|
+
"""Gets the agentic user (UPN) from the context if it's an agentic request."""
|
|
665
|
+
if not self.is_agentic_request() or not self.recipient:
|
|
666
|
+
return None
|
|
667
|
+
return self.recipient.id
|
|
@@ -10,9 +10,9 @@ class AdaptiveCardInvokeValue(AgentsModel):
|
|
|
10
10
|
Defines the structure that arrives in the Activity.Value for Invoke activity with Name of 'adaptiveCard/action'.
|
|
11
11
|
|
|
12
12
|
:param action: The action of this adaptive card invoke action value.
|
|
13
|
-
:type action: :class:`microsoft_agents.activity.
|
|
13
|
+
:type action: :class:`microsoft_agents.activity.adaptive_card_invoke_action.AdaptiveCardInvokeAction`
|
|
14
14
|
:param authentication: The TokenExchangeInvokeRequest for this adaptive card invoke action value.
|
|
15
|
-
:type authentication: :class:`microsoft_agents.activity.
|
|
15
|
+
:type authentication: :class:`microsoft_agents.activity.token_exchange_invoke_request.TokenExchangeInvokeRequest`
|
|
16
16
|
:param state: The 'state' or magic code for an OAuth flow.
|
|
17
17
|
:type state: str
|
|
18
18
|
"""
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, ConfigDict
|
|
4
|
+
from pydantic.alias_generators import to_camel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AgentsModel(BaseModel):
|
|
8
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
@model_serializer
|
|
12
|
+
def _serialize(self):
|
|
13
|
+
omit_if_empty = {
|
|
14
|
+
k
|
|
15
|
+
for k, v in self
|
|
16
|
+
if isinstance(v, list) and not v
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return {k: v for k, v in self if k not in omit_if_empty and v is not None}
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def pick_properties(cls, original: AgentsModel, fields_to_copy=None, **kwargs):
|
|
24
|
+
"""Picks properties from the original model and returns a new instance (of a possibly different AgentsModel) with those properties.
|
|
25
|
+
|
|
26
|
+
This method preserves unset values.
|
|
27
|
+
|
|
28
|
+
args:
|
|
29
|
+
original: The original model instance to copy properties from. If None, returns None.
|
|
30
|
+
fields_to_copy: The specific fields to copy. If None, all fields are copied.
|
|
31
|
+
**kwargs: Additional fields to include in the new instance.
|
|
32
|
+
"""
|
|
33
|
+
if not original:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
if fields_to_copy is None:
|
|
37
|
+
fields_to_copy = original.model_fields_set
|
|
38
|
+
else:
|
|
39
|
+
fields_to_copy = original.model_fields_set & set(fields_to_copy)
|
|
40
|
+
|
|
41
|
+
dest = {}
|
|
42
|
+
for field in fields_to_copy:
|
|
43
|
+
dest[field] = getattr(original, field)
|
|
44
|
+
|
|
45
|
+
dest.update(kwargs)
|
|
46
|
+
return cls.model_validate(dest)
|
|
@@ -15,12 +15,12 @@ class AnimationCard(AgentsModel):
|
|
|
15
15
|
:param text: Text of this card
|
|
16
16
|
:type text: str
|
|
17
17
|
:param image: Thumbnail placeholder
|
|
18
|
-
:type image: ~microsoft_agents.
|
|
18
|
+
:type image: ~microsoft_agents.activity.ThumbnailUrl
|
|
19
19
|
:param media: Media URLs for this card. When this field contains more than
|
|
20
20
|
one URL, each URL is an alternative format of the same content.
|
|
21
|
-
:type media: list[~microsoft_agents.
|
|
21
|
+
:type media: list[~microsoft_agents.activity.MediaUrl]
|
|
22
22
|
:param buttons: Actions on this card
|
|
23
|
-
:type buttons: list[~microsoft_agents.
|
|
23
|
+
:type buttons: list[~microsoft_agents.activity.CardAction]
|
|
24
24
|
:param shareable: This content may be shared with others (default:true)
|
|
25
25
|
:type shareable: bool
|
|
26
26
|
:param autoloop: Should the client loop playback at end of content
|
|
@@ -42,7 +42,7 @@ class AnimationCard(AgentsModel):
|
|
|
42
42
|
|
|
43
43
|
title: NonEmptyString = None
|
|
44
44
|
subtitle: NonEmptyString = None
|
|
45
|
-
text:
|
|
45
|
+
text: str = None
|
|
46
46
|
image: ThumbnailUrl = None
|
|
47
47
|
media: list[MediaUrl] = None
|
|
48
48
|
buttons: list[CardAction] = None
|
|
@@ -11,7 +11,7 @@ class AttachmentInfo(AgentsModel):
|
|
|
11
11
|
:param type: ContentType of the attachment
|
|
12
12
|
:type type: str
|
|
13
13
|
:param views: attachment views
|
|
14
|
-
:type views: list[~microsoft_agents.
|
|
14
|
+
:type views: list[~microsoft_agents.activity.AttachmentView]
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
name: NonEmptyString = None
|
|
@@ -15,12 +15,12 @@ class AudioCard(AgentsModel):
|
|
|
15
15
|
:param text: Text of this card
|
|
16
16
|
:type text: str
|
|
17
17
|
:param image: Thumbnail placeholder
|
|
18
|
-
:type image: ~microsoft_agents.
|
|
18
|
+
:type image: ~microsoft_agents.activity.ThumbnailUrl
|
|
19
19
|
:param media: Media URLs for this card. When this field contains more than
|
|
20
20
|
one URL, each URL is an alternative format of the same content.
|
|
21
|
-
:type media: list[~microsoft_agents.
|
|
21
|
+
:type media: list[~microsoft_agents.activity.MediaUrl]
|
|
22
22
|
:param buttons: Actions on this card
|
|
23
|
-
:type buttons: list[~microsoft_agents.
|
|
23
|
+
:type buttons: list[~microsoft_agents.activity.CardAction]
|
|
24
24
|
:param shareable: This content may be shared with others (default:true)
|
|
25
25
|
:type shareable: bool
|
|
26
26
|
:param autoloop: Should the client loop playback at end of content
|
|
@@ -42,7 +42,7 @@ class AudioCard(AgentsModel):
|
|
|
42
42
|
|
|
43
43
|
title: NonEmptyString = None
|
|
44
44
|
subtitle: NonEmptyString = None
|
|
45
|
-
text:
|
|
45
|
+
text: str = None
|
|
46
46
|
image: ThumbnailUrl = None
|
|
47
47
|
media: list[MediaUrl] = None
|
|
48
48
|
buttons: list[CardAction] = None
|
|
@@ -14,17 +14,17 @@ class BasicCard(AgentsModel):
|
|
|
14
14
|
:param text: Text for the card
|
|
15
15
|
:type text: str
|
|
16
16
|
:param images: Array of images for the card
|
|
17
|
-
:type images: list[~microsoft_agents.
|
|
17
|
+
:type images: list[~microsoft_agents.activity.CardImage]
|
|
18
18
|
:param buttons: Set of actions applicable to the current card
|
|
19
|
-
:type buttons: list[~microsoft_agents.
|
|
19
|
+
:type buttons: list[~microsoft_agents.activity.CardAction]
|
|
20
20
|
:param tap: This action will be activated when user taps on the card
|
|
21
21
|
itself
|
|
22
|
-
:type tap: ~microsoft_agents.
|
|
22
|
+
:type tap: ~microsoft_agents.activity.CardAction
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
title: NonEmptyString = None
|
|
26
26
|
subtitle: NonEmptyString = None
|
|
27
|
-
text:
|
|
27
|
+
text: str = None
|
|
28
28
|
images: list[CardImage] = None
|
|
29
29
|
buttons: list[CardAction] = None
|
|
30
30
|
tap: CardAction = None
|
|
@@ -9,7 +9,7 @@ class CardAction(AgentsModel):
|
|
|
9
9
|
:param type: The type of action implemented by this button. Possible
|
|
10
10
|
values include: 'openUrl', 'imBack', 'postBack', 'playAudio', 'playVideo',
|
|
11
11
|
'showImage', 'downloadFile', 'signin', 'call', 'messageBack'
|
|
12
|
-
:type type: str or ~microsoft_agents.
|
|
12
|
+
:type type: str or ~microsoft_agents.activity.ActionTypes
|
|
13
13
|
:param title: Text description which appears on the button
|
|
14
14
|
:type title: str
|
|
15
15
|
:param image: Image URL which will appear on the button, next to text
|
|
@@ -11,7 +11,7 @@ class CardImage(AgentsModel):
|
|
|
11
11
|
:param alt: Image description intended for screen readers
|
|
12
12
|
:type alt: str
|
|
13
13
|
:param tap: Action assigned to specific Attachment
|
|
14
|
-
:type tap: ~microsoft_agents.
|
|
14
|
+
:type tap: ~microsoft_agents.activity.CardAction
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
url: NonEmptyString = None
|