microsoft-agents-copilotstudio-client 0.7.0__tar.gz → 0.7.0.dev0__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 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/PKG-INFO +3 -21
  2. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/__init__.py +0 -3
  3. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/agent_type.py +0 -3
  4. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/connection_settings.py +3 -19
  5. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/copilot_client.py +1 -36
  6. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/direct_to_engine_connection_settings_protocol.py +0 -3
  7. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/execute_turn_request.py +0 -3
  8. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/power_platform_cloud.py +0 -3
  9. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/power_platform_environment.py +0 -3
  10. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents_copilotstudio_client.egg-info/PKG-INFO +3 -21
  11. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents_copilotstudio_client.egg-info/SOURCES.txt +0 -2
  12. microsoft_agents_copilotstudio_client-0.7.0.dev0/microsoft_agents_copilotstudio_client.egg-info/requires.txt +1 -0
  13. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/readme.md +1 -19
  14. microsoft_agents_copilotstudio_client-0.7.0.dev0/setup.py +11 -0
  15. microsoft_agents_copilotstudio_client-0.7.0/MANIFEST.in +0 -1
  16. microsoft_agents_copilotstudio_client-0.7.0/VERSION.txt +0 -1
  17. microsoft_agents_copilotstudio_client-0.7.0/microsoft_agents_copilotstudio_client.egg-info/requires.txt +0 -1
  18. microsoft_agents_copilotstudio_client-0.7.0/setup.py +0 -17
  19. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/LICENSE +0 -0
  20. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/errors/__init__.py +0 -0
  21. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents/copilotstudio/client/errors/error_resources.py +0 -0
  22. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents_copilotstudio_client.egg-info/dependency_links.txt +0 -0
  23. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/microsoft_agents_copilotstudio_client.egg-info/top_level.txt +0 -0
  24. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/pyproject.toml +0 -0
  25. {microsoft_agents_copilotstudio_client-0.7.0 → microsoft_agents_copilotstudio_client-0.7.0.dev0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-copilotstudio-client
3
- Version: 0.7.0
3
+ Version: 0.7.0.dev0
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
18
+ Requires-Dist: microsoft-agents-hosting-core==0.7.0.dev0
19
19
  Dynamic: license-file
20
20
  Dynamic: requires-dist
21
21
 
@@ -37,29 +37,11 @@ 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>
58
40
  <tr>
59
41
  <td>0.5.0</td>
60
42
  <td>2025-10-22</td>
61
43
  <td>
62
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
44
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
63
45
  0.5.0 Release Notes
64
46
  </a>
65
47
  </td>
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from .agent_type import AgentType
5
2
  from .connection_settings import ConnectionSettings
6
3
  from .copilot_client import CopilotClient
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from enum import Enum
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from typing import Optional
5
2
  from .direct_to_engine_connection_settings_protocol import (
6
3
  DirectToEngineConnectionSettingsProtocol,
@@ -18,22 +15,10 @@ class ConnectionSettings(DirectToEngineConnectionSettingsProtocol):
18
15
  self,
19
16
  environment_id: str,
20
17
  agent_identifier: 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,
18
+ cloud: Optional[PowerPlatformCloud],
19
+ copilot_agent_type: Optional[AgentType],
20
+ custom_power_platform_cloud: Optional[str],
25
21
  ) -> 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
-
37
22
  self.environment_id = environment_id
38
23
  self.agent_identifier = agent_identifier
39
24
 
@@ -45,4 +30,3 @@ class ConnectionSettings(DirectToEngineConnectionSettingsProtocol):
45
30
  self.cloud = cloud or PowerPlatformCloud.PROD
46
31
  self.copilot_agent_type = copilot_agent_type or AgentType.PUBLISHED
47
32
  self.custom_power_platform_cloud = custom_power_platform_cloud
48
- self.client_session_settings = client_session_settings or {}
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  import aiohttp
5
2
  from typing import AsyncIterable, Callable, Optional
6
3
 
@@ -12,8 +9,6 @@ from .power_platform_environment import PowerPlatformEnvironment
12
9
 
13
10
 
14
11
  class CopilotClient:
15
- """A client for interacting with the Copilot service."""
16
-
17
12
  EVENT_STREAM_TYPE = "text/event-stream"
18
13
  APPLICATION_JSON_TYPE = "application/json"
19
14
 
@@ -33,19 +28,8 @@ class CopilotClient:
33
28
  async def post_request(
34
29
  self, url: str, data: dict, headers: dict
35
30
  ) -> AsyncIterable[Activity]:
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:
31
+ async with aiohttp.ClientSession() as session:
47
32
  async with session.post(url, json=data, headers=headers) as response:
48
-
49
33
  if response.status != 200:
50
34
  # self.logger(f"Error sending request: {response.status}")
51
35
  raise aiohttp.ClientError(
@@ -73,12 +57,6 @@ class CopilotClient:
73
57
  async def start_conversation(
74
58
  self, emit_start_conversation_event: bool = True
75
59
  ) -> 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
-
82
60
  url = PowerPlatformEnvironment.get_copilot_studio_connection_url(
83
61
  settings=self.settings
84
62
  )
@@ -95,13 +73,6 @@ class CopilotClient:
95
73
  async def ask_question(
96
74
  self, question: str, conversation_id: Optional[str] = None
97
75
  ) -> 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
-
105
76
  activity = Activity(
106
77
  type="message",
107
78
  text=question,
@@ -116,12 +87,6 @@ class CopilotClient:
116
87
  async def ask_question_with_activity(
117
88
  self, activity: Activity
118
89
  ) -> 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
-
125
90
  if not activity:
126
91
  raise ValueError(
127
92
  "CopilotClient.ask_question_with_activity: Activity cannot be None"
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from typing import Protocol, Optional
5
2
 
6
3
  from .agent_type import AgentType
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from microsoft_agents.activity import AgentsModel, Activity
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from enum import Enum
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
1
  from microsoft_agents.copilotstudio.client.errors import copilot_studio_errors
5
2
  from urllib.parse import urlparse, urlunparse
6
3
  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
3
+ Version: 0.7.0.dev0
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
18
+ Requires-Dist: microsoft-agents-hosting-core==0.7.0.dev0
19
19
  Dynamic: license-file
20
20
  Dynamic: requires-dist
21
21
 
@@ -37,29 +37,11 @@ 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>
58
40
  <tr>
59
41
  <td>0.5.0</td>
60
42
  <td>2025-10-22</td>
61
43
  <td>
62
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
44
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
63
45
  0.5.0 Release Notes
64
46
  </a>
65
47
  </td>
@@ -16,29 +16,11 @@ 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>
37
19
  <tr>
38
20
  <td>0.5.0</td>
39
21
  <td>2025-10-22</td>
40
22
  <td>
41
- <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md#microsoft-365-agents-sdk-for-python---release-notes-v050">
23
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
42
24
  0.5.0 Release Notes
43
25
  </a>
44
26
  </td>
@@ -0,0 +1,11 @@
1
+ from os import environ
2
+ from setuptools import setup
3
+
4
+ package_version = environ.get("PackageVersion", "0.0.0")
5
+
6
+ setup(
7
+ version=package_version,
8
+ install_requires=[
9
+ f"microsoft-agents-hosting-core=={package_version}",
10
+ ],
11
+ )
@@ -1 +0,0 @@
1
- include VERSION.txt
@@ -1,17 +0,0 @@
1
- from os import environ, path
2
- from setuptools import setup
3
-
4
- # Try to read from VERSION.txt file first, fall back to environment variable
5
- version_file = path.join(path.dirname(__file__), "VERSION.txt")
6
- if path.exists(version_file):
7
- with open(version_file, "r", encoding="utf-8") as f:
8
- package_version = f.read().strip()
9
- else:
10
- package_version = environ.get("PackageVersion", "0.0.0")
11
-
12
- setup(
13
- version=package_version,
14
- install_requires=[
15
- f"microsoft-agents-hosting-core=={package_version}",
16
- ],
17
- )