microsoft-agents-a365-runtime 0.1.0__tar.gz → 0.2.0.dev5__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 (15) hide show
  1. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/PKG-INFO +3 -3
  2. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/README.md +2 -2
  3. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365/runtime/utility.py +28 -0
  4. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365_runtime.egg-info/PKG-INFO +3 -3
  5. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365/runtime/__init__.py +0 -0
  6. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365/runtime/environment_utils.py +0 -0
  7. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365/runtime/power_platform_api_discovery.py +0 -0
  8. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365/runtime/version_utils.py +0 -0
  9. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365_runtime.egg-info/SOURCES.txt +0 -0
  10. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365_runtime.egg-info/dependency_links.txt +0 -0
  11. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365_runtime.egg-info/requires.txt +0 -0
  12. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/microsoft_agents_a365_runtime.egg-info/top_level.txt +0 -0
  13. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/pyproject.toml +0 -0
  14. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/setup.cfg +0 -0
  15. {microsoft_agents_a365_runtime-0.1.0 → microsoft_agents_a365_runtime-0.2.0.dev5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-a365-runtime
3
- Version: 0.1.0
3
+ Version: 0.2.0.dev5
4
4
  Summary: Telemetry, tracing, and monitoring components for AI agents
5
5
  Author-email: Microsoft <support@microsoft.com>
6
6
  License: MIT
@@ -53,7 +53,7 @@ For usage examples and detailed documentation, see the [Microsoft Agent 365 Deve
53
53
  For issues, questions, or feedback:
54
54
 
55
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
56
+ - See the [main documentation](../../README.md) for more information
57
57
 
58
58
  ## Trademarks
59
59
 
@@ -63,4 +63,4 @@ For issues, questions, or feedback:
63
63
 
64
64
  Copyright (c) Microsoft Corporation. All rights reserved.
65
65
 
66
- Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
66
+ Licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details.
@@ -20,7 +20,7 @@ For usage examples and detailed documentation, see the [Microsoft Agent 365 Deve
20
20
  For issues, questions, or feedback:
21
21
 
22
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
23
+ - See the [main documentation](../../README.md) for more information
24
24
 
25
25
  ## Trademarks
26
26
 
@@ -30,4 +30,4 @@ For issues, questions, or feedback:
30
30
 
31
31
  Copyright (c) Microsoft Corporation. All rights reserved.
32
32
 
33
- Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
33
+ Licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details.
@@ -9,7 +9,9 @@ and other common runtime operations.
9
9
 
10
10
  from __future__ import annotations
11
11
 
12
+ import platform
12
13
  import uuid
14
+ from importlib.metadata import PackageNotFoundError, version
13
15
  from typing import Any, Optional
14
16
 
15
17
  import jwt
@@ -23,6 +25,8 @@ class Utility:
23
25
  and other utility functions used across the Agent 365 runtime.
24
26
  """
25
27
 
28
+ _cached_version = None
29
+
26
30
  @staticmethod
27
31
  def get_app_id_from_token(token: Optional[str]) -> str:
28
32
  """
@@ -80,3 +84,27 @@ class Utility:
80
84
 
81
85
  # Fallback to extracting App ID from the auth token
82
86
  return Utility.get_app_id_from_token(auth_token)
87
+
88
+ @staticmethod
89
+ def get_user_agent_header(orchestrator: str = "") -> str:
90
+ """
91
+ Generates a User-Agent header string for SDK requests.
92
+
93
+ Args:
94
+ orchestrator: Optional orchestrator name to include in the User-Agent header.
95
+ Defaults to empty string if not provided.
96
+
97
+ Returns:
98
+ str: A formatted User-Agent header string containing SDK version, OS type,
99
+ Python version, and optional orchestrator information.
100
+ """
101
+ if Utility._cached_version is None:
102
+ try:
103
+ Utility._cached_version = version("microsoft-agents-a365-runtime")
104
+ except PackageNotFoundError:
105
+ Utility._cached_version = "unknown"
106
+
107
+ orchestrator_part = f"; {orchestrator}" if orchestrator else ""
108
+ os_type = platform.system()
109
+ python_version = platform.python_version()
110
+ return f"Agent365SDK/{Utility._cached_version} ({os_type}; Python {python_version}{orchestrator_part})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-a365-runtime
3
- Version: 0.1.0
3
+ Version: 0.2.0.dev5
4
4
  Summary: Telemetry, tracing, and monitoring components for AI agents
5
5
  Author-email: Microsoft <support@microsoft.com>
6
6
  License: MIT
@@ -53,7 +53,7 @@ For usage examples and detailed documentation, see the [Microsoft Agent 365 Deve
53
53
  For issues, questions, or feedback:
54
54
 
55
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
56
+ - See the [main documentation](../../README.md) for more information
57
57
 
58
58
  ## Trademarks
59
59
 
@@ -63,4 +63,4 @@ For issues, questions, or feedback:
63
63
 
64
64
  Copyright (c) Microsoft Corporation. All rights reserved.
65
65
 
66
- Licensed under the MIT License - see the [LICENSE](../../../LICENSE.md) file for details.
66
+ Licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details.