microsoft-agents-copilotstudio-client 0.6.0.dev9__tar.gz → 0.6.0.dev11__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_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/PKG-INFO +2 -2
- microsoft_agents_copilotstudio_client-0.6.0.dev11/microsoft_agents/copilotstudio/client/errors/__init__.py +15 -0
- microsoft_agents_copilotstudio_client-0.6.0.dev11/microsoft_agents/copilotstudio/client/errors/error_resources.py +57 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/power_platform_environment.py +8 -13
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents_copilotstudio_client.egg-info/PKG-INFO +2 -2
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents_copilotstudio_client.egg-info/SOURCES.txt +2 -0
- microsoft_agents_copilotstudio_client-0.6.0.dev11/microsoft_agents_copilotstudio_client.egg-info/requires.txt +1 -0
- microsoft_agents_copilotstudio_client-0.6.0.dev9/microsoft_agents_copilotstudio_client.egg-info/requires.txt +0 -1
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/LICENSE +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/__init__.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/agent_type.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/connection_settings.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/copilot_client.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/direct_to_engine_connection_settings_protocol.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/execute_turn_request.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents/copilotstudio/client/power_platform_cloud.py +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents_copilotstudio_client.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/microsoft_agents_copilotstudio_client.egg-info/top_level.txt +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/pyproject.toml +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/readme.md +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/setup.cfg +0 -0
- {microsoft_agents_copilotstudio_client-0.6.0.dev9 → microsoft_agents_copilotstudio_client-0.6.0.dev11}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microsoft-agents-copilotstudio-client
|
|
3
|
-
Version: 0.6.0.
|
|
3
|
+
Version: 0.6.0.dev11
|
|
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.6.0.
|
|
18
|
+
Requires-Dist: microsoft-agents-hosting-core==0.6.0.dev11
|
|
19
19
|
Dynamic: license-file
|
|
20
20
|
Dynamic: requires-dist
|
|
21
21
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
# Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Error resources for Microsoft Agents Copilot Studio Client package.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from microsoft_agents.hosting.core.errors import ErrorMessage
|
|
9
|
+
|
|
10
|
+
from .error_resources import CopilotStudioErrorResources
|
|
11
|
+
|
|
12
|
+
# Singleton instance
|
|
13
|
+
copilot_studio_errors = CopilotStudioErrorResources()
|
|
14
|
+
|
|
15
|
+
__all__ = ["ErrorMessage", "CopilotStudioErrorResources", "copilot_studio_errors"]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
# Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Copilot Studio error resources for Microsoft Agents SDK.
|
|
6
|
+
|
|
7
|
+
Error codes are in the range -65000 to -65999.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from microsoft_agents.hosting.core.errors import ErrorMessage
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CopilotStudioErrorResources:
|
|
14
|
+
"""
|
|
15
|
+
Error messages for Copilot Studio operations.
|
|
16
|
+
|
|
17
|
+
Error codes are organized in the range -65000 to -65999.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
CloudBaseAddressRequired = ErrorMessage(
|
|
21
|
+
"cloud_base_address must be provided when PowerPlatformCloud is Other",
|
|
22
|
+
-65000,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
EnvironmentIdRequired = ErrorMessage(
|
|
26
|
+
"EnvironmentId must be provided",
|
|
27
|
+
-65001,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
AgentIdentifierRequired = ErrorMessage(
|
|
31
|
+
"AgentIdentifier must be provided",
|
|
32
|
+
-65002,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
CustomCloudOrBaseAddressRequired = ErrorMessage(
|
|
36
|
+
"Either CustomPowerPlatformCloud or cloud_base_address must be provided when PowerPlatformCloud is Other",
|
|
37
|
+
-65003,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
InvalidConnectionSettingsType = ErrorMessage(
|
|
41
|
+
"connection_settings must be of type DirectToEngineConnectionSettings",
|
|
42
|
+
-65004,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
PowerPlatformEnvironmentRequired = ErrorMessage(
|
|
46
|
+
"PowerPlatformEnvironment must be provided",
|
|
47
|
+
-65005,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
AccessTokenProviderRequired = ErrorMessage(
|
|
51
|
+
"AccessTokenProvider must be provided",
|
|
52
|
+
-65006,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def __init__(self):
|
|
56
|
+
"""Initialize CopilotStudioErrorResources."""
|
|
57
|
+
pass
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from microsoft_agents.copilotstudio.client.errors import copilot_studio_errors
|
|
1
2
|
from urllib.parse import urlparse, urlunparse
|
|
2
3
|
from typing import Optional
|
|
3
4
|
from .connection_settings import ConnectionSettings
|
|
@@ -22,13 +23,11 @@ class PowerPlatformEnvironment:
|
|
|
22
23
|
cloud_base_address: Optional[str] = None,
|
|
23
24
|
) -> str:
|
|
24
25
|
if cloud == PowerPlatformCloud.OTHER and not cloud_base_address:
|
|
25
|
-
raise ValueError(
|
|
26
|
-
"cloud_base_address must be provided when PowerPlatformCloud is Other"
|
|
27
|
-
)
|
|
26
|
+
raise ValueError(str(copilot_studio_errors.CloudBaseAddressRequired))
|
|
28
27
|
if not settings.environment_id:
|
|
29
|
-
raise ValueError(
|
|
28
|
+
raise ValueError(str(copilot_studio_errors.EnvironmentIdRequired))
|
|
30
29
|
if not settings.agent_identifier:
|
|
31
|
-
raise ValueError(
|
|
30
|
+
raise ValueError(str(copilot_studio_errors.AgentIdentifierRequired))
|
|
32
31
|
if settings.cloud and settings.cloud != PowerPlatformCloud.UNKNOWN:
|
|
33
32
|
cloud = settings.cloud
|
|
34
33
|
if cloud == PowerPlatformCloud.OTHER:
|
|
@@ -40,7 +39,7 @@ class PowerPlatformEnvironment:
|
|
|
40
39
|
cloud_base_address = settings.custom_power_platform_cloud
|
|
41
40
|
else:
|
|
42
41
|
raise ValueError(
|
|
43
|
-
|
|
42
|
+
str(copilot_studio_errors.CustomCloudOrBaseAddressRequired)
|
|
44
43
|
)
|
|
45
44
|
if settings.copilot_agent_type:
|
|
46
45
|
agent_type = settings.copilot_agent_type
|
|
@@ -60,9 +59,7 @@ class PowerPlatformEnvironment:
|
|
|
60
59
|
cloud_base_address: Optional[str] = None,
|
|
61
60
|
) -> str:
|
|
62
61
|
if cloud == PowerPlatformCloud.OTHER and not cloud_base_address:
|
|
63
|
-
raise ValueError(
|
|
64
|
-
"cloud_base_address must be provided when PowerPlatformCloud is Other"
|
|
65
|
-
)
|
|
62
|
+
raise ValueError(str(copilot_studio_errors.CloudBaseAddressRequired))
|
|
66
63
|
if not settings and cloud == PowerPlatformCloud.UNKNOWN:
|
|
67
64
|
raise ValueError("Either settings or cloud must be provided")
|
|
68
65
|
if settings and settings.cloud and settings.cloud != PowerPlatformCloud.UNKNOWN:
|
|
@@ -79,7 +76,7 @@ class PowerPlatformEnvironment:
|
|
|
79
76
|
cloud_base_address = settings.custom_power_platform_cloud
|
|
80
77
|
else:
|
|
81
78
|
raise ValueError(
|
|
82
|
-
|
|
79
|
+
str(copilot_studio_errors.CustomCloudOrBaseAddressRequired)
|
|
83
80
|
)
|
|
84
81
|
|
|
85
82
|
cloud_base_address = cloud_base_address or "api.unknown.powerplatform.com"
|
|
@@ -116,9 +113,7 @@ class PowerPlatformEnvironment:
|
|
|
116
113
|
cloud_base_address: Optional[str] = None,
|
|
117
114
|
) -> str:
|
|
118
115
|
if cloud == PowerPlatformCloud.OTHER and not cloud_base_address:
|
|
119
|
-
raise ValueError(
|
|
120
|
-
"cloud_base_address must be provided when PowerPlatformCloud is Other"
|
|
121
|
-
)
|
|
116
|
+
raise ValueError(str(copilot_studio_errors.CloudBaseAddressRequired))
|
|
122
117
|
cloud_base_address = cloud_base_address or "api.unknown.powerplatform.com"
|
|
123
118
|
normalized_resource_id = environment_id.lower().replace("-", "")
|
|
124
119
|
id_suffix_length = PowerPlatformEnvironment.get_id_suffix_length(cloud)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microsoft-agents-copilotstudio-client
|
|
3
|
-
Version: 0.6.0.
|
|
3
|
+
Version: 0.6.0.dev11
|
|
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.6.0.
|
|
18
|
+
Requires-Dist: microsoft-agents-hosting-core==0.6.0.dev11
|
|
19
19
|
Dynamic: license-file
|
|
20
20
|
Dynamic: requires-dist
|
|
21
21
|
|
|
@@ -10,6 +10,8 @@ microsoft_agents/copilotstudio/client/direct_to_engine_connection_settings_proto
|
|
|
10
10
|
microsoft_agents/copilotstudio/client/execute_turn_request.py
|
|
11
11
|
microsoft_agents/copilotstudio/client/power_platform_cloud.py
|
|
12
12
|
microsoft_agents/copilotstudio/client/power_platform_environment.py
|
|
13
|
+
microsoft_agents/copilotstudio/client/errors/__init__.py
|
|
14
|
+
microsoft_agents/copilotstudio/client/errors/error_resources.py
|
|
13
15
|
microsoft_agents_copilotstudio_client.egg-info/PKG-INFO
|
|
14
16
|
microsoft_agents_copilotstudio_client.egg-info/SOURCES.txt
|
|
15
17
|
microsoft_agents_copilotstudio_client.egg-info/dependency_links.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
microsoft-agents-hosting-core==0.6.0.dev11
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
microsoft-agents-hosting-core==0.6.0.dev9
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|