microsoft-agents-hosting-core 0.6.0.dev1__tar.gz → 0.6.0.dev4__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.
Files changed (104) hide show
  1. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/PKG-INFO +2 -2
  2. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/state/state.py +1 -1
  3. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/client/connector_client.py +84 -50
  4. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/client/user_token_client.py +26 -24
  5. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents_hosting_core.egg-info/PKG-INFO +2 -2
  6. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents_hosting_core.egg-info/requires.txt +1 -1
  7. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/LICENSE +0 -0
  8. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/__init__.py +0 -0
  9. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/_oauth/__init__.py +0 -0
  10. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/_oauth/_flow_state.py +0 -0
  11. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/_oauth/_flow_storage_client.py +0 -0
  12. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/_oauth/_oauth_flow.py +0 -0
  13. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/activity_handler.py +0 -0
  14. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/agent.py +0 -0
  15. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/__init__.py +0 -0
  16. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/_routes/__init__.py +0 -0
  17. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/_routes/_route.py +0 -0
  18. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/_routes/_route_list.py +0 -0
  19. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/_routes/route_rank.py +0 -0
  20. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/_type_defs.py +0 -0
  21. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/agent_application.py +0 -0
  22. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/app_error.py +0 -0
  23. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/app_options.py +0 -0
  24. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/input_file.py +0 -0
  25. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/__init__.py +0 -0
  26. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_handlers/__init__.py +0 -0
  27. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_handlers/_authorization_handler.py +0 -0
  28. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_handlers/_user_authorization.py +0 -0
  29. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_handlers/agentic_user_authorization.py +0 -0
  30. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_sign_in_response.py +0 -0
  31. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/_sign_in_state.py +0 -0
  32. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/auth_handler.py +0 -0
  33. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/oauth/authorization.py +0 -0
  34. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/query.py +0 -0
  35. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/state/__init__.py +0 -0
  36. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/state/conversation_state.py +0 -0
  37. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/state/temp_state.py +0 -0
  38. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/state/turn_state.py +0 -0
  39. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/app/typing_indicator.py +0 -0
  40. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/__init__.py +0 -0
  41. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/access_token_provider_base.py +0 -0
  42. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py +0 -0
  43. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/anonymous_token_provider.py +0 -0
  44. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/auth_types.py +0 -0
  45. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/authentication_constants.py +0 -0
  46. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/claims_identity.py +0 -0
  47. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/connections.py +0 -0
  48. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/authorization/jwt_token_validator.py +0 -0
  49. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/card_factory.py +0 -0
  50. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/channel_adapter.py +0 -0
  51. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/channel_api_handler_protocol.py +0 -0
  52. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/channel_service_adapter.py +0 -0
  53. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/channel_service_client_factory_base.py +0 -0
  54. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/__init__.py +0 -0
  55. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/agent_conversation_reference.py +0 -0
  56. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/channel_factory_protocol.py +0 -0
  57. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/channel_host_protocol.py +0 -0
  58. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/channel_info_protocol.py +0 -0
  59. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/channel_protocol.py +0 -0
  60. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/channels_configuration.py +0 -0
  61. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/configuration_channel_host.py +0 -0
  62. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/conversation_constants.py +0 -0
  63. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/conversation_id_factory.py +0 -0
  64. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/conversation_id_factory_options.py +0 -0
  65. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/conversation_id_factory_protocol.py +0 -0
  66. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/http_agent_channel.py +0 -0
  67. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/client/http_agent_channel_factory.py +0 -0
  68. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/__init__.py +0 -0
  69. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/agent_sign_in_base.py +0 -0
  70. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/attachments_base.py +0 -0
  71. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/client/__init__.py +0 -0
  72. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/connector_client_base.py +0 -0
  73. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/conversations_base.py +0 -0
  74. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/get_product_info.py +0 -0
  75. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/teams/__init__.py +0 -0
  76. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/teams/teams_connector_client.py +0 -0
  77. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/user_token_base.py +0 -0
  78. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/connector/user_token_client_base.py +0 -0
  79. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/message_factory.py +0 -0
  80. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/middleware_set.py +0 -0
  81. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/rest_channel_service_client_factory.py +0 -0
  82. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/state/__init__.py +0 -0
  83. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/state/agent_state.py +0 -0
  84. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/state/state_property_accessor.py +0 -0
  85. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/state/user_state.py +0 -0
  86. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/__init__.py +0 -0
  87. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/_type_aliases.py +0 -0
  88. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/error_handling.py +0 -0
  89. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/memory_storage.py +0 -0
  90. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/storage.py +0 -0
  91. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/store_item.py +0 -0
  92. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/transcript_file_store.py +0 -0
  93. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/transcript_info.py +0 -0
  94. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/transcript_logger.py +0 -0
  95. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/transcript_memory_store.py +0 -0
  96. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/storage/transcript_store.py +0 -0
  97. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents/hosting/core/turn_context.py +0 -0
  98. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents_hosting_core.egg-info/SOURCES.txt +0 -0
  99. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents_hosting_core.egg-info/dependency_links.txt +0 -0
  100. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/microsoft_agents_hosting_core.egg-info/top_level.txt +0 -0
  101. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/pyproject.toml +0 -0
  102. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/readme.md +0 -0
  103. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/setup.cfg +0 -0
  104. {microsoft_agents_hosting_core-0.6.0.dev1 → microsoft_agents_hosting_core-0.6.0.dev4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-core
3
- Version: 0.6.0.dev1
3
+ Version: 0.6.0.dev4
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==0.6.0.dev1
18
+ Requires-Dist: microsoft-agents-activity==0.6.0.dev4
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
@@ -109,7 +109,7 @@ class State(dict[str, StoreItem], ABC):
109
109
  data = self.copy()
110
110
  del data["__key__"]
111
111
 
112
- logger.info(f"Saving state {self.__key__}")
112
+ logger.info("Saving state %s", self.__key__)
113
113
  await storage.delete(self.__deleted__)
114
114
  await storage.write(
115
115
  {
@@ -74,11 +74,13 @@ class AttachmentsOperations(AttachmentsBase):
74
74
 
75
75
  url = f"v3/attachments/{attachment_id}"
76
76
 
77
- logger.info(f"Getting attachment info for ID: {attachment_id}")
77
+ logger.info("Getting attachment info for ID: %s", attachment_id)
78
78
  async with self.client.get(url) as response:
79
- if response.status >= 400:
79
+ if response.status >= 300:
80
80
  logger.error(
81
- f"Error getting attachment info: {response.status}", stack_info=True
81
+ "Error getting attachment info: %s",
82
+ response.status,
83
+ stack_info=True,
82
84
  )
83
85
  response.raise_for_status()
84
86
 
@@ -108,11 +110,13 @@ class AttachmentsOperations(AttachmentsBase):
108
110
 
109
111
  url = f"v3/attachments/{attachment_id}/views/{view_id}"
110
112
 
111
- logger.info(f"Getting attachment for ID: {attachment_id}, View ID: {view_id}")
113
+ logger.info(
114
+ "Getting attachment for ID: %s, View ID: %s", attachment_id, view_id
115
+ )
112
116
  async with self.client.get(url) as response:
113
- if response.status >= 400:
117
+ if response.status >= 300:
114
118
  logger.error(
115
- f"Error getting attachment: {response.status}", stack_info=True
119
+ "Error getting attachment: %s", response.status, stack_info=True
116
120
  )
117
121
  response.raise_for_status()
118
122
 
@@ -143,12 +147,12 @@ class ConversationsOperations(ConversationsBase):
143
147
  )
144
148
 
145
149
  logger.info(
146
- f"Getting conversations with continuation token: {continuation_token}"
150
+ "Getting conversations with continuation token: %s", continuation_token
147
151
  )
148
152
  async with self.client.get("v3/conversations", params=params) as response:
149
- if response.status >= 400:
153
+ if response.status >= 300:
150
154
  logger.error(
151
- f"Error getting conversations: {response.status}", stack_info=True
155
+ "Error getting conversations: %s", response.status, stack_info=True
152
156
  )
153
157
  response.raise_for_status()
154
158
 
@@ -170,9 +174,9 @@ class ConversationsOperations(ConversationsBase):
170
174
  "v3/conversations",
171
175
  json=body.model_dump(by_alias=True, exclude_unset=True, mode="json"),
172
176
  ) as response:
173
- if response.status >= 400:
177
+ if response.status >= 300:
174
178
  logger.error(
175
- f"Error creating conversation: {response.status}", stack_info=True
179
+ "Error creating conversation: %s", response.status, stack_info=True
176
180
  )
177
181
  response.raise_for_status()
178
182
 
@@ -201,7 +205,10 @@ class ConversationsOperations(ConversationsBase):
201
205
  url = f"v3/conversations/{conversation_id}/activities/{activity_id}"
202
206
 
203
207
  logger.info(
204
- f"Replying to activity: {activity_id} in conversation: {conversation_id}. Activity type is {body.type}"
208
+ "Replying to activity: %s in conversation: %s. Activity type is %s",
209
+ activity_id,
210
+ conversation_id,
211
+ body.type,
205
212
  )
206
213
 
207
214
  async with self.client.post(
@@ -212,15 +219,16 @@ class ConversationsOperations(ConversationsBase):
212
219
  ) as response:
213
220
  result = await response.json() if response.content_length else {}
214
221
 
215
- if response.status >= 400:
222
+ if response.status >= 300:
216
223
  logger.error(
217
- f"Error replying to activity: {result or response.status}",
224
+ "Error replying to activity: %s",
225
+ result or response.status,
218
226
  stack_info=True,
219
227
  )
220
228
  response.raise_for_status()
221
229
 
222
230
  logger.info(
223
- f"Reply to conversation/activity: {result.get('id')}, {activity_id}"
231
+ "Reply to conversation/activity: %s, %s", result.get("id"), activity_id
224
232
  )
225
233
 
226
234
  return ResourceResponse.model_validate(result)
@@ -246,15 +254,19 @@ class ConversationsOperations(ConversationsBase):
246
254
  url = f"v3/conversations/{conversation_id}/activities"
247
255
 
248
256
  logger.info(
249
- f"Sending to conversation: {conversation_id}. Activity type is {body.type}"
257
+ "Sending to conversation: %s. Activity type is %s",
258
+ conversation_id,
259
+ body.type,
250
260
  )
251
261
  async with self.client.post(
252
262
  url,
253
263
  json=body.model_dump(by_alias=True, exclude_unset=True, mode="json"),
254
264
  ) as response:
255
- if response.status >= 400:
265
+ if response.status >= 300:
256
266
  logger.error(
257
- f"Error sending to conversation: {response.status}", stack_info=True
267
+ "Error sending to conversation: %s",
268
+ response.status,
269
+ stack_info=True,
258
270
  )
259
271
  response.raise_for_status()
260
272
 
@@ -283,15 +295,18 @@ class ConversationsOperations(ConversationsBase):
283
295
  url = f"v3/conversations/{conversation_id}/activities/{activity_id}"
284
296
 
285
297
  logger.info(
286
- f"Updating activity: {activity_id} in conversation: {conversation_id}. Activity type is {body.type}"
298
+ "Updating activity: %s in conversation: %s. Activity type is %s",
299
+ activity_id,
300
+ conversation_id,
301
+ body.type,
287
302
  )
288
303
  async with self.client.put(
289
304
  url,
290
305
  json=body.model_dump(by_alias=True, exclude_unset=True),
291
306
  ) as response:
292
- if response.status >= 400:
307
+ if response.status >= 300:
293
308
  logger.error(
294
- f"Error updating activity: {response.status}", stack_info=True
309
+ "Error updating activity: %s", response.status, stack_info=True
295
310
  )
296
311
  response.raise_for_status()
297
312
 
@@ -316,12 +331,14 @@ class ConversationsOperations(ConversationsBase):
316
331
  url = f"v3/conversations/{conversation_id}/activities/{activity_id}"
317
332
 
318
333
  logger.info(
319
- f"Deleting activity: {activity_id} from conversation: {conversation_id}"
334
+ "Deleting activity: %s from conversation: %s",
335
+ activity_id,
336
+ conversation_id,
320
337
  )
321
338
  async with self.client.delete(url) as response:
322
- if response.status >= 400:
339
+ if response.status >= 300:
323
340
  logger.error(
324
- f"Error deleting activity: {response.status}", stack_info=True
341
+ "Error deleting activity: %s", response.status, stack_info=True
325
342
  )
326
343
  response.raise_for_status()
327
344
 
@@ -354,12 +371,14 @@ class ConversationsOperations(ConversationsBase):
354
371
  }
355
372
 
356
373
  logger.info(
357
- f"Uploading attachment to conversation: {conversation_id}, Attachment name: {body.name}"
374
+ "Uploading attachment to conversation: %s, Attachment name: %s",
375
+ conversation_id,
376
+ body.name,
358
377
  )
359
378
  async with self.client.post(url, json=attachment_dict) as response:
360
- if response.status >= 400:
379
+ if response.status >= 300:
361
380
  logger.error(
362
- f"Error uploading attachment: {response.status}", stack_info=True
381
+ "Error uploading attachment: %s", response.status, stack_info=True
363
382
  )
364
383
  response.raise_for_status()
365
384
 
@@ -385,11 +404,14 @@ class ConversationsOperations(ConversationsBase):
385
404
  conversation_id = self._normalize_conversation_id(conversation_id)
386
405
  url = f"v3/conversations/{conversation_id}/members"
387
406
 
388
- logger.info(f"Getting conversation members for conversation: {conversation_id}")
407
+ logger.info(
408
+ "Getting conversation members for conversation: %s", conversation_id
409
+ )
389
410
  async with self.client.get(url) as response:
390
- if response.status >= 400:
411
+ if response.status >= 300:
391
412
  logger.error(
392
- f"Error getting conversation members: {response.status}",
413
+ "Error getting conversation members: %s",
414
+ response.status,
393
415
  stack_info=True,
394
416
  )
395
417
  response.raise_for_status()
@@ -418,12 +440,15 @@ class ConversationsOperations(ConversationsBase):
418
440
  url = f"v3/conversations/{conversation_id}/members/{member_id}"
419
441
 
420
442
  logger.info(
421
- f"Getting conversation member: {member_id} from conversation: {conversation_id}"
443
+ "Getting conversation member: %s from conversation: %s",
444
+ member_id,
445
+ conversation_id,
422
446
  )
423
447
  async with self.client.get(url) as response:
424
- if response.status >= 400:
448
+ if response.status >= 300:
425
449
  logger.error(
426
- f"Error getting conversation member: {response.status}",
450
+ "Error getting conversation member: %s",
451
+ response.status,
427
452
  stack_info=True,
428
453
  )
429
454
  response.raise_for_status()
@@ -451,12 +476,15 @@ class ConversationsOperations(ConversationsBase):
451
476
  url = f"v3/conversations/{conversation_id}/members/{member_id}"
452
477
 
453
478
  logger.info(
454
- f"Deleting conversation member: {member_id} from conversation: {conversation_id}"
479
+ "Deleting conversation member: %s from conversation: %s",
480
+ member_id,
481
+ conversation_id,
455
482
  )
456
483
  async with self.client.delete(url) as response:
457
- if response.status >= 400 and response.status != 204:
484
+ if response.status >= 300:
458
485
  logger.error(
459
- f"Error deleting conversation member: {response.status}",
486
+ "Error deleting conversation member: %s",
487
+ response.status,
460
488
  stack_info=True,
461
489
  )
462
490
  response.raise_for_status()
@@ -482,12 +510,15 @@ class ConversationsOperations(ConversationsBase):
482
510
  url = f"v3/conversations/{conversation_id}/activities/{activity_id}/members"
483
511
 
484
512
  logger.info(
485
- f"Getting activity members for conversation: {conversation_id}, Activity ID: {activity_id}"
513
+ "Getting activity members for conversation: %s, Activity ID: %s",
514
+ conversation_id,
515
+ activity_id,
486
516
  )
487
517
  async with self.client.get(url) as response:
488
- if response.status >= 400:
518
+ if response.status >= 300:
489
519
  logger.error(
490
- f"Error getting activity members: {response.status}",
520
+ "Error getting activity members: %s",
521
+ response.status,
491
522
  stack_info=True,
492
523
  )
493
524
  response.raise_for_status()
@@ -526,12 +557,16 @@ class ConversationsOperations(ConversationsBase):
526
557
  url = f"v3/conversations/{conversation_id}/pagedmembers"
527
558
 
528
559
  logger.info(
529
- f"Getting paged members for conversation: {conversation_id}, Page Size: {page_size}, Continuation Token: {continuation_token}"
560
+ "Getting paged members for conversation: %s, Page Size: %s, Continuation Token: %s",
561
+ conversation_id,
562
+ page_size,
563
+ continuation_token,
530
564
  )
531
565
  async with self.client.get(url, params=params) as response:
532
- if response.status >= 400:
566
+ if response.status >= 300:
533
567
  logger.error(
534
- f"Error getting conversation paged members: {response.status}",
568
+ "Error getting conversation paged members: %s",
569
+ response.status,
535
570
  stack_info=True,
536
571
  )
537
572
  response.raise_for_status()
@@ -559,15 +594,12 @@ class ConversationsOperations(ConversationsBase):
559
594
  conversation_id = self._normalize_conversation_id(conversation_id)
560
595
  url = f"v3/conversations/{conversation_id}/activities/history"
561
596
 
562
- logger.info(f"Sending conversation history to conversation: {conversation_id}")
597
+ logger.info("Sending conversation history to conversation: %s", conversation_id)
563
598
  async with self.client.post(url, json=body) as response:
564
- if (
565
- response.status >= 400
566
- and response.status != 201
567
- and response.status != 202
568
- ):
599
+ if response.status >= 300:
569
600
  logger.error(
570
- f"Error sending conversation history: {response.status}",
601
+ "Error sending conversation history: %s",
602
+ response.status,
571
603
  stack_info=True,
572
604
  )
573
605
  response.raise_for_status()
@@ -602,7 +634,9 @@ class ConnectorClient(ConnectorClientBase):
602
634
  headers=headers,
603
635
  )
604
636
  logger.debug(
605
- f"ConnectorClient initialized with endpoint: {endpoint} and headers: {headers}"
637
+ "ConnectorClient initialized with endpoint: %s and headers: %s",
638
+ endpoint,
639
+ headers,
606
640
  )
607
641
 
608
642
  if len(token) > 1:
@@ -53,13 +53,14 @@ class AgentSignIn(AgentSignInBase):
53
53
  params["finalRedirect"] = final_redirect
54
54
 
55
55
  logger.info(
56
- f"AgentSignIn.get_sign_in_url(): Getting sign-in URL with params: {params}"
56
+ "AgentSignIn.get_sign_in_url(): Getting sign-in URL with params: %s",
57
+ params,
57
58
  )
58
59
  async with self.client.get(
59
60
  "api/agentsignin/getSignInUrl", params=params
60
61
  ) as response:
61
- if response.status >= 400:
62
- logger.error(f"Error getting sign-in URL: {response.status}")
62
+ if response.status >= 300:
63
+ logger.error("Error getting sign-in URL: %s", response.status)
63
64
  response.raise_for_status()
64
65
 
65
66
  return await response.text()
@@ -89,13 +90,14 @@ class AgentSignIn(AgentSignInBase):
89
90
  params["finalRedirect"] = final_redirect
90
91
 
91
92
  logger.info(
92
- f"AgentSignIn.get_sign_in_resource(): Getting sign-in resource with params: {params}"
93
+ "AgentSignIn.get_sign_in_resource(): Getting sign-in resource with params: %s",
94
+ params,
93
95
  )
94
96
  async with self.client.get(
95
97
  "api/botsignin/getSignInResource", params=params
96
98
  ) as response:
97
- if response.status >= 400:
98
- logger.error(f"Error getting sign-in resource: {response.status}")
99
+ if response.status >= 300:
100
+ logger.error("Error getting sign-in resource: %s", response.status)
99
101
  response.raise_for_status()
100
102
 
101
103
  data = await response.json()
@@ -122,12 +124,10 @@ class UserToken(UserTokenBase):
122
124
  if code:
123
125
  params["code"] = code
124
126
 
125
- logger.info(f"User_token.get_token(): Getting token with params: {params}")
127
+ logger.info("User_token.get_token(): Getting token with params: %s", params)
126
128
  async with self.client.get("api/usertoken/GetToken", params=params) as response:
127
- if response.status == 404:
128
- return TokenResponse(model_validate={})
129
- if response.status >= 400:
130
- logger.error(f"Error getting token: {response.status}")
129
+ if response.status >= 300:
130
+ logger.error("Error getting token: %s", response.status)
131
131
  response.raise_for_status()
132
132
 
133
133
  data = await response.json()
@@ -179,12 +179,12 @@ class UserToken(UserTokenBase):
179
179
  if channel_id:
180
180
  params["channelId"] = channel_id
181
181
 
182
- logger.info(f"Getting AAD tokens with params: {params} and body: {body}")
182
+ logger.info("Getting AAD tokens with params: %s and body: %s", params, body)
183
183
  async with self.client.post(
184
184
  "api/usertoken/GetAadTokens", params=params, json=body
185
185
  ) as response:
186
- if response.status >= 400:
187
- logger.error(f"Error getting AAD tokens: {response.status}")
186
+ if response.status >= 300:
187
+ logger.error("Error getting AAD tokens: %s", response.status)
188
188
  response.raise_for_status()
189
189
 
190
190
  data = await response.json()
@@ -203,12 +203,12 @@ class UserToken(UserTokenBase):
203
203
  if channel_id:
204
204
  params["channelId"] = channel_id
205
205
 
206
- logger.info(f"Signing out user {user_id} with params: {params}")
206
+ logger.info("Signing out user %s with params: %s", user_id, params)
207
207
  async with self.client.delete(
208
208
  "api/usertoken/SignOut", params=params
209
209
  ) as response:
210
- if response.status >= 400 and response.status != 204:
211
- logger.error(f"Error signing out: {response.status}")
210
+ if response.status >= 300:
211
+ logger.error("Error signing out: %s", response.status)
212
212
  response.raise_for_status()
213
213
 
214
214
  async def get_token_status(
@@ -224,12 +224,12 @@ class UserToken(UserTokenBase):
224
224
  if include:
225
225
  params["include"] = include
226
226
 
227
- logger.info(f"Getting token status for user {user_id} with params: {params}")
227
+ logger.info("Getting token status for user %s with params: %s", user_id, params)
228
228
  async with self.client.get(
229
229
  "api/usertoken/GetTokenStatus", params=params
230
230
  ) as response:
231
- if response.status >= 400:
232
- logger.error(f"Error getting token status: {response.status}")
231
+ if response.status >= 300:
232
+ logger.error("Error getting token status: %s", response.status)
233
233
  response.raise_for_status()
234
234
 
235
235
  data = await response.json()
@@ -248,12 +248,12 @@ class UserToken(UserTokenBase):
248
248
  "channelId": channel_id,
249
249
  }
250
250
 
251
- logger.info(f"Exchanging token with params: {params} and body: {body}")
251
+ logger.info("Exchanging token with params: %s and body: %s", params, body)
252
252
  async with self.client.post(
253
253
  "api/usertoken/exchange", params=params, json=body
254
254
  ) as response:
255
- if response.status >= 400 and response.status != 404:
256
- logger.error(f"Error exchanging token: {response.status}")
255
+ if response.status >= 300:
256
+ logger.error("Error exchanging token: %s", response.status)
257
257
  response.raise_for_status()
258
258
 
259
259
  data = await response.json()
@@ -289,7 +289,9 @@ class UserTokenClient(UserTokenClientBase):
289
289
  headers=headers,
290
290
  )
291
291
  logger.debug(
292
- f"Creating UserTokenClient with endpoint: {endpoint} and headers: {headers}"
292
+ "Creating UserTokenClient with endpoint: %s and headers: %s",
293
+ endpoint,
294
+ headers,
293
295
  )
294
296
 
295
297
  if len(token) > 1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-core
3
- Version: 0.6.0.dev1
3
+ Version: 0.6.0.dev4
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==0.6.0.dev1
18
+ Requires-Dist: microsoft-agents-activity==0.6.0.dev4
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
@@ -1,4 +1,4 @@
1
- microsoft-agents-activity==0.6.0.dev1
1
+ microsoft-agents-activity==0.6.0.dev4
2
2
  pyjwt>=2.10.1
3
3
  isodate>=0.6.1
4
4
  azure-core>=1.30.0