microsoft-agents-a365-runtime 0.1.0__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_a365_runtime-0.1.0/PKG-INFO +66 -0
- microsoft_agents_a365_runtime-0.1.0/README.md +33 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/__init__.py +14 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/environment_utils.py +56 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/power_platform_api_discovery.py +89 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/utility.py +82 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/version_utils.py +34 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/PKG-INFO +66 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/SOURCES.txt +13 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/dependency_links.txt +1 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/requires.txt +12 -0
- microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/top_level.txt +1 -0
- microsoft_agents_a365_runtime-0.1.0/pyproject.toml +72 -0
- microsoft_agents_a365_runtime-0.1.0/setup.cfg +4 -0
- microsoft_agents_a365_runtime-0.1.0/setup.py +28 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: microsoft-agents-a365-runtime
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Telemetry, tracing, and monitoring components for AI agents
|
|
5
|
+
Author-email: Microsoft <support@microsoft.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/microsoft/Agent365-python
|
|
8
|
+
Project-URL: Repository, https://github.com/microsoft/Agent365-python
|
|
9
|
+
Project-URL: Issues, https://github.com/microsoft/Agent365-python/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-runtime
|
|
11
|
+
Keywords: observability,telemetry,tracing,opentelemetry,monitoring,ai,agents
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: System :: Monitoring
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
30
|
+
Provides-Extra: test
|
|
31
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
|
|
33
|
+
|
|
34
|
+
# microsoft-agents-a365-runtime
|
|
35
|
+
|
|
36
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
37
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
38
|
+
|
|
39
|
+
Core runtime utilities and environment management for AI agent applications. This package provides essential Power Platform API discovery, environment configuration, and authentication scope resolution.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install microsoft-agents-a365-runtime
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
For usage examples and detailed documentation, see the [Microsoft Agent 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/?tabs=python) on Microsoft Learn.
|
|
50
|
+
|
|
51
|
+
## Support
|
|
52
|
+
|
|
53
|
+
For issues, questions, or feedback:
|
|
54
|
+
|
|
55
|
+
- File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
|
|
56
|
+
- See the [main documentation](../../../README.md) for more information
|
|
57
|
+
|
|
58
|
+
## Trademarks
|
|
59
|
+
|
|
60
|
+
*Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
65
|
+
|
|
66
|
+
Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# microsoft-agents-a365-runtime
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
4
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
5
|
+
|
|
6
|
+
Core runtime utilities and environment management for AI agent applications. This package provides essential Power Platform API discovery, environment configuration, and authentication scope resolution.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install microsoft-agents-a365-runtime
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
For usage examples and detailed documentation, see the [Microsoft Agent 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/?tabs=python) on Microsoft Learn.
|
|
17
|
+
|
|
18
|
+
## Support
|
|
19
|
+
|
|
20
|
+
For issues, questions, or feedback:
|
|
21
|
+
|
|
22
|
+
- File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
|
|
23
|
+
- See the [main documentation](../../../README.md) for more information
|
|
24
|
+
|
|
25
|
+
## Trademarks
|
|
26
|
+
|
|
27
|
+
*Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
32
|
+
|
|
33
|
+
Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
from .environment_utils import get_observability_authentication_scope
|
|
4
|
+
from .power_platform_api_discovery import ClusterCategory, PowerPlatformApiDiscovery
|
|
5
|
+
from .utility import Utility
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"get_observability_authentication_scope",
|
|
9
|
+
"PowerPlatformApiDiscovery",
|
|
10
|
+
"ClusterCategory",
|
|
11
|
+
"Utility",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Utility logic for environment-related operations.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
# Authentication scopes for different environments
|
|
10
|
+
PROD_OBSERVABILITY_SCOPE = "https://api.powerplatform.com/.default"
|
|
11
|
+
|
|
12
|
+
# Cluster categories for different environments
|
|
13
|
+
PROD_OBSERVABILITY_CLUSTER_CATEGORY = "prod"
|
|
14
|
+
|
|
15
|
+
# Default environment names
|
|
16
|
+
PRODUCTION_ENVIRONMENT_NAME = "production"
|
|
17
|
+
DEVELOPMENT_ENVIRONMENT_NAME = "Development"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_observability_authentication_scope() -> list[str]:
|
|
21
|
+
"""
|
|
22
|
+
Returns the scope for authenticating to the observability service based on the current environment.
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
list[str]: The authentication scope for the current environment.
|
|
26
|
+
"""
|
|
27
|
+
return [PROD_OBSERVABILITY_SCOPE]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def is_development_environment() -> bool:
|
|
31
|
+
"""
|
|
32
|
+
Returns True if the current environment is a development environment.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
bool: True if the current environment is development, False otherwise.
|
|
36
|
+
"""
|
|
37
|
+
environment = _get_current_environment()
|
|
38
|
+
return environment.lower() == DEVELOPMENT_ENVIRONMENT_NAME.lower()
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _get_current_environment() -> str:
|
|
42
|
+
"""
|
|
43
|
+
Gets the current environment name.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
str: The current environment name.
|
|
47
|
+
"""
|
|
48
|
+
# Check environment variables in order of precedence
|
|
49
|
+
|
|
50
|
+
# Check Python-specific environment variables
|
|
51
|
+
environment = os.getenv("PYTHON_ENVIRONMENT")
|
|
52
|
+
if environment:
|
|
53
|
+
return environment
|
|
54
|
+
|
|
55
|
+
# Default to Production
|
|
56
|
+
return PRODUCTION_ENVIRONMENT_NAME
|
microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365/runtime/power_platform_api_discovery.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
ClusterCategory = Literal[
|
|
7
|
+
"local",
|
|
8
|
+
"dev",
|
|
9
|
+
"test",
|
|
10
|
+
"preprod",
|
|
11
|
+
"firstrelease",
|
|
12
|
+
"prod",
|
|
13
|
+
"gov",
|
|
14
|
+
"high",
|
|
15
|
+
"dod",
|
|
16
|
+
"mooncake",
|
|
17
|
+
"ex",
|
|
18
|
+
"rx",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PowerPlatformApiDiscovery:
|
|
23
|
+
"""Discovery helper for Power Platform API endpoints."""
|
|
24
|
+
|
|
25
|
+
def __init__(self, cluster_category: ClusterCategory) -> None:
|
|
26
|
+
self.cluster_category = cluster_category
|
|
27
|
+
|
|
28
|
+
def get_token_audience(self) -> str:
|
|
29
|
+
return f"https://{self._get_environment_api_host_name_suffix()}"
|
|
30
|
+
|
|
31
|
+
def get_token_endpoint_host(self) -> str:
|
|
32
|
+
return self._get_environment_api_host_name_suffix()
|
|
33
|
+
|
|
34
|
+
def get_tenant_endpoint(self, tenant_id: str) -> str:
|
|
35
|
+
return self._generate_power_platform_api_domain(tenant_id)
|
|
36
|
+
|
|
37
|
+
def get_tenant_island_cluster_endpoint(self, tenant_id: str) -> str:
|
|
38
|
+
return self._generate_power_platform_api_domain(tenant_id, "il-")
|
|
39
|
+
|
|
40
|
+
def _generate_power_platform_api_domain(
|
|
41
|
+
self, host_name_identifier: str, host_name_prefix: str = ""
|
|
42
|
+
) -> str:
|
|
43
|
+
# Validate allowed characters: alphanumeric and dash
|
|
44
|
+
if not re.match(r"^[a-zA-Z0-9-]+$", host_name_identifier):
|
|
45
|
+
raise ValueError(
|
|
46
|
+
f"Cannot generate Power Platform API endpoint because the tenant identifier contains invalid host name characters, only alphanumeric and dash characters are expected: {host_name_identifier}"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
host_name_infix = "tenant"
|
|
50
|
+
hex_name_suffix_length = self._get_hex_api_suffix_length()
|
|
51
|
+
hex_name = host_name_identifier.lower().replace("-", "")
|
|
52
|
+
|
|
53
|
+
if hex_name_suffix_length >= len(hex_name):
|
|
54
|
+
raise ValueError(
|
|
55
|
+
f"Cannot generate Power Platform API endpoint because the normalized tenant identifier must be at least {hex_name_suffix_length + 1} "
|
|
56
|
+
f"characters in length: {hex_name}"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
hex_name_suffix = hex_name[-hex_name_suffix_length:]
|
|
60
|
+
hex_name_prefix = hex_name[: len(hex_name) - hex_name_suffix_length]
|
|
61
|
+
host_name_suffix = self._get_environment_api_host_name_suffix()
|
|
62
|
+
|
|
63
|
+
return f"{host_name_prefix}{hex_name_prefix}.{hex_name_suffix}.{host_name_infix}.{host_name_suffix}"
|
|
64
|
+
|
|
65
|
+
def _get_hex_api_suffix_length(self) -> int:
|
|
66
|
+
if self.cluster_category in ("firstrelease", "prod"):
|
|
67
|
+
return 2
|
|
68
|
+
return 1
|
|
69
|
+
|
|
70
|
+
def _get_environment_api_host_name_suffix(self) -> str:
|
|
71
|
+
cluster_to_suffix = {
|
|
72
|
+
"local": "api.powerplatform.localhost",
|
|
73
|
+
"dev": "api.powerplatform.com", # defaulting to prod
|
|
74
|
+
"test": "api.powerplatform.com", # defaulting to prod
|
|
75
|
+
"preprod": "api.powerplatform.com", # defaulting to prod
|
|
76
|
+
"firstrelease": "api.powerplatform.com",
|
|
77
|
+
"prod": "api.powerplatform.com",
|
|
78
|
+
"gov": "api.gov.powerplatform.microsoft.us",
|
|
79
|
+
"high": "api.high.powerplatform.microsoft.us",
|
|
80
|
+
"dod": "api.appsplatform.us",
|
|
81
|
+
"mooncake": "api.powerplatform.partner.microsoftonline.cn",
|
|
82
|
+
"ex": "api.powerplatform.eaglex.ic.gov",
|
|
83
|
+
"rx": "api.powerplatform.microsoft.scloud",
|
|
84
|
+
}
|
|
85
|
+
cc = self.cluster_category
|
|
86
|
+
try:
|
|
87
|
+
return cluster_to_suffix[cc]
|
|
88
|
+
except KeyError as exc:
|
|
89
|
+
raise ValueError(f"Invalid ClusterCategory value: {self.cluster_category}") from exc
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Copyright (c) Microsoft. All rights reserved.
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Utility functions for Microsoft Agent 365 runtime operations.
|
|
5
|
+
|
|
6
|
+
This module provides utility functions for token handling, agent identity resolution,
|
|
7
|
+
and other common runtime operations.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import uuid
|
|
13
|
+
from typing import Any, Optional
|
|
14
|
+
|
|
15
|
+
import jwt
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Utility:
|
|
19
|
+
"""
|
|
20
|
+
Utility class providing common runtime operations for Agent 365.
|
|
21
|
+
|
|
22
|
+
This class contains static methods for token processing, agent identity resolution,
|
|
23
|
+
and other utility functions used across the Agent 365 runtime.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@staticmethod
|
|
27
|
+
def get_app_id_from_token(token: Optional[str]) -> str:
|
|
28
|
+
"""
|
|
29
|
+
Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
token: JWT token to decode. Can be None or empty.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
str: The App ID from the token's claims, or empty GUID if token is invalid.
|
|
36
|
+
Returns "00000000-0000-0000-0000-000000000000" if no valid App ID is found.
|
|
37
|
+
"""
|
|
38
|
+
if not token or not token.strip():
|
|
39
|
+
return str(uuid.UUID(int=0))
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
# Decode the JWT token without verification (we only need the claims)
|
|
43
|
+
# Note: verify=False is used because we only need to extract claims,
|
|
44
|
+
# not verify the token's authenticity
|
|
45
|
+
decoded_payload = jwt.decode(token, options={"verify_signature": False})
|
|
46
|
+
|
|
47
|
+
# Look for appid or azp claims (appid takes precedence)
|
|
48
|
+
app_id = decoded_payload.get("appid") or decoded_payload.get("azp")
|
|
49
|
+
return app_id if app_id else ""
|
|
50
|
+
|
|
51
|
+
except (jwt.DecodeError, jwt.InvalidTokenError):
|
|
52
|
+
# Token is malformed or invalid
|
|
53
|
+
return ""
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def resolve_agent_identity(context: Any, auth_token: Optional[str]) -> str:
|
|
57
|
+
"""
|
|
58
|
+
Resolves the agent identity from the turn context or auth token.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
context: Turn context of the conversation turn. Expected to have an Activity
|
|
62
|
+
with methods like is_agentic_request() and get_agentic_instance_id().
|
|
63
|
+
auth_token: Authentication token if available.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
str: The agent identity (App ID). Returns the agentic instance ID if the
|
|
67
|
+
request is agentic, otherwise returns the App ID from the auth token.
|
|
68
|
+
"""
|
|
69
|
+
try:
|
|
70
|
+
# App ID is required to pass to MCP server URL
|
|
71
|
+
# Try to get agentic instance ID if this is an agentic request
|
|
72
|
+
if context and context.activity and context.activity.is_agentic_request():
|
|
73
|
+
agentic_id = context.activity.get_agentic_instance_id()
|
|
74
|
+
return agentic_id if agentic_id else ""
|
|
75
|
+
|
|
76
|
+
except (AttributeError, TypeError, Exception):
|
|
77
|
+
# Context/activity doesn't have the expected methods or properties
|
|
78
|
+
# or any other error occurred while accessing context/activity
|
|
79
|
+
pass
|
|
80
|
+
|
|
81
|
+
# Fallback to extracting App ID from the auth token
|
|
82
|
+
return Utility.get_app_id_from_token(auth_token)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (c) Microsoft Corporation.
|
|
2
|
+
# Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Version utilities for Microsoft Agent 365 SDK packages.
|
|
6
|
+
|
|
7
|
+
This module is deprecated. Versioning is now handled automatically by
|
|
8
|
+
setuptools-git-versioning. See versioning/TARGET-VERSION and
|
|
9
|
+
HOW_TO_SET_A_VERSION.md for details.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import os
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def build_version():
|
|
18
|
+
"""
|
|
19
|
+
DEPRECATED: This function is no longer used.
|
|
20
|
+
|
|
21
|
+
Version is now automatically calculated by setuptools-git-versioning
|
|
22
|
+
based on Git history and tags. See HOW_TO_SET_A_VERSION.md for details.
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
str: Version from AGENT365_PYTHON_SDK_PACKAGE_VERSION environment variable or "0.0.0"
|
|
26
|
+
"""
|
|
27
|
+
import warnings
|
|
28
|
+
|
|
29
|
+
warnings.warn(
|
|
30
|
+
"build_version() is deprecated. Version is now managed by setuptools-git-versioning.",
|
|
31
|
+
DeprecationWarning,
|
|
32
|
+
stacklevel=2,
|
|
33
|
+
)
|
|
34
|
+
return os.environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: microsoft-agents-a365-runtime
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Telemetry, tracing, and monitoring components for AI agents
|
|
5
|
+
Author-email: Microsoft <support@microsoft.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/microsoft/Agent365-python
|
|
8
|
+
Project-URL: Repository, https://github.com/microsoft/Agent365-python
|
|
9
|
+
Project-URL: Issues, https://github.com/microsoft/Agent365-python/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-runtime
|
|
11
|
+
Keywords: observability,telemetry,tracing,opentelemetry,monitoring,ai,agents
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: System :: Monitoring
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
30
|
+
Provides-Extra: test
|
|
31
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
|
|
33
|
+
|
|
34
|
+
# microsoft-agents-a365-runtime
|
|
35
|
+
|
|
36
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
37
|
+
[](https://pypi.org/project/microsoft-agents-a365-runtime)
|
|
38
|
+
|
|
39
|
+
Core runtime utilities and environment management for AI agent applications. This package provides essential Power Platform API discovery, environment configuration, and authentication scope resolution.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install microsoft-agents-a365-runtime
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
For usage examples and detailed documentation, see the [Microsoft Agent 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/?tabs=python) on Microsoft Learn.
|
|
50
|
+
|
|
51
|
+
## Support
|
|
52
|
+
|
|
53
|
+
For issues, questions, or feedback:
|
|
54
|
+
|
|
55
|
+
- File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-python/issues) section
|
|
56
|
+
- See the [main documentation](../../../README.md) for more information
|
|
57
|
+
|
|
58
|
+
## Trademarks
|
|
59
|
+
|
|
60
|
+
*Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
65
|
+
|
|
66
|
+
Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
microsoft_agents_a365/runtime/__init__.py
|
|
5
|
+
microsoft_agents_a365/runtime/environment_utils.py
|
|
6
|
+
microsoft_agents_a365/runtime/power_platform_api_discovery.py
|
|
7
|
+
microsoft_agents_a365/runtime/utility.py
|
|
8
|
+
microsoft_agents_a365/runtime/version_utils.py
|
|
9
|
+
microsoft_agents_a365_runtime.egg-info/PKG-INFO
|
|
10
|
+
microsoft_agents_a365_runtime.egg-info/SOURCES.txt
|
|
11
|
+
microsoft_agents_a365_runtime.egg-info/dependency_links.txt
|
|
12
|
+
microsoft_agents_a365_runtime.egg-info/requires.txt
|
|
13
|
+
microsoft_agents_a365_runtime.egg-info/top_level.txt
|
microsoft_agents_a365_runtime-0.1.0/microsoft_agents_a365_runtime.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
microsoft_agents_a365
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel", "tzdata"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "microsoft-agents-a365-runtime"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Microsoft", email = "support@microsoft.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "Telemetry, tracing, and monitoring components for AI agents"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
22
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
23
|
+
"Topic :: System :: Monitoring",
|
|
24
|
+
]
|
|
25
|
+
license = {text = "MIT"}
|
|
26
|
+
keywords = ["observability", "telemetry", "tracing", "opentelemetry", "monitoring", "ai", "agents"]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"PyJWT >= 2.8.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/microsoft/Agent365-python"
|
|
33
|
+
Repository = "https://github.com/microsoft/Agent365-python"
|
|
34
|
+
Issues = "https://github.com/microsoft/Agent365-python/issues"
|
|
35
|
+
Documentation = "https://github.com/microsoft/Agent365-python/tree/main/libraries/microsoft-agents-a365-runtime"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = [
|
|
39
|
+
"pytest >= 7.0.0",
|
|
40
|
+
"pytest-asyncio >= 0.21.0",
|
|
41
|
+
"ruff >= 0.1.0",
|
|
42
|
+
"black >= 23.0.0",
|
|
43
|
+
"mypy >= 1.0.0",
|
|
44
|
+
]
|
|
45
|
+
test = [
|
|
46
|
+
"pytest >= 7.0.0",
|
|
47
|
+
"pytest-asyncio >= 0.21.0",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["."]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools]
|
|
54
|
+
license-files = ["../../LICENSE"]
|
|
55
|
+
include-package-data = true
|
|
56
|
+
|
|
57
|
+
[tool.setuptools.package-data]
|
|
58
|
+
"*" = ["../../LICENSE"]
|
|
59
|
+
|
|
60
|
+
[tool.black]
|
|
61
|
+
line-length = 100
|
|
62
|
+
target-version = ['py311']
|
|
63
|
+
|
|
64
|
+
[tool.ruff]
|
|
65
|
+
line-length = 100
|
|
66
|
+
target-version = "py311"
|
|
67
|
+
|
|
68
|
+
[tool.mypy]
|
|
69
|
+
python_version = "3.11"
|
|
70
|
+
strict = true
|
|
71
|
+
warn_return_any = true
|
|
72
|
+
warn_unused_configs = true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright (c) Microsoft Corporation.
|
|
2
|
+
# Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from os import environ
|
|
7
|
+
from setuptools import setup
|
|
8
|
+
|
|
9
|
+
# Get version from environment variable set by CI/CD
|
|
10
|
+
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")
|
|
11
|
+
|
|
12
|
+
# Add versioning helper to path
|
|
13
|
+
helper_path = Path(__file__).parent.parent.parent / "versioning" / "helper"
|
|
14
|
+
sys.path.insert(0, str(helper_path))
|
|
15
|
+
|
|
16
|
+
from setup_utils import get_dynamic_dependencies
|
|
17
|
+
|
|
18
|
+
# Use minimum version strategy:
|
|
19
|
+
# - Internal packages get: >= current_base_version (e.g., >= 0.1.0)
|
|
20
|
+
# - Automatically updates when you build new versions
|
|
21
|
+
# - Consumers can upgrade to any higher version
|
|
22
|
+
setup(
|
|
23
|
+
version=package_version,
|
|
24
|
+
install_requires=get_dynamic_dependencies(
|
|
25
|
+
use_compatible_release=False, # No upper bound
|
|
26
|
+
use_exact_match=False, # Not exact match
|
|
27
|
+
),
|
|
28
|
+
)
|