microsoft-agents-copilotstudio-client 0.7.0.dev6__tar.gz → 0.7.0.dev10__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 (25) hide show
  1. {microsoft_agents_copilotstudio_client-0.7.0.dev6/microsoft_agents_copilotstudio_client.egg-info → microsoft_agents_copilotstudio_client-0.7.0.dev10}/PKG-INFO +21 -3
  2. microsoft_agents_copilotstudio_client-0.7.0.dev10/VERSION.txt +1 -0
  3. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/__init__.py +3 -0
  4. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/agent_type.py +3 -0
  5. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/connection_settings.py +19 -3
  6. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/copilot_client.py +36 -1
  7. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/direct_to_engine_connection_settings_protocol.py +3 -0
  8. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/execute_turn_request.py +3 -0
  9. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/power_platform_cloud.py +3 -0
  10. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/power_platform_environment.py +3 -0
  11. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10/microsoft_agents_copilotstudio_client.egg-info}/PKG-INFO +21 -3
  12. microsoft_agents_copilotstudio_client-0.7.0.dev10/microsoft_agents_copilotstudio_client.egg-info/requires.txt +1 -0
  13. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/readme.md +19 -1
  14. microsoft_agents_copilotstudio_client-0.7.0.dev6/VERSION.txt +0 -1
  15. microsoft_agents_copilotstudio_client-0.7.0.dev6/microsoft_agents_copilotstudio_client.egg-info/requires.txt +0 -1
  16. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/LICENSE +0 -0
  17. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/MANIFEST.in +0 -0
  18. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/errors/__init__.py +0 -0
  19. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents/copilotstudio/client/errors/error_resources.py +0 -0
  20. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents_copilotstudio_client.egg-info/SOURCES.txt +0 -0
  21. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents_copilotstudio_client.egg-info/dependency_links.txt +0 -0
  22. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/microsoft_agents_copilotstudio_client.egg-info/top_level.txt +0 -0
  23. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/pyproject.toml +0 -0
  24. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/setup.cfg +0 -0
  25. {microsoft_agents_copilotstudio_client-0.7.0.dev6 → microsoft_agents_copilotstudio_client-0.7.0.dev10}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-copilotstudio-client
3
- Version: 0.7.0.dev6
3
+ Version: 0.7.0.dev10
4
4
  Summary: A client 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-hosting-core==0.7.0.dev6
18
+ Requires-Dist: microsoft-agents-hosting-core==0.7.0.dev10
19
19
  Dynamic: license-file
20
20
  Dynamic: requires-dist
21
21
 
@@ -37,11 +37,29 @@ This library is part of the **Microsoft 365 Agents SDK for Python** - a comprehe
37
37
  <th style="width:20%">Date</th>
38
38
  <th style="width:60%">Release Notes</th>
39
39
  </tr>
40
+ <tr>
41
+ <td>0.6.1</td>
42
+ <td>2025-12-01</td>
43
+ <td>
44
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v061">
45
+ 0.6.1 Release Notes
46
+ </a>
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td>0.6.0</td>
51
+ <td>2025-11-18</td>
52
+ <td>
53
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v060">
54
+ 0.6.0 Release Notes
55
+ </a>
56
+ </td>
57
+ </tr>
40
58
  <tr>
41
59
  <td>0.5.0</td>
42
60
  <td>2025-10-22</td>
43
61
  <td>
44
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
62
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
45
63
  0.5.0 Release Notes
46
64
  </a>
47
65
  </td>
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from .agent_type import AgentType
2
5
  from .connection_settings import ConnectionSettings
3
6
  from .copilot_client import CopilotClient
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from enum import Enum
2
5
 
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from typing import Optional
2
5
  from .direct_to_engine_connection_settings_protocol import (
3
6
  DirectToEngineConnectionSettingsProtocol,
@@ -15,10 +18,22 @@ class ConnectionSettings(DirectToEngineConnectionSettingsProtocol):
15
18
  self,
16
19
  environment_id: str,
17
20
  agent_identifier: str,
18
- cloud: Optional[PowerPlatformCloud],
19
- copilot_agent_type: Optional[AgentType],
20
- custom_power_platform_cloud: Optional[str],
21
+ cloud: Optional[PowerPlatformCloud] = None,
22
+ copilot_agent_type: Optional[AgentType] = None,
23
+ custom_power_platform_cloud: Optional[str] = None,
24
+ client_session_settings: Optional[dict] = None,
21
25
  ) -> None:
26
+ """Initialize connection settings.
27
+
28
+ :param environment_id: The ID of the environment to connect to.
29
+ :param agent_identifier: The identifier of the agent to use for the connection.
30
+ :param cloud: The PowerPlatformCloud to use for the connection.
31
+ :param copilot_agent_type: The AgentType to use for the Copilot.
32
+ :param custom_power_platform_cloud: The custom PowerPlatformCloud URL.
33
+ :param client_session_settings: Additional arguments for initialization
34
+ of the underlying Aiohttp ClientSession.
35
+ """
36
+
22
37
  self.environment_id = environment_id
23
38
  self.agent_identifier = agent_identifier
24
39
 
@@ -30,3 +45,4 @@ class ConnectionSettings(DirectToEngineConnectionSettingsProtocol):
30
45
  self.cloud = cloud or PowerPlatformCloud.PROD
31
46
  self.copilot_agent_type = copilot_agent_type or AgentType.PUBLISHED
32
47
  self.custom_power_platform_cloud = custom_power_platform_cloud
48
+ self.client_session_settings = client_session_settings or {}
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  import aiohttp
2
5
  from typing import AsyncIterable, Callable, Optional
3
6
 
@@ -9,6 +12,8 @@ from .power_platform_environment import PowerPlatformEnvironment
9
12
 
10
13
 
11
14
  class CopilotClient:
15
+ """A client for interacting with the Copilot service."""
16
+
12
17
  EVENT_STREAM_TYPE = "text/event-stream"
13
18
  APPLICATION_JSON_TYPE = "application/json"
14
19
 
@@ -28,8 +33,19 @@ class CopilotClient:
28
33
  async def post_request(
29
34
  self, url: str, data: dict, headers: dict
30
35
  ) -> AsyncIterable[Activity]:
31
- async with aiohttp.ClientSession() as session:
36
+ """Send a POST request to the specified URL with the given data and headers.
37
+
38
+ :param url: The URL to which the POST request is sent.
39
+ :param data: The data to be sent in the POST request body.
40
+ :param headers: The headers to be included in the POST request.
41
+ :return: An asynchronous iterable of Activity objects received in the response.
42
+ """
43
+
44
+ async with aiohttp.ClientSession(
45
+ **self.settings.client_session_settings
46
+ ) as session:
32
47
  async with session.post(url, json=data, headers=headers) as response:
48
+
33
49
  if response.status != 200:
34
50
  # self.logger(f"Error sending request: {response.status}")
35
51
  raise aiohttp.ClientError(
@@ -57,6 +73,12 @@ class CopilotClient:
57
73
  async def start_conversation(
58
74
  self, emit_start_conversation_event: bool = True
59
75
  ) -> AsyncIterable[Activity]:
76
+ """Start a new conversation and optionally emit a start conversation event.
77
+
78
+ :param emit_start_conversation_event: A boolean flag indicating whether to emit a start conversation event.
79
+ :return: An asynchronous iterable of Activity objects received in the response.
80
+ """
81
+
60
82
  url = PowerPlatformEnvironment.get_copilot_studio_connection_url(
61
83
  settings=self.settings
62
84
  )
@@ -73,6 +95,13 @@ class CopilotClient:
73
95
  async def ask_question(
74
96
  self, question: str, conversation_id: Optional[str] = None
75
97
  ) -> AsyncIterable[Activity]:
98
+ """Ask a question in the specified conversation.
99
+
100
+ :param question: The question to be asked.
101
+ :param conversation_id: The ID of the conversation in which the question is asked. If not provided, the current conversation ID is used.
102
+ :return: An asynchronous iterable of Activity objects received in the response.
103
+ """
104
+
76
105
  activity = Activity(
77
106
  type="message",
78
107
  text=question,
@@ -87,6 +116,12 @@ class CopilotClient:
87
116
  async def ask_question_with_activity(
88
117
  self, activity: Activity
89
118
  ) -> AsyncIterable[Activity]:
119
+ """Ask a question using an Activity object.
120
+
121
+ :param activity: The Activity object representing the question to be asked.
122
+ :return: An asynchronous iterable of Activity objects received in the response.
123
+ """
124
+
90
125
  if not activity:
91
126
  raise ValueError(
92
127
  "CopilotClient.ask_question_with_activity: Activity cannot be None"
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from typing import Protocol, Optional
2
5
 
3
6
  from .agent_type import AgentType
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from microsoft_agents.activity import AgentsModel, Activity
2
5
 
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from enum import Enum
2
5
 
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
1
4
  from microsoft_agents.copilotstudio.client.errors import copilot_studio_errors
2
5
  from urllib.parse import urlparse, urlunparse
3
6
  from typing import Optional
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-copilotstudio-client
3
- Version: 0.7.0.dev6
3
+ Version: 0.7.0.dev10
4
4
  Summary: A client 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-hosting-core==0.7.0.dev6
18
+ Requires-Dist: microsoft-agents-hosting-core==0.7.0.dev10
19
19
  Dynamic: license-file
20
20
  Dynamic: requires-dist
21
21
 
@@ -37,11 +37,29 @@ This library is part of the **Microsoft 365 Agents SDK for Python** - a comprehe
37
37
  <th style="width:20%">Date</th>
38
38
  <th style="width:60%">Release Notes</th>
39
39
  </tr>
40
+ <tr>
41
+ <td>0.6.1</td>
42
+ <td>2025-12-01</td>
43
+ <td>
44
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v061">
45
+ 0.6.1 Release Notes
46
+ </a>
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td>0.6.0</td>
51
+ <td>2025-11-18</td>
52
+ <td>
53
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v060">
54
+ 0.6.0 Release Notes
55
+ </a>
56
+ </td>
57
+ </tr>
40
58
  <tr>
41
59
  <td>0.5.0</td>
42
60
  <td>2025-10-22</td>
43
61
  <td>
44
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
62
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
45
63
  0.5.0 Release Notes
46
64
  </a>
47
65
  </td>
@@ -16,11 +16,29 @@ This library is part of the **Microsoft 365 Agents SDK for Python** - a comprehe
16
16
  <th style="width:20%">Date</th>
17
17
  <th style="width:60%">Release Notes</th>
18
18
  </tr>
19
+ <tr>
20
+ <td>0.6.1</td>
21
+ <td>2025-12-01</td>
22
+ <td>
23
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v061">
24
+ 0.6.1 Release Notes
25
+ </a>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td>0.6.0</td>
30
+ <td>2025-11-18</td>
31
+ <td>
32
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v060">
33
+ 0.6.0 Release Notes
34
+ </a>
35
+ </td>
36
+ </tr>
19
37
  <tr>
20
38
  <td>0.5.0</td>
21
39
  <td>2025-10-22</td>
22
40
  <td>
23
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
41
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
24
42
  0.5.0 Release Notes
25
43
  </a>
26
44
  </td>
@@ -1 +0,0 @@
1
- 0.7.0.dev6
@@ -1 +0,0 @@
1
- microsoft-agents-hosting-core==0.7.0.dev6