kagent-adk 0.6.14__tar.gz → 0.6.16__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.
Potentially problematic release.
This version of kagent-adk might be problematic. Click here for more details.
- kagent_adk-0.6.16/.python-version +1 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/PKG-INFO +1 -1
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/pyproject.toml +1 -1
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/_agent_executor.py +8 -17
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/models/_openai.py +1 -1
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/types.py +2 -3
- kagent_adk-0.6.14/.python-version +0 -1
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/.gitignore +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/README.md +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/_a2a.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/_session_service.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/_token.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/cli.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/converters/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/converters/error_mappings.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/converters/event_converter.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/converters/part_converter.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/converters/request_converter.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/src/kagent/adk/models/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/unittests/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/unittests/converters/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/unittests/converters/test_event_converter.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/unittests/models/__init__.py +0 -0
- {kagent_adk-0.6.14 → kagent_adk-0.6.16}/tests/unittests/models/test_openai.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13.7
|
|
@@ -22,6 +22,7 @@ from a2a.types import (
|
|
|
22
22
|
TextPart,
|
|
23
23
|
)
|
|
24
24
|
from google.adk.runners import Runner
|
|
25
|
+
from google.adk.utils.context_utils import Aclosing
|
|
25
26
|
from opentelemetry import trace
|
|
26
27
|
from pydantic import BaseModel
|
|
27
28
|
from typing_extensions import override
|
|
@@ -145,17 +146,6 @@ class A2aAgentExecutor(AgentExecutor):
|
|
|
145
146
|
)
|
|
146
147
|
except Exception as enqueue_error:
|
|
147
148
|
logger.error("Failed to publish failure event: %s", enqueue_error, exc_info=True)
|
|
148
|
-
finally:
|
|
149
|
-
# Shield cleanup from external cancellation so toolsets (e.g., MCP) can
|
|
150
|
-
# gracefully close their sessions without being torn down mid-flight.
|
|
151
|
-
try:
|
|
152
|
-
await asyncio.wait_for(asyncio.shield(runner.close()), timeout=15.0)
|
|
153
|
-
except asyncio.CancelledError:
|
|
154
|
-
# Suppress cancellation during cleanup to avoid noisy tracebacks
|
|
155
|
-
# from libraries that assume non-cancelled close semantics.
|
|
156
|
-
logger.warning("Runner.close() was cancelled; suppressing during cleanup")
|
|
157
|
-
except Exception as close_error:
|
|
158
|
-
logger.error("Error during runner.close(): %s", close_error, exc_info=True)
|
|
159
149
|
|
|
160
150
|
async def _handle_request(
|
|
161
151
|
self,
|
|
@@ -203,12 +193,13 @@ class A2aAgentExecutor(AgentExecutor):
|
|
|
203
193
|
)
|
|
204
194
|
|
|
205
195
|
task_result_aggregator = TaskResultAggregator()
|
|
206
|
-
async
|
|
207
|
-
for
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
196
|
+
async with Aclosing(runner.run_async(**run_args)) as agen:
|
|
197
|
+
async for adk_event in agen:
|
|
198
|
+
for a2a_event in convert_event_to_a2a_events(
|
|
199
|
+
adk_event, invocation_context, context.task_id, context.context_id
|
|
200
|
+
):
|
|
201
|
+
task_result_aggregator.process_event(a2a_event)
|
|
202
|
+
await event_queue.enqueue_event(a2a_event)
|
|
212
203
|
|
|
213
204
|
# publish the task result event - this is final
|
|
214
205
|
if (
|
|
@@ -395,7 +395,7 @@ class AzureOpenAI(BaseOpenAI):
|
|
|
395
395
|
@cached_property
|
|
396
396
|
def _client(self) -> AsyncAzureOpenAI:
|
|
397
397
|
"""Get the Azure OpenAI client."""
|
|
398
|
-
api_version = self.api_version or os.environ.get("
|
|
398
|
+
api_version = self.api_version or os.environ.get("OPENAI_API_VERSION", "2024-02-15-preview")
|
|
399
399
|
azure_endpoint = self.azure_endpoint or os.environ.get("AZURE_OPENAI_ENDPOINT")
|
|
400
400
|
api_key = self.api_key or os.environ.get("AZURE_OPENAI_API_KEY")
|
|
401
401
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import httpx
|
|
2
1
|
import logging
|
|
2
|
+
from typing import Any, Literal, Union
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import httpx
|
|
6
5
|
from google.adk.agents import Agent
|
|
7
6
|
from google.adk.agents.base_agent import BaseAgent
|
|
8
7
|
from google.adk.agents.llm_agent import ToolUnion
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.13.5
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|