Skip to content

Commit bdf4ba6

Browse files
author
Jesus Terrazas
committed
Merge branch 'users/jterrazas/google-adk-support' of https://github.com/microsoft/Agent365-python into users/jterrazas/google-adk-support
2 parents 124726c + 8aa1200 commit bdf4ba6

4 files changed

Lines changed: 20 additions & 8 deletions

File tree

libraries/microsoft-agents-a365-tooling-extensions-google/docs/design.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ service = McpToolRegistrationService()
2020
# Create agent with MCP tools
2121
agent = await service.add_tool_servers_to_agent(
2222
agent=existing_agent,
23-
agentic_app_id="your-agent-id",
2423
auth=auth_context,
2524
auth_handler_name="graph",
2625
context=turn_context,
@@ -51,7 +50,6 @@ Google ADK Agent with MCP tools
5150
| Parameter | Type | Description |
5251
|-----------|------|-------------|
5352
| `agent` | `Agent` | The existing Google ADK agent |
54-
| `agentic_app_id` | `str` | Agentic App ID for the agent |
5553
| `auth` | `Authorization` | Auth context for token exchange |
5654
| `auth_handler_name` | `str` | Name of auth handler |
5755
| `context` | `TurnContext` | Conversation context |

libraries/microsoft-agents-a365-tooling-extensions-google/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ target-version = ['py311']
6565
line-length = 100
6666
target-version = "py311"
6767

68+
[tool.ruff.lint.flake8-copyright]
69+
notice-rgx = "# Copyright \\(c\\) Microsoft Corporation\\.\\r?\\n# Licensed under the MIT License\\."
70+
min-file-size = 1
71+
6872
[tool.mypy]
6973
python_version = "3.11"
7074
strict = true

libraries/microsoft-agents-a365-tooling-extensions-google/setup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515

1616
from setup_utils import get_dynamic_dependencies # noqa: E402
1717

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
18+
# Use exact version matching for internal dependencies:
19+
# - Internal packages get: == current_version (e.g., == 1.2.3)
20+
# - Ensures all SDK packages must be at the same version
21+
# - Prevents incompatibility issues from version mismatches
2222
setup(
2323
version=package_version,
2424
install_requires=get_dynamic_dependencies(
25-
use_compatible_release=False, # No upper bound
26-
use_exact_match=False, # Not exact match
25+
use_exact_match=True,
2726
),
2827
)

tests/tooling/extensions/google/test_mcp_tool_registration_service.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
class TestMcpToolRegistrationServiceInit:
1212
"""Tests for McpToolRegistrationService initialization."""
1313

14+
@pytest.mark.unit
1415
def test_init_default_logger(self):
1516
"""Test initialization with default logger."""
1617
with patch(
@@ -24,6 +25,7 @@ def test_init_default_logger(self):
2425
assert service.config_service is not None
2526
assert service._connected_servers == []
2627

28+
@pytest.mark.unit
2729
def test_init_custom_logger(self):
2830
"""Test initialization with custom logger."""
2931
import logging
@@ -39,6 +41,7 @@ def test_init_custom_logger(self):
3941

4042
assert service._logger is custom_logger
4143

44+
@pytest.mark.unit
4245
def test_orchestrator_name(self):
4346
"""Test that orchestrator name is set correctly."""
4447
with patch(
@@ -91,6 +94,7 @@ def mock_server_config(self):
9194
return mock
9295

9396
@pytest.mark.asyncio
97+
@pytest.mark.unit
9498
async def test_add_tool_servers_exchanges_token_when_not_provided(
9599
self, mock_agent, mock_authorization, mock_turn_context
96100
):
@@ -136,6 +140,7 @@ async def test_add_tool_servers_exchanges_token_when_not_provided(
136140
mock_authorization.exchange_token.assert_called_once()
137141

138142
@pytest.mark.asyncio
143+
@pytest.mark.unit
139144
async def test_add_tool_servers_uses_provided_token(
140145
self, mock_agent, mock_authorization, mock_turn_context
141146
):
@@ -178,6 +183,7 @@ async def test_add_tool_servers_uses_provided_token(
178183
mock_authorization.exchange_token.assert_not_called()
179184

180185
@pytest.mark.asyncio
186+
@pytest.mark.unit
181187
async def test_add_tool_servers_creates_mcp_toolsets(
182188
self, mock_agent, mock_authorization, mock_turn_context, mock_server_config
183189
):
@@ -229,6 +235,7 @@ async def test_add_tool_servers_creates_mcp_toolsets(
229235
assert mock_toolset in mock_agent.tools
230236

231237
@pytest.mark.asyncio
238+
@pytest.mark.unit
232239
async def test_add_tool_servers_modifies_agent_in_place(
233240
self, mock_agent, mock_authorization, mock_turn_context
234241
):
@@ -271,6 +278,7 @@ async def test_add_tool_servers_modifies_agent_in_place(
271278
assert existing_tool in mock_agent.tools
272279

273280
@pytest.mark.asyncio
281+
@pytest.mark.unit
274282
async def test_add_tool_servers_handles_toolset_creation_error(
275283
self, mock_agent, mock_authorization, mock_turn_context, mock_server_config
276284
):
@@ -325,6 +333,7 @@ class TestCleanup:
325333
"""Tests for cleanup method."""
326334

327335
@pytest.mark.asyncio
336+
@pytest.mark.unit
328337
async def test_cleanup_closes_connected_servers(self):
329338
"""Test that cleanup closes all connected servers."""
330339
with patch(
@@ -351,6 +360,7 @@ async def test_cleanup_closes_connected_servers(self):
351360
assert service._connected_servers == []
352361

353362
@pytest.mark.asyncio
363+
@pytest.mark.unit
354364
async def test_cleanup_handles_close_errors(self):
355365
"""Test that cleanup handles errors during close gracefully."""
356366
with patch(
@@ -373,6 +383,7 @@ async def test_cleanup_handles_close_errors(self):
373383
assert service._connected_servers == []
374384

375385
@pytest.mark.asyncio
386+
@pytest.mark.unit
376387
async def test_cleanup_handles_servers_without_close(self):
377388
"""Test that cleanup handles servers without close method."""
378389
with patch(

0 commit comments

Comments
 (0)