microsoft-agents-hosting-core 1.1.0.dev7__tar.gz → 1.1.0.dev9__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.
- {microsoft_agents_hosting_core-1.1.0.dev7/microsoft_agents_hosting_core.egg-info → microsoft_agents_hosting_core-1.1.0.dev9}/PKG-INFO +2 -2
- microsoft_agents_hosting_core-1.1.0.dev9/VERSION.txt +1 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/_oauth/_oauth_flow.py +1 -1
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/agent_application.py +4 -5
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/app_options.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/input_file.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/state/conversation_state.py +1 -1
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/state/state.py +5 -8
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/state/temp_state.py +4 -6
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/state/turn_state.py +3 -3
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/streaming/citation_util.py +3 -3
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/streaming/streaming_response.py +7 -8
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/typing_indicator.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/channel_adapter.py +8 -6
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/channel_service_adapter.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/channels_configuration.py +6 -6
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/configuration_channel_host.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/http_agent_channel.py +1 -1
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/agent_sign_in_base.py +6 -6
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/user_token_base.py +14 -7
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/http/_channel_service_routes.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/http/_http_adapter_base.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/http/_http_request_protocol.py +3 -3
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/http/_http_response.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/message_factory.py +16 -16
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/state/agent_state.py +9 -9
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/state/state_property_accessor.py +3 -3
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/memory_storage.py +1 -1
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/storage.py +7 -12
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/transcript_file_store.py +8 -8
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/transcript_logger.py +3 -4
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/transcript_memory_store.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/transcript_store.py +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/turn_context.py +9 -5
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9/microsoft_agents_hosting_core.egg-info}/PKG-INFO +2 -2
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents_hosting_core.egg-info/requires.txt +1 -1
- microsoft_agents_hosting_core-1.1.0.dev7/VERSION.txt +0 -1
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/LICENSE +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/MANIFEST.in +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/_oauth/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/_oauth/_flow_state.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/_oauth/_flow_storage_client.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/activity_handler.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/agent.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/_routes/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/_routes/_route.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/_routes/_route_list.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/_routes/route_rank.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/_type_defs.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/app_error.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_handlers/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_handlers/_authorization_handler.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_handlers/_user_authorization.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_handlers/agentic_user_authorization.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_handlers/connector_user_authorization.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_sign_in_response.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/_sign_in_state.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/auth_handler.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/authorization.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/oauth/telemetry/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/conversation.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/conversation_builder.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/conversation_reference_builder.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/create_conversation_options.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/proactive.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/proactive_options.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/proactive/telemetry/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/query.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/state/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/streaming/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/streaming/citation.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/telemetry/metrics.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/app/telemetry/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/access_token_provider_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/anonymous_token_provider.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/auth_types.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/authentication_constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/claims_identity.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/connections.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/jwt_token_validator.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/telemetry/metrics.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/authorization/telemetry/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/card_factory.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/channel_api_handler_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/channel_service_client_factory_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/agent_conversation_reference.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/channel_factory_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/channel_host_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/channel_info_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/channel_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/conversation_constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/conversation_id_factory.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/conversation_id_factory_options.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/conversation_id_factory_protocol.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/client/http_agent_channel_factory.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/attachments_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/client/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/client/connector_client.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/client/user_token_client.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/connector_client_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/conversations_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/get_product_info.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/mcs/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/mcs/mcs_connector_client.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/teams/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/teams/teams_connector_client.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/_request_span_wrapper.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/connector_spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/metrics.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/telemetry/user_token_client_spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/connector/user_token_client_base.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/errors/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/errors/error_resources.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/http/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/middleware_set.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/rest_channel_service_client_factory.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/state/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/state/user_state.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/_type_aliases.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/error_handling.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/store_item.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/telemetry/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/telemetry/metrics.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/telemetry/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/storage/transcript_info.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/adapter/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/adapter/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/adapter/metrics.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/adapter/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/attributes.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/_agents_telemetry.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/base_span_wrapper.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/resource.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/simple_span_wrapper.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/core/type_defs.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/turn_context/__init__.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/turn_context/constants.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/turn_context/spans.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents/hosting/core/telemetry/utils.py +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents_hosting_core.egg-info/SOURCES.txt +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents_hosting_core.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/microsoft_agents_hosting_core.egg-info/top_level.txt +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/pyproject.toml +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/readme.md +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/setup.cfg +0 -0
- {microsoft_agents_hosting_core-1.1.0.dev7 → microsoft_agents_hosting_core-1.1.0.dev9}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microsoft-agents-hosting-core
|
|
3
|
-
Version: 1.1.0.
|
|
3
|
+
Version: 1.1.0.dev9
|
|
4
4
|
Summary: Core library for Microsoft Agents
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
|
|
|
15
15
|
Requires-Python: >=3.10
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: microsoft-agents-activity==1.1.0.
|
|
18
|
+
Requires-Dist: microsoft-agents-activity==1.1.0.dev9
|
|
19
19
|
Requires-Dist: pyjwt>=2.10.1
|
|
20
20
|
Requires-Dist: isodate>=0.6.1
|
|
21
21
|
Requires-Dist: azure-core>=1.30.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.1.0.dev9
|
|
@@ -107,7 +107,7 @@ class _OAuthFlow:
|
|
|
107
107
|
def flow_state(self) -> _FlowState:
|
|
108
108
|
return self._flow_state.model_copy()
|
|
109
109
|
|
|
110
|
-
async def get_user_token(self, magic_code: str = None) -> TokenResponse:
|
|
110
|
+
async def get_user_token(self, magic_code: str | None = None) -> TokenResponse:
|
|
111
111
|
"""Get the user token based on the context.
|
|
112
112
|
|
|
113
113
|
Args:
|
|
@@ -18,7 +18,6 @@ from typing import (
|
|
|
18
18
|
Optional,
|
|
19
19
|
Pattern,
|
|
20
20
|
TypeVar,
|
|
21
|
-
Union,
|
|
22
21
|
cast,
|
|
23
22
|
)
|
|
24
23
|
|
|
@@ -289,7 +288,7 @@ class AgentApplication(Agent, Generic[StateT]):
|
|
|
289
288
|
|
|
290
289
|
def activity(
|
|
291
290
|
self,
|
|
292
|
-
activity_type:
|
|
291
|
+
activity_type: str | ActivityTypes | list[str | ActivityTypes],
|
|
293
292
|
*,
|
|
294
293
|
auth_handlers: Optional[list[str]] = None,
|
|
295
294
|
**kwargs,
|
|
@@ -306,7 +305,7 @@ class AgentApplication(Agent, Generic[StateT]):
|
|
|
306
305
|
return True
|
|
307
306
|
|
|
308
307
|
:param activity_type: Activity type or collection of types that should trigger the handler.
|
|
309
|
-
:type activity_type:
|
|
308
|
+
:type activity_type: str | microsoft_agents.activity.ActivityTypes | list[str | microsoft_agents.activity.ActivityTypes]
|
|
310
309
|
:param auth_handlers: Optional list of authorization handler IDs for the route.
|
|
311
310
|
:type auth_handlers: Optional[list[str]]
|
|
312
311
|
:param kwargs: Additional route configuration passed to :meth:`microsoft_agents.hosting.core.AgentApplication.add_route`.
|
|
@@ -326,7 +325,7 @@ class AgentApplication(Agent, Generic[StateT]):
|
|
|
326
325
|
|
|
327
326
|
def message(
|
|
328
327
|
self,
|
|
329
|
-
select:
|
|
328
|
+
select: str | Pattern[str] | list[str | Pattern[str]],
|
|
330
329
|
*,
|
|
331
330
|
auth_handlers: Optional[list[str]] = None,
|
|
332
331
|
**kwargs,
|
|
@@ -343,7 +342,7 @@ class AgentApplication(Agent, Generic[StateT]):
|
|
|
343
342
|
return True
|
|
344
343
|
|
|
345
344
|
:param select: Literal text, compiled regex, or list of either used to match the incoming message.
|
|
346
|
-
:type select:
|
|
345
|
+
:type select: str | Pattern[str] | list[str | Pattern[str]]
|
|
347
346
|
:param auth_handlers: Optional list of authorization handler IDs for the route.
|
|
348
347
|
:type auth_handlers: Optional[list[str]]
|
|
349
348
|
:param kwargs: Additional route configuration passed to :meth:`microsoft_agents.hosting.core.AgentApplication.add_route`.
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
from dataclasses import dataclass, field
|
|
9
9
|
from logging import Logger
|
|
10
|
-
from typing import Callable,
|
|
10
|
+
from typing import Callable, Optional
|
|
11
11
|
|
|
12
12
|
from microsoft_agents.hosting.core.app.oauth import AuthHandler
|
|
13
13
|
from microsoft_agents.hosting.core.storage import Storage
|
|
@@ -81,7 +81,7 @@ class ApplicationOptions:
|
|
|
81
81
|
will mark the bot's process as idle and shut it down.
|
|
82
82
|
"""
|
|
83
83
|
|
|
84
|
-
file_downloaders:
|
|
84
|
+
file_downloaders: list[InputFileDownloader] = field(default_factory=list)
|
|
85
85
|
"""
|
|
86
86
|
Optional. Array of input file download plugins to use.
|
|
87
87
|
"""
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC, abstractmethod
|
|
9
9
|
from dataclasses import dataclass
|
|
10
|
-
from typing import
|
|
10
|
+
from typing import Optional
|
|
11
11
|
|
|
12
12
|
from microsoft_agents.hosting.core import TurnContext
|
|
13
13
|
|
|
@@ -38,7 +38,7 @@ class InputFileDownloader(ABC):
|
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
@abstractmethod
|
|
41
|
-
async def download_files(self, context: TurnContext) ->
|
|
41
|
+
async def download_files(self, context: TurnContext) -> list[InputFile]:
|
|
42
42
|
"""
|
|
43
43
|
Download any files referenced by the incoming activity for the current turn.
|
|
44
44
|
|
|
@@ -33,7 +33,7 @@ class ConversationState(AgentState):
|
|
|
33
33
|
super().__init__(storage=storage, context_service_key=self.CONTEXT_SERVICE_KEY)
|
|
34
34
|
|
|
35
35
|
def get_storage_key(
|
|
36
|
-
self, turn_context: TurnContext, *, target_cls: Type[StoreItem] = None
|
|
36
|
+
self, turn_context: TurnContext, *, target_cls: Type[StoreItem] | None = None
|
|
37
37
|
):
|
|
38
38
|
channel_id = turn_context.activity.channel_id
|
|
39
39
|
if not channel_id:
|
|
@@ -6,10 +6,9 @@ Licensed under the MIT License.
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
import logging
|
|
8
8
|
|
|
9
|
-
import json
|
|
10
9
|
from abc import ABC, abstractmethod
|
|
11
10
|
from copy import deepcopy
|
|
12
|
-
from typing import Any, Callable,
|
|
11
|
+
from typing import Any, Callable, Optional, Type, TypeVar, overload
|
|
13
12
|
|
|
14
13
|
from microsoft_agents.hosting.core.state.state_property_accessor import (
|
|
15
14
|
StatePropertyAccessor as _StatePropertyAccessor,
|
|
@@ -32,7 +31,7 @@ def state(_cls: Type[T]) -> Type[T]: ...
|
|
|
32
31
|
|
|
33
32
|
def state(
|
|
34
33
|
_cls: Optional[Type[T]] = None,
|
|
35
|
-
) ->
|
|
34
|
+
) -> Callable[[Type[T]], Type[T]] | Type[T]:
|
|
36
35
|
"""
|
|
37
36
|
@state\n
|
|
38
37
|
class Example(State):
|
|
@@ -71,7 +70,7 @@ class State(dict[str, StoreItem], ABC):
|
|
|
71
70
|
The Storage Key
|
|
72
71
|
"""
|
|
73
72
|
|
|
74
|
-
__deleted__:
|
|
73
|
+
__deleted__: list[str]
|
|
75
74
|
"""
|
|
76
75
|
Deleted Keys
|
|
77
76
|
"""
|
|
@@ -206,9 +205,7 @@ class StatePropertyAccessor(_StatePropertyAccessor):
|
|
|
206
205
|
async def get(
|
|
207
206
|
self,
|
|
208
207
|
turn_context: TurnContext,
|
|
209
|
-
default_value_or_factory: Optional[
|
|
210
|
-
Union[Any, Callable[[], Optional[Any]]]
|
|
211
|
-
] = None,
|
|
208
|
+
default_value_or_factory: Optional[Any | Callable[[], Optional[Any]]] = None,
|
|
212
209
|
) -> Optional[Any]:
|
|
213
210
|
"""
|
|
214
211
|
Get the property value from the state.
|
|
@@ -216,7 +213,7 @@ class StatePropertyAccessor(_StatePropertyAccessor):
|
|
|
216
213
|
:param turn_context: The turn context.
|
|
217
214
|
:type turn_context: :class:`microsoft_agents.hosting.core.turn_context.TurnContext`
|
|
218
215
|
:param default_value_or_factory: Default value or factory function to use if property doesn't exist.
|
|
219
|
-
:type default_value_or_factory: Optional[
|
|
216
|
+
:type default_value_or_factory: Optional[Any | Callable[[], Optional[Any]]]
|
|
220
217
|
:return: The property value or default value if not found.
|
|
221
218
|
:rtype: Optional[Any]
|
|
222
219
|
"""
|
|
@@ -5,9 +5,7 @@ Licensed under the MIT License.
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
-
from typing import
|
|
9
|
-
|
|
10
|
-
from microsoft_agents.hosting.core.storage import Storage
|
|
8
|
+
from typing import Optional, TypeVar, Callable, Any
|
|
11
9
|
|
|
12
10
|
from microsoft_agents.hosting.core.turn_context import TurnContext
|
|
13
11
|
from microsoft_agents.hosting.core.app.input_file import InputFile
|
|
@@ -32,7 +30,7 @@ class TempState(AgentState):
|
|
|
32
30
|
|
|
33
31
|
def __init__(self):
|
|
34
32
|
super().__init__(None, context_service_key=self.SCOPE_NAME)
|
|
35
|
-
self._state:
|
|
33
|
+
self._state: dict[str, Any] = {}
|
|
36
34
|
|
|
37
35
|
@property
|
|
38
36
|
def name(self) -> str:
|
|
@@ -40,12 +38,12 @@ class TempState(AgentState):
|
|
|
40
38
|
return self.SCOPE_NAME
|
|
41
39
|
|
|
42
40
|
@property
|
|
43
|
-
def input_files(self) ->
|
|
41
|
+
def input_files(self) -> list[InputFile]:
|
|
44
42
|
"""Downloaded files included in the Activity"""
|
|
45
43
|
return self.get_value(self.INPUT_FILES_KEY, lambda: [])
|
|
46
44
|
|
|
47
45
|
@input_files.setter
|
|
48
|
-
def input_files(self, value:
|
|
46
|
+
def input_files(self, value: list[InputFile]) -> None:
|
|
49
47
|
self.set_value(self.INPUT_FILES_KEY, value)
|
|
50
48
|
|
|
51
49
|
def clear(self, turn_context: TurnContext) -> None:
|
|
@@ -6,7 +6,7 @@ Licensed under the MIT License.
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
import logging
|
|
8
8
|
|
|
9
|
-
from typing import Any,
|
|
9
|
+
from typing import Any, Optional, Type, TypeVar, Callable
|
|
10
10
|
import asyncio
|
|
11
11
|
|
|
12
12
|
from microsoft_agents.hosting.core.storage import Storage
|
|
@@ -41,7 +41,7 @@ class TurnState:
|
|
|
41
41
|
Args:
|
|
42
42
|
agent_states: Initial list of AgentState objects to manage.
|
|
43
43
|
"""
|
|
44
|
-
self._scopes:
|
|
44
|
+
self._scopes: dict[str, AgentState] = {}
|
|
45
45
|
|
|
46
46
|
# Add all provided agent states
|
|
47
47
|
for agent_state in agent_states:
|
|
@@ -115,7 +115,7 @@ class TurnState:
|
|
|
115
115
|
name: str,
|
|
116
116
|
default_value_factory: Optional[Callable[[], T]] = None,
|
|
117
117
|
*,
|
|
118
|
-
target_cls: Type[T] = None,
|
|
118
|
+
target_cls: Type[T] | None = None,
|
|
119
119
|
) -> T:
|
|
120
120
|
"""
|
|
121
121
|
Gets a value from state.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Licensed under the MIT License.
|
|
3
3
|
|
|
4
4
|
import re
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Optional
|
|
6
6
|
|
|
7
7
|
from microsoft_agents.activity import ClientCitation
|
|
8
8
|
|
|
@@ -45,8 +45,8 @@ class CitationUtil:
|
|
|
45
45
|
|
|
46
46
|
@staticmethod
|
|
47
47
|
def get_used_citations(
|
|
48
|
-
text: str, citations:
|
|
49
|
-
) -> Optional[
|
|
48
|
+
text: str, citations: list[ClientCitation]
|
|
49
|
+
) -> Optional[list[ClientCitation]]:
|
|
50
50
|
"""
|
|
51
51
|
Get the citations used in the text. This will remove any citations that are
|
|
52
52
|
included in the citations array from the response but not referenced in the text.
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
import uuid
|
|
5
5
|
import asyncio
|
|
6
6
|
import logging
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Optional, Callable, Literal, cast
|
|
8
8
|
|
|
9
9
|
from microsoft_agents.activity import (
|
|
10
10
|
Activity,
|
|
11
11
|
AIEntity,
|
|
12
|
-
Entity,
|
|
13
12
|
EntityTypes,
|
|
14
13
|
Attachment,
|
|
15
14
|
Channels,
|
|
@@ -51,15 +50,15 @@ class StreamingResponse:
|
|
|
51
50
|
self._sequence_number = 1
|
|
52
51
|
self._stream_id: Optional[str] = None
|
|
53
52
|
self._message = ""
|
|
54
|
-
self._queue:
|
|
53
|
+
self._queue: list[Callable[[], Activity | None]] = []
|
|
55
54
|
self._queue_sync: Optional[asyncio.Task] = None
|
|
56
55
|
self._chunk_queued = False
|
|
57
56
|
self._ended = False
|
|
58
57
|
self._cancelled = False
|
|
59
58
|
self._is_streaming_channel = False
|
|
60
59
|
self._interval = 0.1
|
|
61
|
-
self._attachments: Optional[
|
|
62
|
-
self._citations:
|
|
60
|
+
self._attachments: Optional[list[Attachment]] = None
|
|
61
|
+
self._citations: list[ClientCitation] = []
|
|
63
62
|
self._sensitivity_label: Optional[SensitivityUsageInfo] = None
|
|
64
63
|
self._enable_feedback_loop = False
|
|
65
64
|
self._feedback_loop_type: Optional[Literal["default", "custom"]] = None
|
|
@@ -102,7 +101,7 @@ class StreamingResponse:
|
|
|
102
101
|
self._queue_activity(create_activity)
|
|
103
102
|
|
|
104
103
|
def queue_text_chunk(
|
|
105
|
-
self, text: str, citations: Optional[
|
|
104
|
+
self, text: str, citations: Optional[list[Citation]] = None
|
|
106
105
|
) -> None:
|
|
107
106
|
"""
|
|
108
107
|
Queues a chunk of partial message text to be sent to the client.
|
|
@@ -142,7 +141,7 @@ class StreamingResponse:
|
|
|
142
141
|
# Wait for the queue to drain
|
|
143
142
|
await self.wait_for_queue()
|
|
144
143
|
|
|
145
|
-
def set_attachments(self, attachments:
|
|
144
|
+
def set_attachments(self, attachments: list[Attachment]) -> None:
|
|
146
145
|
"""
|
|
147
146
|
Sets the attachments to attach to the final chunk.
|
|
148
147
|
|
|
@@ -160,7 +159,7 @@ class StreamingResponse:
|
|
|
160
159
|
"""
|
|
161
160
|
self._sensitivity_label = sensitivity_label
|
|
162
161
|
|
|
163
|
-
def set_citations(self, citations:
|
|
162
|
+
def set_citations(self, citations: list[Citation]) -> None:
|
|
164
163
|
"""
|
|
165
164
|
Sets the citations for the full message.
|
|
166
165
|
|
|
@@ -8,7 +8,7 @@ from __future__ import annotations
|
|
|
8
8
|
import asyncio
|
|
9
9
|
import logging
|
|
10
10
|
from dataclasses import dataclass, field
|
|
11
|
-
from typing import
|
|
11
|
+
from typing import Optional
|
|
12
12
|
|
|
13
13
|
from microsoft_agents.hosting.core import TurnContext
|
|
14
14
|
from microsoft_agents.activity import Activity, ActivityTypes, Channels, EntityTypes
|
|
@@ -42,7 +42,7 @@ class TypingOptions:
|
|
|
42
42
|
|
|
43
43
|
initial_delay_ms: int = DEFAULT_INITIAL_DELAY_MS
|
|
44
44
|
interval_ms: int = DEFAULT_INTERVAL_MS
|
|
45
|
-
channel_strategies:
|
|
45
|
+
channel_strategies: dict[str, TypingChannelStrategy] = field(default_factory=dict)
|
|
46
46
|
|
|
47
47
|
def __post_init__(self):
|
|
48
48
|
# Apply default channel overrides (matching .NET's M365Copilot default)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
from abc import ABC, abstractmethod
|
|
5
5
|
from collections.abc import Callable
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Awaitable
|
|
7
7
|
from microsoft_agents.hosting.core.authorization import ClaimsIdentity
|
|
8
8
|
from microsoft_agents.activity import ChannelAdapterProtocol
|
|
9
9
|
from microsoft_agents.activity import (
|
|
@@ -27,15 +27,15 @@ class ChannelAdapter(ABC, ChannelAdapterProtocol):
|
|
|
27
27
|
AGENT_CALLBACK_HANDLER_KEY = "AgentCallbackHandler"
|
|
28
28
|
CHANNEL_SERVICE_FACTORY_KEY = "ChannelServiceClientFactory"
|
|
29
29
|
|
|
30
|
-
on_turn_error: Callable[[TurnContext, Exception], Awaitable] = None
|
|
30
|
+
on_turn_error: Callable[[TurnContext, Exception], Awaitable] | None = None
|
|
31
31
|
|
|
32
32
|
def __init__(self):
|
|
33
33
|
self.middleware_set = MiddlewareSet()
|
|
34
34
|
|
|
35
35
|
@abstractmethod
|
|
36
36
|
async def send_activities(
|
|
37
|
-
self, context: TurnContext, activities:
|
|
38
|
-
) ->
|
|
37
|
+
self, context: TurnContext, activities: list[Activity]
|
|
38
|
+
) -> list[ResourceResponse]:
|
|
39
39
|
"""
|
|
40
40
|
Sends a set of activities to the user. An array of responses from the server will be returned.
|
|
41
41
|
|
|
@@ -119,7 +119,7 @@ class ChannelAdapter(ABC, ChannelAdapterProtocol):
|
|
|
119
119
|
claims_identity: ClaimsIdentity,
|
|
120
120
|
continuation_activity: Activity,
|
|
121
121
|
callback: Callable[[TurnContext], Awaitable],
|
|
122
|
-
audience: str = None,
|
|
122
|
+
audience: str | None = None,
|
|
123
123
|
):
|
|
124
124
|
"""
|
|
125
125
|
Sends a proactive message to a conversation. Call this method to proactively send a message to a conversation.
|
|
@@ -221,7 +221,9 @@ class ChannelAdapter(ABC, ChannelAdapterProtocol):
|
|
|
221
221
|
return await self.run_pipeline(context, callback)
|
|
222
222
|
|
|
223
223
|
async def run_pipeline(
|
|
224
|
-
self,
|
|
224
|
+
self,
|
|
225
|
+
context: TurnContext,
|
|
226
|
+
callback: Callable[[TurnContext], Awaitable] | None = None,
|
|
225
227
|
):
|
|
226
228
|
"""
|
|
227
229
|
Called by the parent class to run the adapters middleware set and calls the passed in `callback()` handler at
|
|
@@ -227,7 +227,7 @@ class ChannelServiceAdapter(ChannelAdapter, ABC):
|
|
|
227
227
|
claims_identity: ClaimsIdentity,
|
|
228
228
|
continuation_activity: Activity,
|
|
229
229
|
callback: Callable[[TurnContext], Awaitable],
|
|
230
|
-
audience: str = None,
|
|
230
|
+
audience: str | None = None,
|
|
231
231
|
):
|
|
232
232
|
"""
|
|
233
233
|
Continue a conversation with the provided claims identity.
|
|
@@ -393,7 +393,7 @@ class ChannelServiceAdapter(ChannelAdapter, ABC):
|
|
|
393
393
|
otherwise, `None` is returned.
|
|
394
394
|
"""
|
|
395
395
|
scopes: list[str] = claims_identity.get_token_scope()
|
|
396
|
-
outgoing_audience: str = None
|
|
396
|
+
outgoing_audience: str | None = None
|
|
397
397
|
|
|
398
398
|
if claims_identity.is_agent_claim():
|
|
399
399
|
outgoing_audience = claims_identity.get_token_audience()
|
|
@@ -10,12 +10,12 @@ class ChannelInfo(ChannelInfoProtocol):
|
|
|
10
10
|
|
|
11
11
|
def __init__(
|
|
12
12
|
self,
|
|
13
|
-
id: str = None,
|
|
14
|
-
app_id: str = None,
|
|
15
|
-
resource_url: str = None,
|
|
16
|
-
token_provider: str = None,
|
|
17
|
-
channel_factory: str = None,
|
|
18
|
-
endpoint: str = None,
|
|
13
|
+
id: str | None = None,
|
|
14
|
+
app_id: str | None = None,
|
|
15
|
+
resource_url: str | None = None,
|
|
16
|
+
token_provider: str | None = None,
|
|
17
|
+
channel_factory: str | None = None,
|
|
18
|
+
endpoint: str | None = None,
|
|
19
19
|
**kwargs
|
|
20
20
|
):
|
|
21
21
|
self.id = id
|
|
@@ -24,8 +24,8 @@ class ConfigurationChannelHost(ChannelHostProtocol):
|
|
|
24
24
|
self.connections = connections
|
|
25
25
|
self.configuration = configuration
|
|
26
26
|
self.channels: dict[str, ChannelInfoProtocol] = {}
|
|
27
|
-
self.host_endpoint: str = None
|
|
28
|
-
self.host_app_id: str = None
|
|
27
|
+
self.host_endpoint: str | None = None
|
|
28
|
+
self.host_app_id: str | None = None
|
|
29
29
|
|
|
30
30
|
channel_host_configuration = configuration.CHANNEL_HOST_CONFIGURATION()
|
|
31
31
|
|
|
@@ -9,9 +9,9 @@ class AgentSignInBase(Protocol):
|
|
|
9
9
|
async def get_sign_in_url(
|
|
10
10
|
self,
|
|
11
11
|
state: str,
|
|
12
|
-
code_challenge: str = None,
|
|
13
|
-
emulator_url: str = None,
|
|
14
|
-
final_redirect: str = None,
|
|
12
|
+
code_challenge: str | None = None,
|
|
13
|
+
emulator_url: str | None = None,
|
|
14
|
+
final_redirect: str | None = None,
|
|
15
15
|
) -> str:
|
|
16
16
|
raise NotImplementedError()
|
|
17
17
|
|
|
@@ -19,8 +19,8 @@ class AgentSignInBase(Protocol):
|
|
|
19
19
|
async def get_sign_in_resource(
|
|
20
20
|
self,
|
|
21
21
|
state: str,
|
|
22
|
-
code_challenge: str = None,
|
|
23
|
-
emulator_url: str = None,
|
|
24
|
-
final_redirect: str = None,
|
|
22
|
+
code_challenge: str | None = None,
|
|
23
|
+
emulator_url: str | None = None,
|
|
24
|
+
final_redirect: str | None = None,
|
|
25
25
|
) -> SignInResource:
|
|
26
26
|
raise NotImplementedError()
|
|
@@ -19,8 +19,8 @@ class UserTokenBase(Protocol):
|
|
|
19
19
|
self,
|
|
20
20
|
user_id: str,
|
|
21
21
|
connection_name: str,
|
|
22
|
-
channel_id: str = None,
|
|
23
|
-
code: str = None,
|
|
22
|
+
channel_id: str | None = None,
|
|
23
|
+
code: str | None = None,
|
|
24
24
|
) -> TokenResponse:
|
|
25
25
|
"""
|
|
26
26
|
Get sign-in URL.
|
|
@@ -63,8 +63,8 @@ class UserTokenBase(Protocol):
|
|
|
63
63
|
self,
|
|
64
64
|
user_id: str,
|
|
65
65
|
connection_name: str,
|
|
66
|
-
channel_id: str = None,
|
|
67
|
-
body: dict = None,
|
|
66
|
+
channel_id: str | None = None,
|
|
67
|
+
body: dict | None = None,
|
|
68
68
|
) -> dict[str, TokenResponse]:
|
|
69
69
|
"""
|
|
70
70
|
Gets Azure Active Directory tokens for a user and connection.
|
|
@@ -79,7 +79,10 @@ class UserTokenBase(Protocol):
|
|
|
79
79
|
|
|
80
80
|
@abstractmethod
|
|
81
81
|
async def sign_out(
|
|
82
|
-
self,
|
|
82
|
+
self,
|
|
83
|
+
user_id: str,
|
|
84
|
+
connection_name: str | None = None,
|
|
85
|
+
channel_id: str | None = None,
|
|
83
86
|
) -> None:
|
|
84
87
|
"""
|
|
85
88
|
Signs the user out from the specified connection.
|
|
@@ -92,7 +95,7 @@ class UserTokenBase(Protocol):
|
|
|
92
95
|
|
|
93
96
|
@abstractmethod
|
|
94
97
|
async def get_token_status(
|
|
95
|
-
self, user_id: str, channel_id: str = None, include: str = None
|
|
98
|
+
self, user_id: str, channel_id: str | None = None, include: str | None = None
|
|
96
99
|
) -> list[TokenStatus]:
|
|
97
100
|
"""
|
|
98
101
|
Gets token status for the user.
|
|
@@ -106,7 +109,11 @@ class UserTokenBase(Protocol):
|
|
|
106
109
|
|
|
107
110
|
@abstractmethod
|
|
108
111
|
async def exchange_token(
|
|
109
|
-
self,
|
|
112
|
+
self,
|
|
113
|
+
user_id: str,
|
|
114
|
+
connection_name: str,
|
|
115
|
+
channel_id: str,
|
|
116
|
+
body: dict | None = None,
|
|
110
117
|
) -> TokenResponse:
|
|
111
118
|
"""
|
|
112
119
|
Exchanges a token.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
"""Channel service route definitions (framework-agnostic logic)."""
|
|
5
5
|
|
|
6
|
-
from typing import Type
|
|
6
|
+
from typing import Type
|
|
7
7
|
|
|
8
8
|
from microsoft_agents.activity import (
|
|
9
9
|
AgentsModel,
|
|
@@ -47,7 +47,7 @@ class ChannelServiceRoutes:
|
|
|
47
47
|
return target_model.model_validate(body)
|
|
48
48
|
|
|
49
49
|
@staticmethod
|
|
50
|
-
def serialize_model(model_or_list:
|
|
50
|
+
def serialize_model(model_or_list: AgentsModel | list[AgentsModel]) -> dict:
|
|
51
51
|
"""Serialize model or list of models to JSON-compatible dict."""
|
|
52
52
|
if isinstance(model_or_list, AgentsModel):
|
|
53
53
|
return model_or_list.model_dump(
|
|
@@ -32,8 +32,8 @@ class HttpAdapterBase(ChannelServiceAdapter, ABC):
|
|
|
32
32
|
def __init__(
|
|
33
33
|
self,
|
|
34
34
|
*,
|
|
35
|
-
connection_manager: Connections = None,
|
|
36
|
-
channel_service_client_factory: ChannelServiceClientFactoryBase = None,
|
|
35
|
+
connection_manager: Connections | None = None,
|
|
36
|
+
channel_service_client_factory: ChannelServiceClientFactoryBase | None = None,
|
|
37
37
|
):
|
|
38
38
|
"""Initialize the HTTP adapter.
|
|
39
39
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
"""Protocol for abstracting HTTP request objects across frameworks."""
|
|
5
5
|
|
|
6
|
-
from typing import Protocol,
|
|
6
|
+
from typing import Protocol, Any, Optional
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class HttpRequestProtocol(Protocol):
|
|
@@ -19,11 +19,11 @@ class HttpRequestProtocol(Protocol):
|
|
|
19
19
|
...
|
|
20
20
|
|
|
21
21
|
@property
|
|
22
|
-
def headers(self) ->
|
|
22
|
+
def headers(self) -> dict[str, str]:
|
|
23
23
|
"""Request headers."""
|
|
24
24
|
...
|
|
25
25
|
|
|
26
|
-
async def json(self) ->
|
|
26
|
+
async def json(self) -> dict[str, Any]:
|
|
27
27
|
"""Parse request body as JSON."""
|
|
28
28
|
...
|
|
29
29
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
"""HTTP response abstraction."""
|
|
5
5
|
|
|
6
|
-
from typing import Any, Optional
|
|
6
|
+
from typing import Any, Optional
|
|
7
7
|
from dataclasses import dataclass
|
|
8
8
|
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ class HttpResponse:
|
|
|
13
13
|
|
|
14
14
|
status_code: int
|
|
15
15
|
body: Optional[Any] = None
|
|
16
|
-
headers: Optional[
|
|
16
|
+
headers: Optional[dict[str, str]] = None
|
|
17
17
|
content_type: Optional[str] = "application/json"
|
|
18
18
|
|
|
19
19
|
|