aixtools 0.3.1__tar.gz → 0.3.3__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 aixtools might be problematic. Click here for more details.
- {aixtools-0.3.1 → aixtools-0.3.3}/PKG-INFO +1 -1
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/_version.py +3 -3
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/remote_agent_connection.py +1 -1
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/utils.py +17 -4
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/auth/auth.py +16 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/README.md +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/config.toml +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/bn.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/en-US.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/gu.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/he-IL.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/hi.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/ja.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/kn.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/ml.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/mr.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/nl.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/ta.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/te.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/.chainlit/translations/zh-CN.json +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/app.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/pydantic_ai_adapter/storage.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/utils.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/agent.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/agent_batch.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/nodes_to_md.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/nodes_to_message.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/nodes_to_str.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/print_nodes.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/agents/prompt.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/app.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/auth/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/chainlit.md +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/compliance/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/compliance/private_data.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/context.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/db/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/db/database.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/db/vector_db.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/evals/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/evals/__main__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/evals/dataset.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/evals/discovery.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/evals/run_evals.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/google/client.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/app.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/display.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/export.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/filters.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/log_utils.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/log_view/node_summary.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logfilters/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logfilters/context_filter.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/log_objects.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/logging_config.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/mcp_log_models.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/mcp_logger.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/model_patch_logging.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/logging/open_telemetry.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/client.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/example_client.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/example_server.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/exceptions.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/fast_mcp_log.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/faulty_mcp.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/middleware.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/mcp/server.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/model_patch/model_patch.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/server/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/server/app_mounter.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/server/path.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/server/utils.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/testing/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/testing/agent_mock.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/testing/aix_test_model.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/testing/mock_tool.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/testing/model_patch_cache.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/tools/doctor/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/tools/doctor/mcp_tool_doctor.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/tools/doctor/tool_doctor.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/tools/doctor/tool_recommendation.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/chainlit/cl_agent_show.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/chainlit/cl_utils.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/config.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/config_util.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/enum_with_description.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/files.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/persisted_dict.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/utils/utils.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/vault/__init__.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools/vault/vault.py +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/aixtools.egg-info/SOURCES.txt +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/pyproject.toml +0 -0
- {aixtools-0.3.1 → aixtools-0.3.3}/setup.cfg +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.3.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
31
|
+
__version__ = version = '0.3.3'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 3, 3)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g7da95a013'
|
|
@@ -5,7 +5,7 @@ import asyncio
|
|
|
5
5
|
import httpx
|
|
6
6
|
from a2a.client import A2ACardResolver, ClientConfig, ClientFactory
|
|
7
7
|
from a2a.server.agent_execution import RequestContext
|
|
8
|
-
from a2a.types import AgentCard
|
|
8
|
+
from a2a.types import AgentCard, PushNotificationConfig
|
|
9
9
|
from a2a.utils import AGENT_CARD_WELL_KNOWN_PATH, PREV_AGENT_CARD_WELL_KNOWN_PATH
|
|
10
10
|
|
|
11
11
|
from aixtools.a2a.google_sdk.remote_agent_connection import RemoteAgentConnection
|
|
@@ -42,9 +42,15 @@ async def get_agent_card(client: httpx.AsyncClient, address: str) -> AgentCard:
|
|
|
42
42
|
class _AgentCardResolver:
|
|
43
43
|
"""Helper class to resolve and manage agent cards and their connections."""
|
|
44
44
|
|
|
45
|
-
def __init__(
|
|
45
|
+
def __init__(
|
|
46
|
+
self, client: httpx.AsyncClient, push_notification_configs: list[PushNotificationConfig] | None = None
|
|
47
|
+
):
|
|
46
48
|
self._httpx_client = client
|
|
47
|
-
self._a2a_client_factory = ClientFactory(
|
|
49
|
+
self._a2a_client_factory = ClientFactory(
|
|
50
|
+
ClientConfig(
|
|
51
|
+
httpx_client=self._httpx_client, polling=True, push_notification_configs=push_notification_configs or []
|
|
52
|
+
)
|
|
53
|
+
)
|
|
48
54
|
self.clients: dict[str, RemoteAgentConnection] = {}
|
|
49
55
|
|
|
50
56
|
def register_agent_card(self, card: AgentCard):
|
|
@@ -72,13 +78,20 @@ async def get_a2a_clients(
|
|
|
72
78
|
agent_hosts: list[str],
|
|
73
79
|
session_id_tuple: SessionIdTuple,
|
|
74
80
|
auth_token: str = None,
|
|
81
|
+
push_notification_config_url: str | None = None,
|
|
75
82
|
*,
|
|
76
83
|
timeout: float = DEFAULT_A2A_TIMEOUT,
|
|
77
84
|
) -> dict[str, RemoteAgentConnection]:
|
|
78
85
|
"""Get A2A clients for all agents defined in the configuration."""
|
|
86
|
+
push_notification_configs = (
|
|
87
|
+
[PushNotificationConfig(url=push_notification_config_url)] if push_notification_config_url else None
|
|
88
|
+
)
|
|
89
|
+
|
|
79
90
|
headers = create_session_headers(session_id_tuple, auth_token)
|
|
80
91
|
httpx_client = httpx.AsyncClient(headers=headers, timeout=timeout, follow_redirects=True)
|
|
81
|
-
clients = await _AgentCardResolver(
|
|
92
|
+
clients = await _AgentCardResolver(
|
|
93
|
+
httpx_client, push_notification_configs=push_notification_configs
|
|
94
|
+
).get_a2a_clients(agent_hosts)
|
|
82
95
|
for client in clients.values():
|
|
83
96
|
logger.info("Using A2A server at: %s", client.get_agent_card().url)
|
|
84
97
|
return clients
|
|
@@ -30,6 +30,7 @@ class AuthTokenErrorCode(str, enum.Enum):
|
|
|
30
30
|
JWT_ERROR = "Generic JWT error"
|
|
31
31
|
MISSING_GROUPS_ERROR = "Missing authorized groups"
|
|
32
32
|
INVALID_TOKEN_SCOPE = "Token scope does not match configured scope"
|
|
33
|
+
TOKEN_MISSING = "Token missing"
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
class AuthTokenError(Exception):
|
|
@@ -185,3 +186,18 @@ class AccessTokenAuthProvider(AuthProvider):
|
|
|
185
186
|
return AccessToken(
|
|
186
187
|
token=token, client_id=self.token_verifier.api_id, scopes=scopes_arr, expires_at=claims.get("exp", None)
|
|
187
188
|
)
|
|
189
|
+
|
|
190
|
+
async def verify_auth_header(self, auth_header: str | None) -> AccessToken:
|
|
191
|
+
"""
|
|
192
|
+
Splits the authorization header and looks for bearer type token,
|
|
193
|
+
then verifies the extracted bearer token and returns an AccessToken object.
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
if auth_header and auth_header.lower().startswith("bearer "):
|
|
197
|
+
auth_token = auth_header.split(" ", 1)[1].strip()
|
|
198
|
+
return await self.verify_token(auth_token)
|
|
199
|
+
|
|
200
|
+
raise AuthTokenError(
|
|
201
|
+
AuthTokenErrorCode.TOKEN_MISSING,
|
|
202
|
+
f"Could not find bearer token in authorization header: {auth_header}",
|
|
203
|
+
)
|
|
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
|
{aixtools-0.3.1 → aixtools-0.3.3}/aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|